deftype.hpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef _DEFTYPE_INCL
  14. #define _DEFTYPE_INCL
  15. #include "jcomp.hpp"
  16. #ifdef DEFTYPE_EXPORTS
  17. #define DEFTYPE_API DECL_EXPORT
  18. #else
  19. #define DEFTYPE_API DECL_IMPORT
  20. #endif
  21. #define CHEAP_UCHAR_DEF
  22. #ifdef _WIN32
  23. typedef wchar_t UChar;
  24. #else //_WIN32
  25. typedef unsigned short UChar;
  26. #endif //_WIN32
  27. interface ITypeInfo;
  28. interface IValue;
  29. interface IHqlExpression;
  30. interface IHqlScope;
  31. #if __BYTE_ORDER == __LITTLE_ENDIAN
  32. #define type_bigendianint type_swapint
  33. #define type_littleendianint type_int
  34. #else
  35. #define type_bigendianint type_int
  36. #define type_littleendianint type_swapint
  37. #endif
  38. // NOTE - do not change the values here - they are also used in Clarion and stored in a database!!
  39. // Add new types to the end
  40. enum type_vals
  41. {
  42. type_boolean = 0,
  43. type_int = 1,
  44. type_real = 2,
  45. type_decimal = 3,
  46. type_string = 4,
  47. type_alias = 5, // This is only used when serializing expression graphs
  48. type_date = 6,
  49. type_unused2 = 7,
  50. type_unused3 = 8,
  51. type_bitfield = 9,
  52. type_unused4 = 10,
  53. type_char = 11,
  54. type_enumerated = 12,
  55. type_record = 13,
  56. type_varstring = 14,
  57. type_blob = 15,
  58. type_data = 16,
  59. type_pointer = 17,
  60. type_class = 18,
  61. type_array = 19,
  62. type_table = 20,
  63. type_set = 21,
  64. type_row = 22,
  65. type_groupedtable = 23,
  66. type_void = 24,
  67. type_alien = 25,
  68. type_swapint = 26,
  69. type_none = 27,
  70. type_packedint = 28,
  71. type_unused5 = 29,
  72. type_qstring = 30,
  73. type_unicode = 31,
  74. type_any = 32,
  75. type_varunicode = 33,
  76. type_pattern = 34,
  77. type_rule = 35,
  78. type_token = 36,
  79. type_feature = 37,
  80. type_event = 38,
  81. type_null = 39, // not the same as type_void, which should be reserved for actions.
  82. type_scope = 40,
  83. type_utf8 = 41,
  84. type_transform = 42,
  85. type_ifblock = 43, // not a real type -but used for the rtlfield serialization
  86. type_function = 44,
  87. type_sortlist = 45,
  88. type_dictionary = 46,
  89. type_max,
  90. type_modifier = 0xff, // used by getKind()
  91. type_unsigned = 0x100, // combined with some of the above, when returning summary type information. Not returned by getTypeCode()
  92. type_ebcdic = 0x200, // combined with some of the above, when returning summary type information. Not returned by getTypeCode()
  93. //Some pseudo types - never actually created
  94. type_stringorunicode= 0xfc, // any string/unicode variant
  95. type_numeric = 0xfd,
  96. type_scalar = 0xfe,
  97. };
  98. enum typemod_t
  99. {
  100. typemod_none = 0,
  101. typemod_const = 1,
  102. typemod_ref = 2,
  103. typemod_wrapper = 3,
  104. typemod_builder = 4,
  105. typemod_original = 5,
  106. typemod_member = 6,
  107. typemod_serialized = 7,
  108. typemod_outofline = 8,
  109. typemod_attr = 9,
  110. typemod_indirect = 10, // type definition needs to go via an ecl definition
  111. typemod_mutable = 11,
  112. typemod_max
  113. };
  114. #define INFINITE_LENGTH 0xFFFFFFF0
  115. #define UNKNOWN_LENGTH 0xFFFFFFF1
  116. typedef enum type_vals type_t;
  117. //MORE: Something like this should replace caseSensitive for strings...
  118. interface ICollationInfo;
  119. interface ICharsetInfo : public serializable
  120. {
  121. public:
  122. virtual IAtom * queryName() = 0;
  123. virtual ICollationInfo * queryDefaultCollation() = 0;
  124. virtual unsigned char queryFillChar() = 0;
  125. virtual char const * queryCodepageName() = 0;
  126. };
  127. interface ICollationInfo : public serializable
  128. {
  129. public:
  130. virtual IAtom * queryName() = 0;
  131. virtual ICharsetInfo * getCharset() = 0;
  132. virtual int compare(const char * left, const char * right, unsigned len) = 0;
  133. virtual const char * getCompareName(bool varLength) = 0;
  134. };
  135. interface ITranslationInfo : public IInterface
  136. {
  137. public:
  138. virtual IAtom * queryName() = 0;
  139. virtual const char * queryRtlFunction() = 0;
  140. virtual const char * queryVarRtlFunction() = 0;
  141. virtual ICharsetInfo * querySourceCharset() = 0;
  142. virtual ICharsetInfo * queryTargetCharset() = 0;
  143. virtual StringBuffer & translate(StringBuffer & tgt, unsigned len, const char * src) = 0;
  144. };
  145. interface IValue;
  146. interface ITypeInfo : public serializable
  147. {
  148. public:
  149. virtual type_t getTypeCode() const = 0;
  150. virtual size32_t getSize() = 0;
  151. virtual unsigned getAlignment() = 0;
  152. virtual unsigned getBitSize() = 0;
  153. virtual unsigned getPrecision() = 0;
  154. virtual unsigned getStringLen() = 0;
  155. virtual unsigned getDigits() = 0;
  156. virtual bool assignableFrom(ITypeInfo * source) = 0;
  157. virtual IValue * castFrom(bool isSignedValue, __int64 value) = 0;
  158. virtual IValue * castFrom(double value) = 0;
  159. virtual IValue * castFrom(size32_t len, const char * text) = 0;
  160. virtual IValue * castFrom(size32_t len, const UChar * text) = 0;
  161. virtual StringBuffer &getECLType(StringBuffer & out) = 0;
  162. virtual StringBuffer &getDescriptiveType(StringBuffer & out) = 0;
  163. virtual const char *queryTypeName() = 0;
  164. virtual unsigned getCardinality() = 0;
  165. virtual bool isInteger() = 0;
  166. virtual bool isReference() = 0;
  167. virtual bool isScalar() = 0;
  168. virtual bool isSigned() = 0;
  169. virtual bool isSwappedEndian() = 0;
  170. virtual ITypeInfo * queryChildType() = 0;
  171. virtual ICharsetInfo * queryCharset() = 0;
  172. virtual ICollationInfo * queryCollation() = 0;
  173. virtual IAtom * queryLocale() = 0;
  174. virtual ITypeInfo * queryPromotedType() = 0;
  175. virtual ITypeInfo * queryTypeBase() = 0;
  176. virtual unsigned getCrc() = 0; // must be run independant.
  177. virtual typemod_t queryModifier() = 0;
  178. virtual IInterface * queryModifierExtra() = 0;
  179. virtual IHqlExpression * castToExpression() = 0; // Here to avoid dynamic casts
  180. virtual IHqlScope * castToScope() = 0;
  181. inline bool isBoolean() const { return getTypeCode() == type_boolean; }
  182. inline bool isUnsignedNumeric() { return (isInteger() || getTypeCode()==type_decimal) && !isSigned(); }
  183. private:
  184. inline IValue * castFrom(__int64 value) { return NULL; }
  185. };
  186. interface IFunctionTypeExtra : public IInterface
  187. {
  188. virtual IInterface * queryParameters() const = 0;
  189. virtual IInterface * queryDefaults() const = 0;
  190. virtual IInterface * queryAttributes() const = 0;
  191. };
  192. interface IEnumeratedTypeBuilder : public IInterface
  193. {
  194. public:
  195. virtual ITypeInfo *getTypeInfo() = 0;
  196. virtual int addValue(IValue *val, size32_t frequency) = 0;
  197. };
  198. extern DEFTYPE_API ITypeInfo *makeStringType(unsigned size, ICharsetInfo * _charset = NULL, ICollationInfo * _collation = NULL);
  199. extern DEFTYPE_API ITypeInfo *makeVarStringType(unsigned size, ICharsetInfo * _charset = NULL, ICollationInfo * _collation = NULL); //NB: size is numchars+1
  200. extern DEFTYPE_API ITypeInfo *makeQStringType(int len);
  201. extern DEFTYPE_API ITypeInfo *makeUnicodeType(unsigned len, IAtom * locale); // takes length in UChars, i.e. bytes/2 if known; locale is like fr_BE_EURO, or 0 for default
  202. extern DEFTYPE_API ITypeInfo *makeVarUnicodeType(unsigned len, IAtom * locale); // takes length in UChars + 1, i.e. bytes/2 + 1 if known; locale is like fr_BE_EURO, or 0 for default
  203. extern DEFTYPE_API ITypeInfo *makeUtf8Type(unsigned len, IAtom * locale); // takes length in UChars, i.e. bytes/4 if known; locale is like fr_BE_EURO, or 0 for default
  204. extern DEFTYPE_API ITypeInfo *makeCharType(bool caseSensitive = false);
  205. extern DEFTYPE_API ITypeInfo *makeIntType(int size, bool isSigned);
  206. extern DEFTYPE_API ITypeInfo *makeSwapIntType(int size, bool isSigned);
  207. extern DEFTYPE_API ITypeInfo *makePackedIntType(ITypeInfo * basetype);
  208. extern DEFTYPE_API ITypeInfo *makePackedIntType(int size, bool isSigned);
  209. extern DEFTYPE_API ITypeInfo *makeRealType(int size);
  210. extern DEFTYPE_API ITypeInfo *makeDataType(int size);
  211. extern DEFTYPE_API ITypeInfo *makeBitfieldType(int sizeInBits, ITypeInfo * basetype = NULL);
  212. extern DEFTYPE_API ITypeInfo *makeBoolType();
  213. extern DEFTYPE_API ITypeInfo *makeBlobType();
  214. extern DEFTYPE_API ITypeInfo *makeRecordType(); // not used by any IHqlExpressions
  215. extern DEFTYPE_API ITypeInfo *makeVoidType();
  216. extern DEFTYPE_API ITypeInfo *makeNullType();
  217. extern DEFTYPE_API ITypeInfo *makeEventType();
  218. extern DEFTYPE_API ITypeInfo *makeAnyType();
  219. extern DEFTYPE_API ITypeInfo *makeType(type_t type, int size);
  220. extern DEFTYPE_API IEnumeratedTypeBuilder *makeEnumeratedTypeBuilder(ITypeInfo *base, aindex_t numvalues);
  221. extern DEFTYPE_API ITypeInfo *makeDecimalType(unsigned digits, unsigned prec, bool isSigned);
  222. extern DEFTYPE_API ITypeInfo *makeDictionaryType(ITypeInfo *basetype);
  223. extern DEFTYPE_API ITypeInfo *makeTableType(ITypeInfo *basetype);
  224. extern DEFTYPE_API ITypeInfo *makeGroupedTableType(ITypeInfo *basetype);
  225. extern DEFTYPE_API ITypeInfo *makeRowType(ITypeInfo *basetype);
  226. extern DEFTYPE_API ITypeInfo *makeSetType(ITypeInfo *basetype);
  227. extern DEFTYPE_API ITypeInfo *makeTransformType(ITypeInfo *basetype);
  228. extern DEFTYPE_API ITypeInfo *makeSortListType(ITypeInfo *basetype);
  229. extern DEFTYPE_API ITypeInfo *makeFunctionType(ITypeInfo *basetype, IInterface * args, IInterface * defaults, IInterface * attrs);
  230. extern DEFTYPE_API ITypeInfo * makePointerType(ITypeInfo * basetype);
  231. extern DEFTYPE_API ITypeInfo * makeArrayType(ITypeInfo * basetype, unsigned size=0);
  232. extern DEFTYPE_API ITypeInfo * makeClassType(const char * className);
  233. extern DEFTYPE_API ITypeInfo * makeConstantModifier(ITypeInfo * basetype);
  234. extern DEFTYPE_API ITypeInfo * makeReferenceModifier(ITypeInfo * basetype);
  235. extern DEFTYPE_API ITypeInfo * makeWrapperModifier(ITypeInfo * basetype);
  236. extern DEFTYPE_API ITypeInfo * makeModifier(ITypeInfo * basetype, typemod_t modifier, IInterface * extra=NULL);
  237. extern DEFTYPE_API ITypeInfo * makePatternType();
  238. extern DEFTYPE_API ITypeInfo * makeRuleType(ITypeInfo * attrType);
  239. extern DEFTYPE_API ITypeInfo * makeTokenType();
  240. extern DEFTYPE_API ITypeInfo * makeFeatureType();
  241. inline ITypeInfo * makeOutOfLineModifier(ITypeInfo * basetype) { return makeModifier(basetype, typemod_outofline); }
  242. inline ITypeInfo * makeOriginalModifier(ITypeInfo * basetype, IInterface * extra) { return makeModifier(basetype, typemod_original, extra); }
  243. inline ITypeInfo * makeAttributeModifier(ITypeInfo * basetype, IInterface * extra) { return makeModifier(basetype, typemod_attr, extra); }
  244. extern DEFTYPE_API MemoryBuffer & appendBufferFromMem(MemoryBuffer & mem, ITypeInfo * type, const void * data);
  245. extern DEFTYPE_API void ClearTypeCache();
  246. extern DEFTYPE_API ICharsetInfo * getCharset(IAtom * charset);
  247. extern DEFTYPE_API ICollationInfo * getCollation(IAtom * collation);
  248. extern DEFTYPE_API ITranslationInfo * getDefaultTranslation(ICharsetInfo * tgt, ICharsetInfo * src);
  249. extern DEFTYPE_API ITranslationInfo * queryDefaultTranslation(ICharsetInfo * tgt, ICharsetInfo * src);
  250. extern DEFTYPE_API bool isAscii(ITypeInfo * type);
  251. //---------------------------------------------------------------------------
  252. extern DEFTYPE_API ITypeInfo * getStretchedType(unsigned newLen, ITypeInfo * type);
  253. extern DEFTYPE_API ITypeInfo * getMaxLengthType(ITypeInfo * type);
  254. extern DEFTYPE_API ITypeInfo * getNumericType(ITypeInfo * type);
  255. extern DEFTYPE_API ITypeInfo * getStringType(ITypeInfo * type);
  256. extern DEFTYPE_API ITypeInfo * getVarStringType(ITypeInfo * type);
  257. extern DEFTYPE_API ITypeInfo * getPromotedType(ITypeInfo * l_type, ITypeInfo * r_type);
  258. extern DEFTYPE_API ITypeInfo * getPromotedAddSubType(ITypeInfo * l_type, ITypeInfo * r_type);
  259. extern DEFTYPE_API ITypeInfo * getPromotedMulDivType(ITypeInfo * l_type, ITypeInfo * r_type);
  260. extern DEFTYPE_API ITypeInfo * getPromotedDivType(ITypeInfo * l_type, ITypeInfo * r_type);
  261. extern DEFTYPE_API ITypeInfo * getPromotedNumericType(ITypeInfo * l_type, ITypeInfo * r_type);
  262. extern DEFTYPE_API unsigned getClarionResultType(ITypeInfo *type);
  263. extern DEFTYPE_API ITypeInfo * getAsciiType(ITypeInfo * type);
  264. extern DEFTYPE_API ITypeInfo * getBandType(ITypeInfo * type1, ITypeInfo * type2);
  265. extern DEFTYPE_API ITypeInfo * getBorType(ITypeInfo * type1, ITypeInfo * type2);
  266. extern DEFTYPE_API bool haveCommonLocale(ITypeInfo * type1, ITypeInfo * type2);
  267. extern DEFTYPE_API IAtom * getCommonLocale(ITypeInfo * type1, ITypeInfo * type2);
  268. extern DEFTYPE_API ITypeInfo * getPromotedCompareType(ITypeInfo * left, ITypeInfo * right);
  269. extern DEFTYPE_API bool isNumericType(ITypeInfo * type);
  270. extern DEFTYPE_API bool isStringType(ITypeInfo * type);
  271. extern DEFTYPE_API bool isSimpleStringType(ITypeInfo * type);
  272. extern DEFTYPE_API bool isIntegralType(ITypeInfo * type);
  273. extern DEFTYPE_API bool isPatternType(ITypeInfo * type);
  274. extern DEFTYPE_API bool isUnicodeType(ITypeInfo * type);
  275. extern DEFTYPE_API bool isLittleEndian(ITypeInfo * type);
  276. extern DEFTYPE_API bool isDatasetType(ITypeInfo * type);
  277. extern DEFTYPE_API bool isSingleValuedType(ITypeInfo * type);
  278. inline bool isFixedSize(ITypeInfo * type) { return type && (type->getSize() != UNKNOWN_LENGTH); }
  279. inline bool isUnknownSize(ITypeInfo * type) { return type && (type->getSize() == UNKNOWN_LENGTH); }
  280. inline bool isAnyType(ITypeInfo * type) { return type && (type->getTypeCode() == type_any); }
  281. inline bool isDecimalType(ITypeInfo * type) { return type && (type->getTypeCode() == type_decimal); }
  282. inline bool isDictionaryType(ITypeInfo * type) { return type && (type->getTypeCode() == type_dictionary); }
  283. //If casting a value from type before to type after is the value preserved.
  284. //If the value is not preserved then it means more than one source value can match a target value.
  285. extern DEFTYPE_API bool preservesValue(ITypeInfo * after, ITypeInfo * before);
  286. extern DEFTYPE_API bool preservesOrder(ITypeInfo * after, ITypeInfo * before);
  287. // not quite the same as !preservesValue() since cast between integers of the same size are ok
  288. // if it loses information then multiple before can may to the same after
  289. extern DEFTYPE_API bool castLosesInformation(ITypeInfo * after, ITypeInfo * before);
  290. extern DEFTYPE_API ICharsetInfo * deserializeCharsetInfo(MemoryBuffer &src);
  291. extern DEFTYPE_API ICollationInfo * deserializeCollationInfo(MemoryBuffer &src);
  292. extern DEFTYPE_API ITypeInfo * deserializeType(MemoryBuffer &src);
  293. extern DEFTYPE_API void serializeType(MemoryBuffer &src, ITypeInfo * type);
  294. extern DEFTYPE_API bool getNormalizedLocaleName(unsigned len, char const * str, StringBuffer & buff);
  295. extern DEFTYPE_API bool isSameBasicType(ITypeInfo * left, ITypeInfo * right);
  296. extern DEFTYPE_API ITypeInfo * queryRecordType(ITypeInfo * t);
  297. extern DEFTYPE_API ITypeInfo * queryRowType(ITypeInfo * t);
  298. extern DEFTYPE_API ITypeInfo * queryUnqualifiedType(ITypeInfo * t);
  299. extern DEFTYPE_API ITypeInfo * getFullyUnqualifiedType(ITypeInfo * t);
  300. extern DEFTYPE_API ITypeInfo * removeModifier(ITypeInfo * t, typemod_t modifier); // don't link inputs
  301. extern DEFTYPE_API ITypeInfo * cloneModifier(ITypeInfo * donorType, ITypeInfo * srcType); // don't link inputs
  302. extern DEFTYPE_API ITypeInfo * cloneModifiers(ITypeInfo * donorType, ITypeInfo * srcType); // don't link inputs
  303. extern DEFTYPE_API bool hasModifier(ITypeInfo * t, typemod_t modifier);
  304. extern DEFTYPE_API ITypeInfo * queryModifier(ITypeInfo * t, typemod_t modifier);
  305. extern DEFTYPE_API ITypeInfo * replaceChildType(ITypeInfo * type, ITypeInfo * newChild);
  306. extern DEFTYPE_API ITypeInfo * getRoundType(ITypeInfo * type);
  307. extern DEFTYPE_API ITypeInfo * getRoundToType(ITypeInfo * type);
  308. extern DEFTYPE_API ITypeInfo * getTruncType(ITypeInfo * type);
  309. inline bool hasConstModifier(ITypeInfo * t) { return hasModifier(t, typemod_const); }
  310. inline bool hasReferenceModifier(ITypeInfo * t) { return hasModifier(t, typemod_ref); }
  311. inline bool hasWrapperModifier(ITypeInfo * t) { return hasModifier(t, typemod_wrapper); }
  312. inline bool hasOutOfLineModifier(ITypeInfo * t) { return hasModifier(t, typemod_outofline); }
  313. inline bool sameUnqualifiedType(ITypeInfo * t1, ITypeInfo * t2) { return queryUnqualifiedType(t1) == queryUnqualifiedType(t2); }
  314. inline ITypeInfo * stripFunctionType(ITypeInfo * type)
  315. {
  316. if (type->getTypeCode() == type_function)
  317. return type->queryChildType();
  318. return type;
  319. }
  320. typedef Linked<ITypeInfo> TypeInfoAttr;
  321. typedef Owned<ITypeInfo> OwnedITypeInfo;
  322. typedef IArrayOf<ITypeInfo> TypeInfoArray;
  323. interface ISchemaBuilder
  324. {
  325. public:
  326. virtual void addField(const char * name, ITypeInfo & type, bool keyed) = 0;
  327. virtual void addSetField(const char * name, const char * itemname, ITypeInfo & type) = 0;
  328. virtual void beginIfBlock() = 0;
  329. virtual bool beginDataset(const char * name, const char * childname, bool hasMixedContent, unsigned *updateMixed) = 0;
  330. virtual void beginRecord(const char * name, bool hasMixedContent, unsigned *updateMixed) = 0;
  331. virtual void updateMixedRecord(unsigned updateToken, bool hasMixedContent) = 0;
  332. virtual void endIfBlock() = 0;
  333. virtual void endDataset(const char * name, const char * childname) = 0;
  334. virtual void endRecord(const char * name) = 0;
  335. virtual bool addSingleFieldDataset(const char * name, const char * childname, ITypeInfo & type) = 0; // return true if supported
  336. };
  337. class DEFTYPE_API XmlSchemaBuilder : public ISchemaBuilder
  338. {
  339. public:
  340. XmlSchemaBuilder(bool _addHeader) { optionalNesting = 0; addHeader = _addHeader; }
  341. virtual void addField(const char * name, ITypeInfo & type, bool keyed);
  342. virtual void addSetField(const char * name, const char * itemname, ITypeInfo & type);
  343. virtual void beginIfBlock() { optionalNesting++; }
  344. virtual bool beginDataset(const char * name, const char * childname, bool hasMixedContent, unsigned *updateMixed);
  345. virtual void beginRecord(const char * name, bool hasMixedContent, unsigned *updateMixed);
  346. virtual void updateMixedRecord(unsigned updateToken, bool hasMixedContent);
  347. virtual void endIfBlock() { optionalNesting--; }
  348. virtual void endDataset(const char * name, const char * childname);
  349. virtual void endRecord(const char * name);
  350. virtual bool addSingleFieldDataset(const char * name, const char * childname, ITypeInfo & type);
  351. void getXml(StringBuffer & results);
  352. void getXml(IStringVal & results);
  353. private:
  354. void addSchemaPrefix(bool hasMixedContent=false);
  355. void addSchemaSuffix();
  356. void clear();
  357. void getXmlTypeName(StringBuffer & xmlType, ITypeInfo & type);
  358. void appendField(StringBuffer &xml, const char * name, ITypeInfo & type, bool keyed);
  359. protected:
  360. StringBuffer xml;
  361. StringBufferArray attributes;
  362. StringBuffer typesXml;
  363. IntArray dataSizes;
  364. IntArray stringSizes;
  365. IntArray decimalSizes;
  366. UnsignedArray nesting;
  367. ICopyArray setTypes;
  368. unsigned optionalNesting;
  369. bool addHeader;
  370. };
  371. #endif