Work on d_a_title (#2215)

This commit is contained in:
hatal175
2024-10-17 14:21:08 -07:00
committed by GitHub
parent 2aa441e40b
commit 38445f4d51
6 changed files with 90 additions and 167 deletions
+19
View File
@@ -62,6 +62,7 @@ struct TParse_header_block {
template <typename T>
struct TParseValue_raw_ {
typedef T ParseType;
static T parse(const void* data) { return *(T*)data; }
};
@@ -83,6 +84,24 @@ struct TParseValue : public Parser<T> {
}
};
template<class Parser, int size>
struct TValueIterator {
TValueIterator(const void* begin) {
mBegin = begin;
}
typename Parser::ParseType operator*() {
return *(typename Parser::ParseType*)mBegin;
}
const void* mBegin;
};
template<typename T>
struct TValueIterator_raw : public TValueIterator<TParseValue_raw_<u8>, 1> {
TValueIterator_raw(const void* begin) : TValueIterator<TParseValue_raw_<u8>, 1>(begin) {}
};
} // namespace binary
} // namespace JGadget