27 void operator delete(
void* ptr,
size_t size);
28 void*
operator new(
size_t size);
45 static comms::cStr& LastTag();
46 static comms::cStr& defTab();
75 TagsList* AddSubTag(
const char* quotename, DWORD body);
76 TagsList* AddSubTag(
const char* quotename,
short body);
77 TagsList* AddSubTag(
const char* quotename, WORD body);
78 TagsList* AddSubTag(
const char* quotename,
char body);
90 TagsList& operator << (
const comms::cVec2& value);
91 TagsList& operator << (
const comms::cVec3& value);
92 TagsList& operator << (
const comms::cVec4& value);
93 TagsList& operator << (
const comms::cMat3& value);
94 TagsList& operator << (
const comms::cMat4& value);
113 template <
typename X,
typename TYPE>
114 void StoreField(
const char* tagname,
const cList<X>& array, TYPE X::* member);
117 void operator >> (comms::cStr& string_value);
118 void operator >> (
int& value);
119 void operator >> (
float& value);
120 void operator >> (
bool& value);
121 void operator >> (comms::cVec2& value);
122 void operator >> (comms::cVec3& value);
123 void operator >> (comms::cVec4& value);
124 void operator >> (comms::cMat3& value);
125 void operator >> (comms::cMat4& value);
132 template <
typename X,
typename TYPE>
133 void RestoreField(
cList<X>& array, TYPE X::* member);
153 int GetSubTagIndex(
const char* SubQuoteName);
180 static int& GetConstantLocationValueRef(
const char* str);
184 void setAsArray(
bool isArray);
185 bool isArray()
const;
187 const char* _tagname;
188 const char* _tag(
const char* tag);
189 comms::cList<TagsList*> SubTags;
200 const char* s = body().ToCharPtr();
201 if (body().Length()) {
202 cPtrDiff num = *((
int*)s);
203 cPtrDiff sz = *((
int*)(s + 4));
204 if (sz ==
sizeof(X)) {
207 memcpy(array.ToPtr(), s + 8, num * sz);
213template <
typename X,
typename TYPE>
216 const char* s = body().ToCharPtr();
217 if (body().Length()) {
218 cPtrDiff num = *((
int*)s);
219 cPtrDiff sz = *((
int*)(s + 4));
220 if (sz ==
sizeof(TYPE)) {
222 if (array.Count() < num) {
224 array.Add(ref, num - array.Count());
226 TYPE* TL = (TYPE*)(s + 8);
227 for (
int i = 0; i < num; i++) {
228 array[i].*member = *TL;
240 T->body().SetLength(4 + 4 + array.Count() *
sizeof(X));
241 char* s = T->body().ToNonConstCharPtr();
242 *((
int*)s) = array.Count();
243 *((
int*)(s + 4)) =
sizeof(X);
244 memcpy(s + 8, array.ToPtr(), cPtrDiff(array.Count()) *
sizeof(X));
250template <
typename X,
typename TYPE>
254 T->body().SetLength(4 + 4 + array.Count() *
sizeof(TYPE));
255 char* s = T->body().ToNonConstCharPtr();
256 *((
int*)s) = array.Count();
257 *((
int*)(s + 4)) =
sizeof(TYPE);
258 TYPE* TL = (TYPE*)(s + 8);
259 for (
int i = 0; i < array.Count();i++) {
260 *TL = array[i].*member;
266void ToBase64(BYTE* buf,
int Len, comms::cStr& dest);
267void ToBase64(BYTE* buf,
int Len, std::string& dest);
268int ReadBase64(
const char* src, BYTE* buf,
int MaxLen);
271inline TagsList* new_TagsList(
const char* s){
277inline void TagsList::operator
delete(
void* ptr,
size_t size) {
280inline void* TagsList::operator
new(
size_t size) {
281 return new_TagsList();
284inline comms::cStr& TagsList::body() {
288inline void TagsList::setAsArray(
bool isArray) {
289 this->_isArray = isArray;
292inline bool TagsList::isArray()
const {
Use this class for build a class for UI or serialization. see class_reg.h for details about the class...
Definition BaseClass.h:91
The array template, refer it as coat::list <...> if you are using the Core API.
Definition cList.h:133