Fixes for `override` support

This commit is contained in:
Phillip Stephens 2019-08-10 17:46:14 -07:00
parent ffbd1a0bcd
commit 0532b38059
4 changed files with 45 additions and 7 deletions

View File

@ -6,6 +6,6 @@ class LZType10 : public LZBase {
public: public:
explicit LZType10(atInt32 minimumOffset = 1, atInt32 SlidingWindow = 4096, atInt32 MinimumMatch = 3, explicit LZType10(atInt32 minimumOffset = 1, atInt32 SlidingWindow = 4096, atInt32 MinimumMatch = 3,
atInt32 BlockSize = 8); atInt32 BlockSize = 8);
atUint32 compress(const atUint8* src, atUint8** dest, atUint32 srcLength); atUint32 compress(const atUint8* src, atUint8** dstBuf, atUint32 srcLength);
atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLen); atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLen);
}; };

View File

@ -6,6 +6,6 @@ class LZType11 : public LZBase {
public: public:
explicit LZType11(atInt32 MinimumOffset = 1, atInt32 SlidingWindow = 4096, atInt32 MinimumMatch = 3, explicit LZType11(atInt32 MinimumOffset = 1, atInt32 SlidingWindow = 4096, atInt32 MinimumMatch = 3,
atInt32 BlockSize = 8); atInt32 BlockSize = 8);
atUint32 compress(const atUint8* src, atUint8** dest, atUint32 srcLength); atUint32 compress(const atUint8* src, atUint8** dst, atUint32 srcLength);
atUint32 decompress(const atUint8* src, atUint8** dest, atUint32 srcLength); atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLength);
}; };

View File

@ -910,7 +910,7 @@ inline void __BinarySizeProp64(const T& obj, size_t& s) {
} // namespace athena::io } // namespace athena::io
#define AT_DECL_DNA \ #define AT_DECL_DNA_DO \
template <class Op, athena::Endian DNAE = DNAEndian, class T> \ template <class Op, athena::Endian DNAE = DNAEndian, class T> \
void Do(const athena::io::PropId& _id, T& var, typename Op::StreamT& s) { \ void Do(const athena::io::PropId& _id, T& var, typename Op::StreamT& s) { \
athena::io::__Do<Op, T, DNAE>(_id, var, s); \ athena::io::__Do<Op, T, DNAE>(_id, var, s); \
@ -945,7 +945,10 @@ inline void __BinarySizeProp64(const T& obj, size_t& s) {
} \ } \
template <class Op> \ template <class Op> \
void Enumerate(typename Op::StreamT& s); \ void Enumerate(typename Op::StreamT& s); \
static const char* DNAType(); \ static const char* DNAType();
#define AT_DECL_DNA \
AT_DECL_DNA_DO \
void read(athena::io::IStreamReader& r) { athena::io::__Read(*this, r); } \ void read(athena::io::IStreamReader& r) { athena::io::__Read(*this, r); } \
void write(athena::io::IStreamWriter& w) const { athena::io::__Write(*this, w); } \ void write(athena::io::IStreamWriter& w) const { athena::io::__Write(*this, w); } \
void binarySize(size_t& s) const { athena::io::__BinarySize(*this, s); } void binarySize(size_t& s) const { athena::io::__BinarySize(*this, s); }
@ -959,12 +962,47 @@ inline void __BinarySizeProp64(const T& obj, size_t& s) {
AT_DECL_DNA \ AT_DECL_DNA \
Delete __d; Delete __d;
#define AT_DECL_EXPLICIT_DNAV \
AT_DECL_DNAV \
Delete __d;
#define AT_DECL_EXPLICIT_DNAV_NO_TYPE \
AT_DECL_DNAV_NO_TYPE \
Delete __d;
#define AT_DECL_EXPLICIT_DNA_YAML \ #define AT_DECL_EXPLICIT_DNA_YAML \
AT_DECL_DNA_YAML \ AT_DECL_DNA_YAML \
Delete __d; Delete __d;
#define AT_DECL_EXPLICIT_DNA_YAMLV \
AT_DECL_DNA_YAMLV \
Delete __d;
#define AT_DECL_EXPLICIT_DNA_YAMLV_NO_TYPE \
AT_DECL_DNA_YAMLV_NO_TYPE \
Delete __d;
#define AT_DECL_DNAV \ #define AT_DECL_DNAV \
const char* DNATypeV() const { return DNAType(); } AT_DECL_DNA_DO \
void read(athena::io::IStreamReader& r) override { athena::io::__Read(*this, r); } \
void write(athena::io::IStreamWriter& w) const override { athena::io::__Write(*this, w); } \
void binarySize(size_t& s) const override { athena::io::__BinarySize(*this, s); } \
const char* DNATypeV() const override { return DNAType(); }
#define AT_DECL_DNAV_NO_TYPE \
AT_DECL_DNA_DO \
void read(athena::io::IStreamReader& r) override { athena::io::__Read(*this, r); } \
void write(athena::io::IStreamWriter& w) const override { athena::io::__Write(*this, w); } \
void binarySize(size_t& s) const override { athena::io::__BinarySize(*this, s); }
#define AT_DECL_DNA_YAMLV \
AT_DECL_DNAV \
void read(athena::io::YAMLDocReader& r) override { athena::io::__ReadYaml(*this, r); } \
void write(athena::io::YAMLDocWriter& w) const override { athena::io::__WriteYaml(*this, w); }
#define AT_DECL_DNA_YAMLV_NO_TYPE \
AT_DECL_DNAV_NO_TYPE \
void read(athena::io::YAMLDocReader& r) override { athena::io::__ReadYaml(*this, r); } \
void write(athena::io::YAMLDocWriter& w) const override { athena::io::__WriteYaml(*this, w); }
#define AT_SPECIALIZE_DNA(...) \ #define AT_SPECIALIZE_DNA(...) \
template void __VA_ARGS__::Enumerate<athena::io::Read<athena::io::PropType::None>>( \ template void __VA_ARGS__::Enumerate<athena::io::Read<athena::io::PropType::None>>( \

View File

@ -172,7 +172,7 @@ struct YAMLStdStringViewReaderState {
} }
}; };
int YAMLStdStringReader(YAMLStdStringViewReaderState* str, unsigned char* buffer, size_t size, size_t* size_read); int YAMLStdStringReader(YAMLStdStringViewReaderState* reader, unsigned char* buffer, size_t size, size_t* size_read);
int YAMLStdStringWriter(std::string* str, unsigned char* buffer, size_t size); int YAMLStdStringWriter(std::string* str, unsigned char* buffer, size_t size);