NCBI C++ ToolKit
type.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef TYPE_HPP
2 #define TYPE_HPP
3 
4 /* $Id: type.hpp 94709 2021-09-01 16:40:57Z gouriano $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Author: Eugene Vasilchenko
30 *
31 * File Description:
32 * Type definition
33 *
34 */
35 
36 #include <corelib/ncbistd.hpp>
37 #include <corelib/ncbistre.hpp>
38 #include <corelib/ncbiutil.hpp>
39 #include <serial/impl/typeref.hpp>
41 #include "comments.hpp"
42 #include <list>
43 #include <set>
44 #include <functional>
45 
47 
48 class CTypeInfo;
49 class CDataType;
50 class CDataTypeModule;
51 class CDataValue;
52 class CChoiceDataType;
54 class CReferenceDataType;
55 class CTypeStrings;
56 class CFileCode;
57 class CClassTypeStrings;
58 class CNamespace;
59 class CDataMember;
60 
61 /////////////////////////////////////////////////////////////////////////////
62 // ostream_iterator with corrected delimiter and inserter
63 
64 template<typename TValue, typename TElem = char, typename TTraits = char_traits<TElem> >
66 {
67 public:
68  using iterator_category = output_iterator_tag;
69  typedef void value_type;
70  typedef void difference_type;
71  typedef void pointer;
72  typedef void reference;
73  typedef TElem char_type;
74  typedef TTraits traits_type;
75  typedef basic_ostream<TElem, TTraits> ostream_type;
76  typedef function<void(ostream_type&, const TValue&)> TInserter;
77 
78  Dt_ostream_iterator(ostream_type& ostr, const TElem *delim = nullptr,
79  TInserter fnIn = [](ostream_type& out, const TValue& v){ out << v;})
80  : m_ostr(&ostr), m_delim(delim), m_fnIn(fnIn), m_first(true) {
81  }
83  if (!m_first && m_delim != nullptr) {
84  *m_ostr << m_delim;
85  }
86  m_fnIn(*m_ostr, value);
87  m_first = false;
88  return *this;
89  }
91  return *this;
92  }
94  return *this;
95  }
97  return *this;
98  }
99 protected:
101  const TElem *m_delim;
103  bool m_first;
104 };
105 
106 // mark Dt_ostream_iterator as checked
107 #ifdef NCBI_COMPILER_MSVC
108 template<typename TValue, typename TElem, class TTraits>
109 struct _Is_checked_helper<Dt_ostream_iterator<TValue, TElem, TTraits> >
110  : public true_type {
111 };
112 #endif
113 
114 template<typename TInputIt, typename TOutputIt, class TFnIf, class TFnTr>
115 TOutputIt Dt_transform_if(TInputIt first, TInputIt last, TOutputIt dest,
116  const TFnIf& funcIf, const TFnTr& funcTransform)
117 {
118  for (; first != last; ++first, (void)++dest) {
119  if (funcIf(*first)) {
120  *dest = funcTransform(*first);
121  }
122  }
123  return (dest);
124 }
125 /////////////////////////////////////////////////////////////////////////////
127 {
128 public:
130  : m_Type(type), m_Value(value) {
131  }
132  ESerialFacet GetType(void) const {
133  return m_Type;
134  }
135  const string& GetValue(void) const {
136  return m_Value;
137  }
138 private:
140  string m_Value;
141 };
142 
143 
144 struct AnyType {
145  union {
149  };
150  AnyType(void)
151  {
152  pointerValue = 0;
153  }
154 };
155 
156 class CDataType {
157 public:
158  typedef void* TObjectPtr;
159  typedef list<const CReferenceDataType*> TReferences;
160 
161  CDataType(void);
162  virtual ~CDataType(void);
163 
164  const CDataType* GetParentType(void) const
165  {
166  return m_ParentType;
167  }
168  const CDataTypeModule* GetModule(void) const
169  {
170  _ASSERT(m_Module != 0);
171  return m_Module;
172  }
173  bool HaveModuleName(void) const
174  {
175  return m_ParentType == 0;
176  }
177 
178  const string& GetSourceFileName(void) const;
179  int GetSourceLine(void) const
180  {
181  return m_SourceLine;
182  }
183  void SetSourceLine(int line);
184  string LocationString(void) const;
185 
186  string GetKeyPrefix(void) const;
187  string IdName(void) const;
188  string XmlTagName(void) const;
189  const string& GlobalName(void) const; // name of type or empty
190  bool Skipped(void) const;
191  string DefClassMemberName(void) const;
192  string ClassName(void) const;
193  string FileName(void) const;
194  const CNamespace& Namespace(void) const;
195  string InheritFromClass(void) const;
196  const CDataType* InheritFromType(void) const;
197  const string GetVar(const string& value, int collect = 0) const;
198  bool GetBoolVar(const string& value, bool default_value = false) const;
199  void ForbidVar(const string& var, const string& value);
200  void AllowVar(const string& var, const string& value);
201  const string GetAndVerifyVar(const string& value) const;
202 
203  bool InChoice(void) const;
204 
205  void PrintASNTypeComments(CNcbiOstream& out, int indent, int flags=0) const;
206  void PrintDTDTypeComments(CNcbiOstream& out, int indent) const;
207  virtual void PrintASN(CNcbiOstream& out, int indent) const = 0;
208  virtual void PrintSpecDump(CNcbiOstream& out, int indent) const;
209  virtual void PrintSpecDumpExtra(CNcbiOstream& out, int indent) const;
210  virtual void PrintJSONSchema(CNcbiOstream& out, int indent, list<string>& required, bool contents_only=false) const = 0;
211  virtual void PrintXMLSchema(CNcbiOstream& out, int indent, bool contents_only=false) const = 0;
212  virtual const char* GetASNKeyword(void) const;
213  virtual string GetSpecKeyword(void) const;
214  virtual string GetSchemaTypeString(void) const;
215  void PrintDTD(CNcbiOstream& out) const;
216  void PrintDTD(CNcbiOstream& out, const CComments& extra) const;
217  virtual void PrintDTDElement(CNcbiOstream& out, bool contents_only=false) const = 0;
218  virtual void PrintDTDExtra(CNcbiOstream& out) const;
219 
220  virtual CTypeRef GetTypeInfo(void);
221  virtual const CTypeInfo* GetAnyTypeInfo(void);
222  virtual bool NeedAutoPointer(const CTypeInfo* typeInfo) const;
223  virtual const CTypeInfo* GetRealTypeInfo(void);
224  virtual CTypeInfo* CreateTypeInfo(void);
225  CTypeInfo* UpdateModuleName(CTypeInfo* typeInfo) const;
226 
227  void Warning(const string& mess, int err_subcode = 0) const;
228 
229  virtual AutoPtr<CTypeStrings> GenerateCode(void) const;
231 
232  virtual AutoPtr<CTypeStrings> GetRefCType(void) const;
233  virtual AutoPtr<CTypeStrings> GetFullCType(void) const;
234  virtual string GetDefaultString(const CDataValue& value) const;
235 
236  virtual const CDataType* Resolve(void) const;
237  virtual CDataType* Resolve(void);
238 
239  // resolve type from global level
240  CDataType* ResolveGlobal(const string& name) const;
241  // resolve type from local level
242  CDataType* ResolveLocal(const string& name) const;
243 
244  bool IsInSet(void) const
245  {
246  return m_Set != 0;
247  }
248  const CUniSequenceDataType* GetInSet(void) const
249  {
250  return m_Set;
251  }
252  void SetInSet(const CUniSequenceDataType* sequence);
253 
254  bool IsInChoice(void) const
255  {
256  return m_Choice != 0;
257  }
258  const CChoiceDataType* GetInChoice(void) const
259  {
260  return m_Choice;
261  }
262  void SetInChoice(const CChoiceDataType* choice);
263 
264  bool IsReferenced(void) const
265  {
266  return m_References;
267  }
268  void AddReference(const CReferenceDataType* reference);
269  const TReferences& GetReferences(void) const
270  {
271  return *m_References;
272  }
273  bool IsInUniSeq(void) const;
274  bool IsUniSeq(void) const;
275  bool IsContainer(void) const;
276  bool IsEnumType(void) const;
277 
278 /*
279  static string GetTemplateHeader(const string& tmpl);
280  static bool IsSimplePointerTemplate(const string& tmpl);
281  static string GetTemplateNamespace(const string& tmpl);
282  static string GetTemplateMacro(const string& tmpl);
283 */
284 
285  void SetParent(const CDataType* parent, const string& memberName, string xmlName=kEmptyStr);
286  void SetParent(const CDataTypeModule* module, const string& typeName);
287  virtual void FixTypeTree(void) const;
288 
289  bool Check(void);
290  virtual bool CheckType(void) const;
291  virtual bool CheckValue(const CDataValue& value) const = 0;
292  virtual TObjectPtr CreateDefault(const CDataValue& value) const = 0;
293 
295  {
296  return m_Comments;
297  }
298  const CComments& Comments(void) const
299  {
300  return m_Comments;
301  }
302 
304  m_DataMember = dm;
305  }
306 
307  const CDataMember* GetDataMember(void) const {
308  return m_DataMember;
309  }
310 
311  enum {
312  eNoExplicitTag = -1
313  };
315  m_Tag = tag;
316  }
317 
319  return m_Tag;
320  }
321 
322  bool HasTag(void) const {
323  return m_Tag != eNoExplicitTag;
324  }
325 
327  m_TagClass = tclass;
328  }
330  return m_TagClass;
331  }
333  m_TagType = ttype;
334  }
336  return m_TagType;
337  }
339  static string GetTagClassString(CAsnBinaryDefs::ETagClass tclass);
340  static string GetTagTypeString(CAsnBinaryDefs::ETagType ttype);
341 
342  void SetTypeStr(CClassTypeStrings* TypeStr) const {
343  m_TypeStr = TypeStr;
344  }
346  return m_TypeStr;
347  }
348 
349  bool IsPrimitive(void) const;
350  bool IsStdType(void) const;
351  bool IsReference(void) const;
352 
353  void SetIsAlias(bool value) {
354  m_IsAlias = value;
355  }
356  bool IsAlias(void) const {
357  return m_IsAlias;
358  }
359  // used when generating code, to provide backward compatibility
360  void SetIsTypeAlias(bool value) const {
362  }
363  bool IsTypeAlias(void) const {
364  return m_IsTypeAlias;
365  }
366 
367  static void EnableDTDEntities(bool enable = true) {
368  sm_EnableDTDEntities = enable;
369  }
370  static bool DTDEntitiesEnabled(void) {
371  return sm_EnableDTDEntities;
372  }
373  static void SetEnforcedStdXml(bool set = true) {
375  }
376  static bool GetEnforcedStdXml(void) {
377  return sm_EnforcedStdXml;
378  }
379  static void SetSourceDataSpec(EDataSpec spec) {
380  sm_SourceDataSpec = spec;
381  }
383  return sm_SourceDataSpec;
384  }
385  static string GetSourceDataSpecString(void);
386  static bool IsASNDataSpec(void) {
388  }
389  static bool IsXMLDataSpec(void) {
391  }
392 
393  virtual const char* GetDEFKeyword(void) const;
394  const string& GetMemberName(void) const
395  {
396  return m_MemberName;
397  }
398 
399  void SetNamespaceName(const string& name)
400  {
401  m_Namespace = name;
402  }
403  const string& GetNamespaceName(void) const
404  {
405  return m_Namespace;
406  }
407  void SetNsQualified(bool qualified)
408  {
409  m_NsQualified = qualified ? eNSQualified : eNSUnqualified;
410  }
412  {
413  return m_NsQualified;
414  }
415  void SetNillable(void)
416  {
417  m_IsNillable = true;
418  }
419  bool IsNillable(void) const
420  {
421  return m_IsNillable;
422  }
423  enum EGlobalType {
424  eElement = 0,
426  eGroup
427  };
429  m_GlobalType = type;
430  }
432  return m_GlobalType;
433  }
436  }
437  bool HasExternalName(void) const {
438  return !m_EmptyExternalName;
439  }
440  string GetFullName(void) const;
441  void SetRestrictions(const list<CMemberFacet>& c) {
442  m_Restrictions = c;
443  }
444  const list<CMemberFacet>& GetRestrictions(void) const {
445  return m_Restrictions;
446  }
447 
448 protected:
449  static bool x_IsSavedName(const string& name);
450  static void x_AddSavedName(const string& name);
451  void x_SetMemberAndClassName(const string& memberName);
452 
453 private:
454  const CDataType* m_ParentType; // parent type
456  string m_MemberName;
457  string m_ClassName;
458  string m_XmlName;
463 
464  // tree info
468 
469  bool m_Checked;
470 
475  mutable string m_CachedFileName;
476  mutable unique_ptr<CNamespace> m_CachedNamespace;
480  bool m_IsAlias;
481  mutable bool m_IsTypeAlias;
483  string m_Namespace;
488  list<CMemberFacet> m_Restrictions;
489 
492  static bool sm_EnableDTDEntities;
493  static bool sm_EnforcedStdXml;
497 };
498 
499 #define CheckValueType(value, type, name) do{ \
500 if ( dynamic_cast<const type*>(&(value)) == 0 ) { \
501  (value).Warning(name " value expected", 1); return false; \
502 } } while(0)
503 
505 
506 #endif
static map< string, string > sm_ClassToMember
Definition: type.hpp:496
string FileName(void) const
Definition: type.cpp:613
static string GetSourceDataSpecString(void)
Definition: type.cpp:961
void SetInSet(const CUniSequenceDataType *sequence)
Definition: type.cpp:256
void x_SetMemberAndClassName(const string &memberName)
Definition: type.cpp:548
virtual const char * GetDEFKeyword(void) const
Definition: type.cpp:956
void SetEmptyExternalName(bool set)
Definition: type.hpp:434
const CChoiceDataType * GetInChoice(void) const
Definition: type.hpp:258
const list< CMemberFacet > & GetRestrictions(void) const
Definition: type.hpp:444
bool m_IsAlias
Definition: type.hpp:480
void SetIsTypeAlias(bool value) const
Definition: type.hpp:360
AutoPtr< CTypeInfo > m_AnyTypeInfo
Definition: type.hpp:472
static bool x_IsSavedName(const string &name)
Definition: type.cpp:943
void SetNillable(void)
Definition: type.hpp:415
bool InChoice(void) const
virtual ~CDataType(void)
Definition: type.cpp:97
static bool IsXMLDataSpec(void)
Definition: type.hpp:389
EGlobalType GetGlobalType(void) const
Definition: type.hpp:431
const CComments & Comments(void) const
Definition: type.hpp:298
CDataType * ResolveLocal(const string &name) const
Definition: type.cpp:713
void Warning(const string &mess, int err_subcode=0) const
Definition: type.cpp:117
void SetParentClassTo(CClassTypeStrings &code) const
Definition: type.cpp:827
static void x_AddSavedName(const string &name)
Definition: type.cpp:949
const CDataMember * GetDataMember(void) const
Definition: type.hpp:307
CNcbiOstream & PrintASNTag(CNcbiOstream &out) const
Definition: type.cpp:123
int m_SourceLine
Definition: type.hpp:459
CAsnBinaryDefs::TLongTag m_Tag
Definition: type.hpp:477
@ eNoExplicitTag
Definition: type.hpp:312
virtual string GetDefaultString(const CDataValue &value) const
Definition: type.cpp:878
const CDataType * InheritFromType(void) const
Definition: type.cpp:695
int GetSourceLine(void) const
Definition: type.hpp:179
bool IsEnumType(void) const
Definition: type.cpp:291
CDataType(const CDataType &)
void * TObjectPtr
Definition: type.hpp:158
EGlobalType m_GlobalType
Definition: type.hpp:486
bool IsReferenced(void) const
Definition: type.hpp:264
bool HaveModuleName(void) const
Definition: type.hpp:173
CComments & Comments(void)
Definition: type.hpp:294
CAsnBinaryDefs::ETagClass GetTagClass(void) const
Definition: type.hpp:329
void SetRestrictions(const list< CMemberFacet > &c)
Definition: type.hpp:441
void PrintASNTypeComments(CNcbiOstream &out, int indent, int flags=0) const
Definition: type.cpp:172
virtual AutoPtr< CTypeStrings > GetFullCType(void) const
Definition: type.cpp:872
CTypeRef m_TypeRef
Definition: type.hpp:471
void PrintDTD(CNcbiOstream &out) const
Definition: type.cpp:217
void SetParent(const CDataType *parent, const string &memberName, string xmlName=kEmptyStr)
Definition: type.cpp:296
string m_XmlName
Definition: type.hpp:458
bool m_IsNillable
Definition: type.hpp:485
string LocationString(void) const
Definition: type.cpp:443
CDataType(void)
Definition: type.cpp:87
EGlobalType
Definition: type.hpp:423
@ eGroup
Definition: type.hpp:426
@ eElement
Definition: type.hpp:424
@ eType
Definition: type.hpp:425
virtual bool CheckType(void) const
Definition: type.cpp:335
virtual const CTypeInfo * GetRealTypeInfo(void)
Definition: type.cpp:770
bool IsInChoice(void) const
Definition: type.hpp:254
string m_CachedFileName
Definition: type.hpp:475
string GetFullName(void) const
Definition: type.cpp:973
virtual AutoPtr< CTypeStrings > GenerateCode(void) const
Definition: type.cpp:793
const string & GlobalName(void) const
Definition: type.cpp:479
CClassTypeStrings * GetTypeStr(void) const
Definition: type.hpp:345
string ClassName(void) const
Definition: type.cpp:582
ENsQualifiedMode m_NsQualified
Definition: type.hpp:484
const string & GetNamespaceName(void) const
Definition: type.hpp:403
void ForbidVar(const string &var, const string &value)
Definition: type.cpp:392
string DefClassMemberName(void) const
Definition: type.cpp:530
CDataType * ResolveGlobal(const string &name) const
Definition: type.cpp:718
void AllowVar(const string &var, const string &value)
Definition: type.cpp:406
list< const CReferenceDataType * > TReferences
Definition: type.hpp:159
static bool DTDEntitiesEnabled(void)
Definition: type.hpp:370
void SetNsQualified(bool qualified)
Definition: type.hpp:407
virtual const char * GetASNKeyword(void) const
Definition: type.cpp:183
static string GetTagClassString(CAsnBinaryDefs::ETagClass tclass)
Definition: type.cpp:147
const CDataType * GetParentType(void) const
Definition: type.hpp:164
CAsnBinaryDefs::ETagType GetTagType(void) const
Definition: type.hpp:335
virtual void PrintDTDExtra(CNcbiOstream &out) const
Definition: type.cpp:252
virtual bool CheckValue(const CDataValue &value) const =0
const CDataType * m_ParentType
Definition: type.hpp:454
bool IsReference(void) const
Definition: type.cpp:938
virtual void PrintSpecDump(CNcbiOstream &out, int indent) const
Definition: type.cpp:188
static bool sm_EnforcedStdXml
Definition: type.hpp:493
static set< string > sm_SavedNames
Definition: type.hpp:495
const CChoiceDataType * m_Choice
Definition: type.hpp:466
CClassTypeStrings * m_TypeStr
Definition: type.hpp:462
virtual CTypeRef GetTypeInfo(void)
Definition: type.cpp:734
static bool sm_EnableDTDEntities
Definition: type.hpp:492
void SetTagType(CAsnBinaryDefs::ETagType ttype)
Definition: type.hpp:332
void SetTypeStr(CClassTypeStrings *TypeStr) const
Definition: type.hpp:342
void SetTag(CAsnBinaryDefs::TLongTag tag)
Definition: type.hpp:314
const TReferences & GetReferences(void) const
Definition: type.hpp:269
CComments m_Comments
Definition: type.hpp:460
bool m_EmptyExternalName
Definition: type.hpp:487
virtual void PrintASN(CNcbiOstream &out, int indent) const =0
virtual TObjectPtr CreateDefault(const CDataValue &value) const =0
string m_Namespace
Definition: type.hpp:483
static bool GetEnforcedStdXml(void)
Definition: type.hpp:376
const string & GetSourceFileName(void) const
Definition: type.cpp:434
static string GetTagTypeString(CAsnBinaryDefs::ETagType ttype)
Definition: type.cpp:160
bool m_IsTypeAlias
Definition: type.hpp:481
void SetSourceLine(int line)
Definition: type.cpp:112
virtual void PrintDTDElement(CNcbiOstream &out, bool contents_only=false) const =0
const CUniSequenceDataType * GetInSet(void) const
Definition: type.hpp:248
bool IsPrimitive(void) const
Definition: type.cpp:884
bool HasExternalName(void) const
Definition: type.hpp:437
void SetDataMember(CDataMember *dm)
Definition: type.hpp:303
CTypeInfo * UpdateModuleName(CTypeInfo *typeInfo) const
Definition: type.cpp:786
const CDataTypeModule * m_Module
Definition: type.hpp:455
bool GetBoolVar(const string &value, bool default_value=false) const
Definition: type.cpp:372
bool Skipped(void) const
Definition: type.cpp:525
virtual void FixTypeTree(void) const
Definition: type.cpp:322
void PrintDTDTypeComments(CNcbiOstream &out, int indent) const
Definition: type.cpp:178
virtual void PrintXMLSchema(CNcbiOstream &out, int indent, bool contents_only=false) const =0
bool Check(void)
Definition: type.cpp:326
const CUniSequenceDataType * m_Set
Definition: type.hpp:465
virtual void PrintJSONSchema(CNcbiOstream &out, int indent, list< string > &required, bool contents_only=false) const =0
void SetGlobalType(EGlobalType type)
Definition: type.hpp:428
static set< string, PNocase > sm_AllFileNames
Definition: type.hpp:474
virtual string GetSchemaTypeString(void) const
Definition: type.cpp:212
CAsnBinaryDefs::ETagClass m_TagClass
Definition: type.hpp:478
virtual const CTypeInfo * GetAnyTypeInfo(void)
Definition: type.cpp:741
AutoPtr< TReferences > m_References
Definition: type.hpp:467
void SetInChoice(const CChoiceDataType *choice)
Definition: type.cpp:262
static EDataSpec sm_SourceDataSpec
Definition: type.hpp:494
ENsQualifiedMode IsNsQualified(void) const
Definition: type.hpp:411
bool m_Checked
Definition: type.hpp:469
const CNamespace & Namespace(void) const
Definition: type.cpp:666
bool IsContainer(void) const
Definition: type.cpp:286
void AddReference(const CReferenceDataType *reference)
Definition: type.cpp:268
virtual CTypeInfo * CreateTypeInfo(void)
Definition: type.cpp:780
void SetIsAlias(bool value)
Definition: type.hpp:353
string m_ClassName
Definition: type.hpp:457
virtual const CDataType * Resolve(void) const
Definition: type.cpp:708
bool IsNillable(void) const
Definition: type.hpp:419
bool IsInSet(void) const
Definition: type.hpp:244
string GetKeyPrefix(void) const
Definition: type.cpp:508
unique_ptr< CNamespace > m_CachedNamespace
Definition: type.hpp:476
bool IsStdType(void) const
Definition: type.cpp:908
static void EnableDTDEntities(bool enable=true)
Definition: type.hpp:367
string m_MemberName
Definition: type.hpp:456
virtual void PrintSpecDumpExtra(CNcbiOstream &out, int indent) const
Definition: type.cpp:203
string InheritFromClass(void) const
Definition: type.cpp:690
multimap< string, string > m_ForbidVar
Definition: type.hpp:482
const string GetVar(const string &value, int collect=0) const
Definition: type.cpp:340
CAsnBinaryDefs::TLongTag GetTag(void) const
Definition: type.hpp:318
virtual bool NeedAutoPointer(const CTypeInfo *typeInfo) const
Definition: type.cpp:765
bool HasTag(void) const
Definition: type.hpp:322
const CDataTypeModule * GetModule(void) const
Definition: type.hpp:168
list< CMemberFacet > m_Restrictions
Definition: type.hpp:488
CDataMember * m_DataMember
Definition: type.hpp:461
static bool IsASNDataSpec(void)
Definition: type.hpp:386
bool IsInUniSeq(void) const
Definition: type.cpp:276
static void SetSourceDataSpec(EDataSpec spec)
Definition: type.hpp:379
string XmlTagName(void) const
Definition: type.cpp:462
AutoPtr< CTypeInfo > m_RealTypeInfo
Definition: type.hpp:473
virtual AutoPtr< CTypeStrings > GetRefCType(void) const
Definition: type.cpp:853
CAsnBinaryDefs::ETagType m_TagType
Definition: type.hpp:479
const string GetAndVerifyVar(const string &value) const
Definition: type.cpp:419
bool IsTypeAlias(void) const
Definition: type.hpp:363
void SetNamespaceName(const string &name)
Definition: type.hpp:399
CDataType & operator=(const CDataType &)
bool IsUniSeq(void) const
Definition: type.cpp:281
virtual string GetSpecKeyword(void) const
Definition: type.cpp:207
static EDataSpec GetSourceDataSpec(void)
Definition: type.hpp:382
bool IsAlias(void) const
Definition: type.hpp:356
static void SetEnforcedStdXml(bool set=true)
Definition: type.hpp:373
const string & GetMemberName(void) const
Definition: type.hpp:394
string IdName(void) const
Definition: type.cpp:449
void SetTagClass(CAsnBinaryDefs::ETagClass tclass)
Definition: type.hpp:326
ESerialFacet m_Type
Definition: type.hpp:139
ESerialFacet GetType(void) const
Definition: type.hpp:132
CMemberFacet(ESerialFacet type, const string &value)
Definition: type.hpp:129
string m_Value
Definition: type.hpp:140
const string & GetValue(void) const
Definition: type.hpp:135
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Definition: typeinfo.hpp:76
const TElem * m_delim
Definition: type.hpp:101
TTraits traits_type
Definition: type.hpp:74
Dt_ostream_iterator & operator++()
Definition: type.hpp:93
ostream_type * m_ostr
Definition: type.hpp:100
basic_ostream< TElem, TTraits > ostream_type
Definition: type.hpp:75
TInserter m_fnIn
Definition: type.hpp:102
Dt_ostream_iterator(ostream_type &ostr, const TElem *delim=nullptr, TInserter fnIn=[](ostream_type &out, const TValue &v){ out<< v;})
Definition: type.hpp:78
void difference_type
Definition: type.hpp:70
Dt_ostream_iterator & operator=(const TValue &value)
Definition: type.hpp:82
Dt_ostream_iterator & operator++(int)
Definition: type.hpp:96
output_iterator_tag iterator_category
Definition: type.hpp:68
Dt_ostream_iterator & operator*()
Definition: type.hpp:90
function< void(ostream_type &, const TValue &)> TInserter
Definition: type.hpp:76
Definition: set.hpp:45
Include a standard set of the NCBI C++ Toolkit most basic headers.
static uch flags
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:51
static int type
Definition: getdata.c:31
ENsQualifiedMode
Defines namespace qualification of XML tags.
Definition: serialdef.hpp:198
ESerialFacet
Definition: serialdef.hpp:212
EDataSpec
Definition: serialdef.hpp:204
@ eNSQualified
Definition: serialdef.hpp:201
@ eNSUnqualified
Definition: serialdef.hpp:200
int64_t Int8
8-byte (64-bit) signed integer
Definition: ncbitype.h:104
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
#define kEmptyStr
Definition: ncbistr.hpp:123
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
const char * tag
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Useful/utility classes and methods.
string indent(" ")
Int8 integerValue
Definition: type.hpp:147
AnyType(void)
Definition: type.hpp:150
bool booleanValue
Definition: type.hpp:146
void * pointerValue
Definition: type.hpp:148
Definition: inftrees.h:24
Definition: type.c:6
#define _ASSERT
TOutputIt Dt_transform_if(TInputIt first, TInputIt last, TOutputIt dest, const TFnIf &funcIf, const TFnTr &funcTransform)
Definition: type.hpp:115
Modified on Fri Sep 20 14:57:44 2024 by modify_doxy.py rev. 669887