64 template<
typename TValue,
typename TElem =
char,
typename TTraits =
char_traits<TElem> >
107 #ifdef NCBI_COMPILER_MSVC
108 template<
typename TValue,
typename TElem,
class TTraits>
114 template<
typename TInputIt,
typename TOutputIt,
class TFnIf,
class TFnTr>
116 const TFnIf& funcIf,
const TFnTr& funcTransform)
119 if (funcIf(*
first)) {
120 *dest = funcTransform(*
first);
187 string IdName(
void)
const;
197 const string GetVar(
const string&
value,
int collect = 0)
const;
198 bool GetBoolVar(
const string&
value,
bool default_value =
false)
const;
227 void Warning(
const string& mess,
int err_subcode = 0)
const;
499 #define CheckValueType(value, type, name) do{ \
500 if ( dynamic_cast<const type*>(&(value)) == 0 ) { \
501 (value).Warning(name " value expected", 1); return false; \
static map< string, string > sm_ClassToMember
string FileName(void) const
static string GetSourceDataSpecString(void)
void SetInSet(const CUniSequenceDataType *sequence)
void x_SetMemberAndClassName(const string &memberName)
virtual const char * GetDEFKeyword(void) const
void SetEmptyExternalName(bool set)
const CChoiceDataType * GetInChoice(void) const
const list< CMemberFacet > & GetRestrictions(void) const
void SetIsTypeAlias(bool value) const
AutoPtr< CTypeInfo > m_AnyTypeInfo
static bool x_IsSavedName(const string &name)
bool InChoice(void) const
static bool IsXMLDataSpec(void)
EGlobalType GetGlobalType(void) const
const CComments & Comments(void) const
CDataType * ResolveLocal(const string &name) const
void Warning(const string &mess, int err_subcode=0) const
void SetParentClassTo(CClassTypeStrings &code) const
static void x_AddSavedName(const string &name)
const CDataMember * GetDataMember(void) const
CNcbiOstream & PrintASNTag(CNcbiOstream &out) const
CAsnBinaryDefs::TLongTag m_Tag
virtual string GetDefaultString(const CDataValue &value) const
const CDataType * InheritFromType(void) const
int GetSourceLine(void) const
bool IsEnumType(void) const
CDataType(const CDataType &)
bool IsReferenced(void) const
bool HaveModuleName(void) const
CComments & Comments(void)
CAsnBinaryDefs::ETagClass GetTagClass(void) const
void SetRestrictions(const list< CMemberFacet > &c)
void PrintASNTypeComments(CNcbiOstream &out, int indent, int flags=0) const
virtual AutoPtr< CTypeStrings > GetFullCType(void) const
void PrintDTD(CNcbiOstream &out) const
void SetParent(const CDataType *parent, const string &memberName, string xmlName=kEmptyStr)
string LocationString(void) const
virtual bool CheckType(void) const
virtual const CTypeInfo * GetRealTypeInfo(void)
bool IsInChoice(void) const
string GetFullName(void) const
virtual AutoPtr< CTypeStrings > GenerateCode(void) const
const string & GlobalName(void) const
CClassTypeStrings * GetTypeStr(void) const
string ClassName(void) const
ENsQualifiedMode m_NsQualified
const string & GetNamespaceName(void) const
void ForbidVar(const string &var, const string &value)
string DefClassMemberName(void) const
CDataType * ResolveGlobal(const string &name) const
void AllowVar(const string &var, const string &value)
list< const CReferenceDataType * > TReferences
static bool DTDEntitiesEnabled(void)
void SetNsQualified(bool qualified)
virtual const char * GetASNKeyword(void) const
static string GetTagClassString(CAsnBinaryDefs::ETagClass tclass)
const CDataType * GetParentType(void) const
CAsnBinaryDefs::ETagType GetTagType(void) const
virtual void PrintDTDExtra(CNcbiOstream &out) const
virtual bool CheckValue(const CDataValue &value) const =0
const CDataType * m_ParentType
bool IsReference(void) const
virtual void PrintSpecDump(CNcbiOstream &out, int indent) const
static bool sm_EnforcedStdXml
static set< string > sm_SavedNames
const CChoiceDataType * m_Choice
CClassTypeStrings * m_TypeStr
virtual CTypeRef GetTypeInfo(void)
static bool sm_EnableDTDEntities
void SetTagType(CAsnBinaryDefs::ETagType ttype)
void SetTypeStr(CClassTypeStrings *TypeStr) const
void SetTag(CAsnBinaryDefs::TLongTag tag)
const TReferences & GetReferences(void) const
virtual void PrintASN(CNcbiOstream &out, int indent) const =0
virtual TObjectPtr CreateDefault(const CDataValue &value) const =0
static bool GetEnforcedStdXml(void)
const string & GetSourceFileName(void) const
static string GetTagTypeString(CAsnBinaryDefs::ETagType ttype)
void SetSourceLine(int line)
virtual void PrintDTDElement(CNcbiOstream &out, bool contents_only=false) const =0
const CUniSequenceDataType * GetInSet(void) const
bool IsPrimitive(void) const
bool HasExternalName(void) const
void SetDataMember(CDataMember *dm)
CTypeInfo * UpdateModuleName(CTypeInfo *typeInfo) const
const CDataTypeModule * m_Module
bool GetBoolVar(const string &value, bool default_value=false) const
virtual void FixTypeTree(void) const
void PrintDTDTypeComments(CNcbiOstream &out, int indent) const
virtual void PrintXMLSchema(CNcbiOstream &out, int indent, bool contents_only=false) const =0
const CUniSequenceDataType * m_Set
virtual void PrintJSONSchema(CNcbiOstream &out, int indent, list< string > &required, bool contents_only=false) const =0
void SetGlobalType(EGlobalType type)
static set< string, PNocase > sm_AllFileNames
virtual string GetSchemaTypeString(void) const
CAsnBinaryDefs::ETagClass m_TagClass
virtual const CTypeInfo * GetAnyTypeInfo(void)
AutoPtr< TReferences > m_References
void SetInChoice(const CChoiceDataType *choice)
static EDataSpec sm_SourceDataSpec
ENsQualifiedMode IsNsQualified(void) const
const CNamespace & Namespace(void) const
bool IsContainer(void) const
void AddReference(const CReferenceDataType *reference)
virtual CTypeInfo * CreateTypeInfo(void)
void SetIsAlias(bool value)
virtual const CDataType * Resolve(void) const
bool IsNillable(void) const
string GetKeyPrefix(void) const
unique_ptr< CNamespace > m_CachedNamespace
bool IsStdType(void) const
static void EnableDTDEntities(bool enable=true)
virtual void PrintSpecDumpExtra(CNcbiOstream &out, int indent) const
string InheritFromClass(void) const
multimap< string, string > m_ForbidVar
const string GetVar(const string &value, int collect=0) const
CAsnBinaryDefs::TLongTag GetTag(void) const
virtual bool NeedAutoPointer(const CTypeInfo *typeInfo) const
const CDataTypeModule * GetModule(void) const
list< CMemberFacet > m_Restrictions
CDataMember * m_DataMember
static bool IsASNDataSpec(void)
bool IsInUniSeq(void) const
static void SetSourceDataSpec(EDataSpec spec)
string XmlTagName(void) const
AutoPtr< CTypeInfo > m_RealTypeInfo
virtual AutoPtr< CTypeStrings > GetRefCType(void) const
CAsnBinaryDefs::ETagType m_TagType
const string GetAndVerifyVar(const string &value) const
bool IsTypeAlias(void) const
void SetNamespaceName(const string &name)
CDataType & operator=(const CDataType &)
bool IsUniSeq(void) const
virtual string GetSpecKeyword(void) const
static EDataSpec GetSourceDataSpec(void)
static void SetEnforcedStdXml(bool set=true)
const string & GetMemberName(void) const
string IdName(void) const
void SetTagClass(CAsnBinaryDefs::ETagClass tclass)
ESerialFacet GetType(void) const
CMemberFacet(ESerialFacet type, const string &value)
const string & GetValue(void) const
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Dt_ostream_iterator & operator++()
basic_ostream< TElem, TTraits > ostream_type
Dt_ostream_iterator(ostream_type &ostr, const TElem *delim=nullptr, TInserter fnIn=[](ostream_type &out, const TValue &v){ out<< v;})
Dt_ostream_iterator & operator=(const TValue &value)
Dt_ostream_iterator & operator++(int)
output_iterator_tag iterator_category
Dt_ostream_iterator & operator*()
function< void(ostream_type &, const TValue &)> TInserter
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
ENsQualifiedMode
Defines namespace qualification of XML tags.
int64_t Int8
8-byte (64-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
const GenericPointer< typename T::ValueType > T2 value
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Useful/utility classes and methods.
TOutputIt Dt_transform_if(TInputIt first, TInputIt last, TOutputIt dest, const TFnIf &funcIf, const TFnTr &funcTransform)