TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Any.h
Go to the documentation of this file.
1 
14 #ifndef G3D_Any_h
15 #define G3D_Any_h
16 
17 #include "G3D/platform.h"
18 #include "G3D/Table.h"
19 #include "G3D/Array.h"
20 #include "G3D/AtomicInt32.h"
21 #include "G3D/stringutils.h"
22 #include <string>
23 
24 // needed for Token
25 #include "G3D/TextInput.h"
26 #include "G3D/TextOutput.h"
27 
28 #ifdef verify
29 #undef verify
30 #endif
31 
32 namespace G3D {
33 
34 class TextOutput;
35 
184 class Any {
185 public:
186 
188 
189  static std::string toString(Type t);
190 
192  class Source {
193  public:
194  std::string filename;
195  int line;
197 
198  Source() : line(0), character(0) {}
199 
200  void set(const TextInput& ti, const Token& t) {
201  filename = ti.filename();
202  line = t.line();
203  character = t.character();
204  }
205  };
206 
209 
210 private:
211 
213  static void deserializeComment(TextInput& ti, Token& token, std::string& comment);
214 
216  union SimpleValue {
217  bool b;
218  double n;
219 
220  inline SimpleValue() : n(0.0) {}
221  inline SimpleValue(bool x) : b(x) {}
222  inline SimpleValue(double x) : n(x) {}
223  };
224 
226  static const char* PAREN;
227  static const char* BRACKET;
228  static const char* BRACE;
229 
230  class Data {
231  public:
233  union Value {
234  std::string* s;
236  AnyTable* t;
237  inline Value() : s(NULL) {}
238  };
239 
240  // Needed so that the destructor knows what is in Value
241  // and can call its destructor.
243 
247 
248  std::string comment;
249 
250  std::string name;
251 
260  std::string includeLine;
261 
268 
270 
272  const char* bracket;
273 
275  char separator;
276 
277  private:
278 
280  inline Data(Type t, const char* b, char s) : type(t), referenceCount(1), bracket(b), separator(s) {}
281 
283  ~Data();
284 
285  public:
286 
288  static Data* create(const Data* d);
289  static Data* create(Type t, const char* b = NULL, char s = '\0');
290 
293  static void destroy(Data* d);
294  };
295 
304  std::string m_placeholderName;
305 
308  mutable Data* m_data;
309 
311  void beforeRead() const;
312 
315  void beforeWrite();
316 
321  void dropReference();
322 
324  void ensureData();
325 
330  void ensureMutable();
331 
335  void deserializeBody(TextInput& ti, Token& token);
336 
337  void deserialize(TextInput& ti, Token& token);
338 
340  static void deserializeName(TextInput& ti, Token& token, std::string& name);
341 
345  static void readUntilSeparatorOrClose(TextInput& ti, Token& token);
346 
349  Any(const std::string& key, Data* data);
350 
351  bool isPlaceholder() const {
352  return ! m_placeholderName.empty();
353  }
354 
355  void _append(const Any& v0);
356  void _append(const Any& v0, const Any& v1);
357  void _append(const Any& v0, const Any& v1, const Any& v2);
358  void _append(const Any& v0, const Any& v1, const Any& v2, const Any& v3);
359  Any _get(const std::string& key, const Any& defaultVal) const;
360  void _set(const std::string& key, const Any& val);
361 
362  void _parse(const std::string& src);
363 
364 public:
365 
367  class KeyNotFound : public ParseError {
368  public:
369  std::string key;
370 
371  KeyNotFound(const Data* data) {
372  if (data) {
373  filename = data->source.filename;
374  line = data->source.line;
375  character = data->source.character;
376  }
377  }
378  };
379 
381  class IndexOutOfBounds : public ParseError {
382  public:
383  int index;
384  int size;
385  IndexOutOfBounds() : index(0), size(0) {}
386  IndexOutOfBounds(const Data* data, int i, int s) : index(i), size(s) {
387  if (data) {
388  filename = data->source.filename;
389  line = data->source.line;
390  character = data->source.character;
391  }
392  message = format("Index out of bounds: index = %d, array size = %d", i, s);
393  }
394  };
395 
397  Any();
398 
400  explicit Any(TextInput& t);
401 
402  Any(const Any& x);
403 
405  explicit Any(double x);
406 
407  explicit Any(float x);
408 
409  #if defined(G3D_32Bit) || defined(_MSC_VER)
410 
411  explicit Any(int64 x) : m_type(NUMBER), m_simpleValue((double)x), m_data(NULL) {}
412  #endif
413 
415  explicit Any(long x);
416 
418  explicit Any(int x);
419 
421  explicit Any(char x);
422 
424  explicit Any(short x);
425 
427  explicit Any(bool x);
428 
430  explicit Any(const std::string& x);
431 
433  explicit Any(const char* x);
434 
439  explicit Any(Type t, const std::string& name = "", const std::string& brackets = "", const char separator = '\0');
440 
442  template<class T>
443  explicit Any(const T& v) : m_type(NIL), m_data(NULL) {
444  *this = v.toAny();
445  }
446 
447  ~Any();
448 
450  Any& operator=(const Any& x);
451 
453  Any& operator=(Type t);
454 
456  template<class T>
458  *this = Any::ARRAY;
459  resize(array.size());
460  for (int i = 0; i < array.size(); ++i) {
461  this->operator [](i) = array[i];
462  }
463  return *this;
464  }
465 
467  template<class T>
468  Any& operator=(const T& v) {
469  *this = Any(v);
470  return *this;
471  }
472 
473  Type type() const;
474 
480  static Any parse(const std::string& src);
481 
482  std::string unparse(const TextOutput::Settings& s = TextOutput::Settings()) const;
483 
486  std::string unparseJSON(const TextOutput::Settings& s = TextOutput::Settings(), bool allowCoercion = true) const;
487 
489  const std::string& comment() const;
490  void setComment(const std::string& c);
491 
493  bool isNil() const;
494 
496  double number() const;
497  float floatValue() const;
498 
499  const std::string& string() const;
500  bool boolean() const;
501 
513  std::string resolveStringAsFilename(bool errorIfNotFound = true) const;
514 
516  const std::string& name() const;
517 
520  bool nameBeginsWith(const std::string& s) const;
521 
524  bool nameBeginsWith(const char* s) const;
525 
528  bool nameEquals(const std::string& s) const;
529 
532  bool nameEquals(const char* s) const;
533 
553  void setName(const std::string& name);
554 
556  int size() const;
557  int length() const;
558 
560  const Any& operator[](int i) const;
561  Any& operator[](int i);
562 
563  const Any& last() const {
564  return (*this)[size() - 1];
565  }
566 
567  Any& last() {
568  return (*this)[size() - 1];
569  }
570 
572  const Array<Any>& array() const;
573 
574  template<class T0>
575  void append(const T0& v0) {
576  _append(Any(v0));
577  }
578 
579  template<class T0, class T1>
580  void append(const T0& v0, const T1& v1) {
581  _append(Any(v0), Any(v1));
582  }
583 
584  template<class T0, class T1, class T2>
585  void append(const T0& v0, const T1& v1, const T2& v2) {
586  _append(Any(v0), Any(v1), Any(v2));
587  }
588 
589  template<class T0, class T1, class T2, class T3>
590  void append(const T0& v0, const T1& v1, const T2& v2, const T3& v3) {
591  _append(Any(v0), Any(v1), Any(v2), Any(v3));
592  }
593 
596  const Table<std::string, Any>& table() const;
597 
601  const Any& operator[](const std::string& key) const;
602 
603  // Needed to prevent the operator[](int) overload from catching
604  // string literals
605  const Any& operator[](const char* key) const {
606  return operator[](std::string(key));
607  }
608 
632  Any& operator[](const std::string& key);
633 
635  inline Any& operator[](const char* key) {
636  return operator[](std::string(key));
637  }
638 
641  template<class T>
642  Any get(const std::string& key, const T& defaultVal) const {
643  return _get(key, Any(defaultVal));
644  }
645 
647  bool containsKey(const std::string& key) const;
648 
650  template<class T>
651  void set(const std::string& key, const T& val) {
652  _set(key, Any(val));
653  }
654 
656  Any& next();
657 
661  std::string sourceDirectory() const;
662 
664  bool operator==(const Any& x) const;
665 
666  bool operator==(const std::string& s) const {
667  return *this == Any(s);
668  }
669 
670  bool operator==(const double& v) const {
671  return *this == Any(v);
672  }
673 
674  bool operator==(int v) const {
675  return *this == Any(v);
676  }
677 
678  bool operator==(bool v) const {
679  return *this == Any(v);
680  }
681 
682  bool operator!=(const Any& x) const;
683 
684  bool operator!=(const std::string& s) const {
685  return *this != Any(s);
686  }
687 
688  bool operator!=(const double& v) const {
689  return *this != Any(v);
690  }
691 
692  bool operator!=(int v) const {
693  return *this != Any(v);
694  }
695 
696  bool operator!=(bool v) const {
697  return *this != Any(v);
698  }
699 
700  operator int() const;
701  operator uint32() const;
702  operator float() const;
703  operator double() const;
704  operator bool() const;
705  operator std::string() const;
706 
707  operator char() const {
708  return char(int(*this));
709  }
710 
711  operator uint8() const {
712  return uint8(int(*this));
713  }
714 
715  operator int16() const {
716  return int16(int(*this));
717  }
718 
719  operator uint16() const {
720  return uint16(int(*this));
721  }
722 
725  void resize(int n);
726 
730  void clear();
731 
735  void load(const std::string& filename);
736 
738  static Any fromFile(const std::string& filename);
739 
741  void loadIfExists(const std::string& filename);
742 
744  void save(const std::string& filename) const;
745 
746  void serialize(TextOutput& to, bool json = false, bool coerce = false) const;
747 
748  void serialize(class BinaryOutput& b) const;
749 
752  void deserialize(TextInput& ti);
753 
754  void deserialize(class BinaryInput& b);
755 
756  const Source& source() const;
757 
759  void remove(const std::string& key);
760 
763  void remove(int index);
764 
768  void verify(bool value, const std::string& message = "") const;
769 
770 
773  void verifyName(const std::string& n) const;
774 
777  void verifyName(const std::string& n, const std::string& m) const;
778 
781  void verifyName(const std::string& n, const std::string& m, const std::string& p) const;
782 
785  void verifyName(const std::string& n, const std::string& m, const std::string& p, const std::string& q) const;
786 
789  void verifyNameBeginsWith(const std::string& n) const;
790 
793  void verifyNameBeginsWith(const std::string& n, const std::string& m) const;
794 
797  void verifyNameBeginsWith(const std::string& n, const std::string& m, const std::string& p) const;
798 
801  void verifyNameBeginsWith(const std::string& n, const std::string& m, const std::string& p, const std::string& q) const;
802 
805  void verifyNameBeginsWith(const std::string& n, const std::string& m, const std::string& p, const std::string& q, const std::string& r) const;
806 
809  void verifyNameBeginsWith(const std::string& n, const std::string& m, const std::string& p, const std::string& q, const std::string& r, const std::string& s) const;
810 
813  void verifyNameBeginsWith(const std::string& n, const std::string& m, const std::string& p, const std::string& q, const std::string& r, const std::string& s, const std::string& t) const;
814 
816  void verifyType(Type t) const;
817 
819  void verifyType(Type t0, Type t1) const;
820 
822  void verifySize(int low, int high) const;
823 
825  void verifySize(int s) const;
826 
829  template<class T>
830  explicit Any(const Array<T>& array, const std::string& name = "") : m_type(ARRAY), m_data(NULL) {
831  setName(name);
832  resize(array.size());
833  for (int i = 0; i < array.size(); ++i) {
834  (*this)[i] = Any(array[i]);
835  }
836  }
837 
839  template<class T>
840  void getArray(Array<T>& array) const {
841  verifyType(ARRAY);
842  array.resize(size());
843  for (int i = 0; i < array.size(); ++i) {
844  array[i] = T((*this)[i]);
845  }
846  }
847 
849  template<class T>
851  verifyType(TABLE);
852  for (Table<std::string, Any>::Iterator it = this->table().begin(); it.isValid(); ++it) {
853  table.set(it.key(), T(it.value()));
854  }
855  }
856 
857 private:
858 
859  void deserializeTable(TextInput& ti);
860  void deserializeArray(TextInput& ti,const std::string& term);
861 
863  void become(const Type& t);
864 
865 }; // class Any
866 
867 
868 
869 
891 private:
894 public:
895 
897  AnyTableReader(const std::string& name, const Any& a);
898 
900  AnyTableReader(const Any& a);
901 
902  bool hasMore() const {
903  return m_any.size() > m_alreadyRead.size();
904  }
905 
907  void verifyDone() const;
908 
910  const Any& any() const {
911  return m_any;
912  }
913 
914 #if 0
915 
916  const std::string& key() const;
917 
919  const Any& value() const;
920 
921  AnyKeyIterator& operator++();
922 #endif
923 
925  void get(const std::string& s, std::string& v) {
926  v = m_any[s].string();
927  m_alreadyRead.insert(s);
928  }
929 
931  void get(const std::string& s, uint8& v) {
932  v = uint8(m_any[s].number());
933  m_alreadyRead.insert(s);
934  }
935 
937  void get(const std::string& s, uint16& v) {
938  v = uint16(m_any[s].number());
939  m_alreadyRead.insert(s);
940  }
941 
943  template<class T>
944  void get(const std::string& s, Array<T>& v) {
945  m_any[s].getArray(v);
946  m_alreadyRead.insert(s);
947  }
948 
949  template<class T>
950  void get(const std::string& s, Table<std::string, T>& v) {
951  m_any[s].getTable(v);
952  m_alreadyRead.insert(s);
953  }
954 
964  template<class ValueType>
965  void get(const std::string& s, ValueType& v) {
966  v = ValueType(m_any[s]);
967  m_alreadyRead.insert(s);
968  }
969 
971  const Any& operator[](const std::string& s) {
972  m_alreadyRead.insert(s);
973  return m_any[s];
974  }
975 
988  template<class ValueType>
989  bool getIfPresent(const std::string& s, ValueType& v) {
990  if (m_any.containsKey(s)) {
991  debugAssertM(! m_alreadyRead.contains(s), "read twice");
992 
993  get(s, v);
994  return true;
995  } else {
996  return false;
997  }
998  }
999 
1002  bool containsUnread(const std::string& s) const {
1003  return m_any.containsKey(s) && ! m_alreadyRead.contains(s);
1004  }
1005 
1006 };
1007 
1008 } // namespace G3D
1009 
1010 
1021 #define PARSE_ANY(x) Any::parse(#x)
1022 
1023 
1024 #endif
void getTable(Table< std::string, T > &table) const
Definition: Any.h:850
Type type() const
Definition: Any.cpp:505
~Data()
Definition: Any.cpp:282
Any(const Array< T > &array, const std::string &name="")
Definition: Any.h:830
Definition: Any.h:187
std::string key
Definition: Any.h:369
Definition: Any.h:367
Value()
Definition: Any.h:237
void clear()
Definition: Any.cpp:613
AtomicInt32 referenceCount
Definition: Any.h:267
const std::string & string() const
Definition: Any.cpp:548
const char * bracket
Definition: Any.h:272
Any & next()
Definition: Any.cpp:641
Value value
Definition: Any.h:246
bool getIfPresent(const std::string &s, ValueType &v)
Definition: Any.h:989
bool operator==(const std::string &s) const
Definition: Any.h:666
int16_t int16
Definition: g3dmath.h:165
void resize(size_t n, bool shrinkIfNecessary=true)
Definition: Array.h:490
bool isNil() const
Definition: Any.cpp:530
bool containsKey(const std::string &key) const
Definition: Any.cpp:313
int line
Definition: ParseError.h:37
bool containsUnread(const std::string &s) const
Definition: Any.h:1002
const std::string & filename() const
Definition: TextInput.cpp:1238
SimpleValue()
Definition: Any.h:220
void _set(const std::string &key, const Any &val)
Definition: Any.cpp:758
Any m_any
Definition: Any.h:892
int size
Definition: Any.h:384
bool contains(const T &member) const
Definition: Set.h:54
Set< std::string > m_alreadyRead
Definition: Any.h:893
Source()
Definition: Any.h:198
std::string sourceDirectory() const
Definition: Any.cpp:1604
void append(const T0 &v0, const T1 &v1, const T2 &v2, const T3 &v3)
Definition: Any.h:590
int index
Definition: Any.h:383
Definition: BinaryInput.h:69
void loadIfExists(const std::string &filename)
Definition: Any.cpp:103
Definition: TextOutput.h:63
Any()
Definition: Any.cpp:347
std::string name
Definition: Any.h:250
const Table< std::string, Any > & table() const
Definition: Any.cpp:706
void append(const T0 &v0, const T1 &v1, const T2 &v2)
Definition: Any.h:585
static void destroy(Data *d)
Definition: Any.cpp:274
Definition: Table.h:416
void resize(int n)
Definition: Any.cpp:602
SimpleValue m_simpleValue
Definition: Any.h:307
SimpleValue(bool x)
Definition: Any.h:221
const Any & operator[](const char *key) const
Definition: Any.h:605
Source source
Definition: Any.h:269
Any & last()
Definition: Any.h:567
Definition: AABox.h:25
int line() const
Definition: TextInput.h:125
static void deserializeComment(TextInput &ti, Token &token, std::string &comment)
Definition: Any.cpp:1178
Dynamic 1D array tuned for performance.
Definition: Array.h:95
Any & operator[](const char *key)
Definition: Any.h:635
Definition: AtomicInt32.h:29
static void deserializeName(TextInput &ti, Token &token, std::string &name)
Definition: Any.cpp:1206
Definition: Any.h:890
arena_t NULL
Definition: jemalloc_internal.h:624
std::string filename
Definition: ParseError.h:27
void append(const T0 &v0)
Definition: Any.h:575
std::string resolveStringAsFilename(bool errorIfNotFound=true) const
Definition: Any.cpp:49
Any _get(const std::string &key, const Any &defaultVal) const
Definition: Any.cpp:771
Definition: Any.h:187
AnyTable * t
Definition: Any.h:236
void set(const Key &key, const Value &value)
Definition: Table.h:599
Table< std::string, Any > AnyTable
Definition: Any.h:208
#define debugAssertM(exp, message)
Definition: debugAssert.h:161
static void readUntilSeparatorOrClose(TextInput &ti, Token &token)
Definition: Any.cpp:1393
uint16_t uint16
Definition: g3dmath.h:166
SimpleValue(double x)
Definition: Any.h:222
#define T1
Definition: Crypto_md5.cpp:153
Any(const T &v)
Definition: Any.h:443
Array< Any > AnyArray
Definition: Any.h:207
bool operator!=(int v) const
Definition: Any.h:692
void dropReference()
Definition: Any.cpp:327
#define bool
Definition: CascPort.h:16
int character
Definition: ParseError.h:42
bool nameEquals(const std::string &s) const
Definition: Any.cpp:115
void beforeWrite()
Definition: Any.cpp:448
Any & operator=(const Array< T > &array)
Definition: Any.h:457
IndexOutOfBounds(const Data *data, int i, int s)
Definition: Any.h:386
void deserializeArray(TextInput &ti, const std::string &term)
Definition: Any.h:187
void serialize(TextOutput &to, bool json=false, bool coerce=false) const
Definition: Any.cpp:956
void deserialize(TextInput &ti, Token &token)
Definition: Any.cpp:1233
std::string filename
Definition: Any.h:194
Easy loading and saving of human-readable configuration files.
Definition: Any.h:184
int character() const
Definition: TextInput.h:133
void verifyType(Type t) const
Definition: Any.cpp:1739
const Any & any() const
Definition: Any.h:910
Definition: TextInput.h:34
bool nameBeginsWith(const std::string &s) const
Definition: Any.cpp:110
Definition: Any.h:230
Type m_type
Definition: Any.h:306
bool operator!=(bool v) const
Definition: Any.h:696
double n
Definition: Any.h:218
#define T3
Definition: Crypto_md5.cpp:155
#define T2
Definition: Crypto_md5.cpp:154
Any & operator=(const T &v)
Definition: Any.h:468
Type
Definition: Any.h:187
int size() const
Definition: Set.h:50
void ensureData()
Definition: Any.cpp:1381
void setName(const std::string &name)
Set the name used when serializing an ARRAY or TABLE.
Definition: Any.cpp:573
Definition: Any.h:233
std::string unparse(const TextOutput::Settings &s=TextOutput::Settings()) const
Definition: Any.cpp:881
bool operator!=(const double &v) const
Definition: Any.h:688
std::string comment
Definition: Any.h:248
bool insert(const T &member)
Definition: Set.h:62
double number() const
Definition: Any.cpp:535
A simple tokenizer for parsing text files.
Definition: TextInput.h:223
Type type
Definition: Any.h:242
bool operator!=(const std::string &s) const
Definition: Any.h:684
float floatValue() const
Definition: Any.cpp:541
Definition: Table.h:101
void verifyName(const std::string &n) const
Definition: Any.cpp:1637
Array< Any > * a
Definition: Any.h:235
void verifySize(int low, int high) const
Definition: Any.cpp:1756
Definition: Any.h:381
Data * m_data
Definition: Any.h:308
bool operator==(const Any &x) const
Definition: Any.cpp:782
bool operator!=(const Any &x) const
Definition: Any.cpp:857
bool hasMore() const
Definition: Any.h:902
void deserializeBody(TextInput &ti, Token &token)
Definition: Any.cpp:1459
void beforeRead() const
Definition: Any.cpp:154
void setComment(const std::string &c)
Definition: Any.cpp:523
std::string __cdecl format(const char *fmt...) G3D_CHECK_PRINTF_ARGS
IndexOutOfBounds()
Definition: Any.h:385
int size() const
Definition: Array.h:430
bool operator==(const double &v) const
Definition: Any.h:670
bool isPlaceholder() const
Definition: Any.h:351
Definition: TextOutput.h:60
static const char * BRACKET
Definition: Any.h:227
int character
Definition: Any.h:196
bool operator==(bool v) const
Definition: Any.h:678
void getArray(Array< T > &array) const
Definition: Any.h:840
int line
Definition: Any.h:195
~Any()
Definition: Any.cpp:443
const Any & last() const
Definition: Any.h:563
void append(const T0 &v0, const T1 &v1)
Definition: Any.h:580
char separator
Definition: Any.h:275
static Any parse(const std::string &src)
Definition: Any.cpp:889
Definition: Any.h:187
int64_t int64
Definition: g3dmath.h:169
bool boolean() const
Definition: Any.cpp:555
static Data * create(const Data *d)
Definition: Any.cpp:169
void load(const std::string &filename)
Definition: Any.cpp:906
const std::string & name() const
Definition: Any.cpp:562
uint8_t uint8
Definition: g3dmath.h:164
bool b
Definition: Any.h:217
Definition: Any.h:216
std::string * s
Definition: Any.h:234
void set(const std::string &key, const T &val)
Definition: Any.h:651
int length() const
Definition: Any.cpp:596
void verifyDone() const
Definition: AnyTableReader.cpp:33
void verifyNameBeginsWith(const std::string &n) const
Definition: Any.cpp:1670
int size() const
Definition: Any.cpp:580
Definition: ParseError.h:22
Definition: Any.h:192
void verify(bool value, const std::string &message="") const
Definition: Any.cpp:1612
Definition: BinaryOutput.h:52
void become(const Type &t)
Definition: Any.cpp:68
static Any fromFile(const std::string &filename)
Definition: Any.cpp:96
KeyNotFound(const Data *data)
Definition: Any.h:371
Definition: Any.h:187
void deserializeTable(TextInput &ti)
static std::string toString(Type t)
Definition: Any.cpp:1774
Any & operator=(const Any &x)
Definition: Any.cpp:462
std::string unparseJSON(const TextOutput::Settings &s=TextOutput::Settings(), bool allowCoercion=true) const
Definition: Any.cpp:873
const std::string & comment() const
Definition: Any.cpp:511
AnyTableReader(const std::string &name, const Any &a)
Definition: AnyTableReader.cpp:6
const Any & operator[](int i) const
Definition: Any.cpp:629
const FieldDescriptor value
Definition: descriptor.h:1522
const Any & operator[](const std::string &s)
Definition: Any.h:971
uint32_t uint32
Definition: g3dmath.h:168
std::string message
Definition: ParseError.h:44
Definition: Any.h:187
void set(const TextInput &ti, const Token &t)
Definition: Any.h:200
G3D::int16 x
Definition: Vector2int16.h:37
static const char * BRACE
Definition: Any.h:228
const Array< Any > & array() const
Definition: Any.cpp:663
Type
Type of JSON value.
Definition: rapidjson.h:642
std::string includeLine
Definition: Any.h:260
Definition: Any.h:187
static const char * PAREN
Definition: Any.h:226
std::string m_placeholderName
Definition: Any.h:304
void save(const std::string &filename) const
Definition: Any.cpp:916
void _append(const Any &v0)
Definition: Any.cpp:671
Data(Type t, const char *b, char s)
Definition: Any.h:280
void ensureMutable()
Definition: Any.cpp:336
BG_AV_Nodes & operator++(BG_AV_Nodes &i)
Definition: BattlegroundAV.h:1550
const Source & source() const
Definition: Any.cpp:1594
void _parse(const std::string &src)
Definition: Any.cpp:896
bool operator==(int v) const
Definition: Any.h:674