NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
CClassTypeInfo Class Reference

Search Toolkit Book for CClassTypeInfo

#include <serial/impl/classinfo.hpp>

+ Inheritance diagram for CClassTypeInfo:
+ Collaboration diagram for CClassTypeInfo:

Public Types

typedef list< pair< CMemberId, CTypeRef > > TSubClasses
 
- Public Types inherited from CClassTypeInfoBase
typedef map< TTypeInfo, EMayContainTypeTContainedTypes
 
typedef void(* TPreReadFunction) (TTypeInfo info, TObjectPtr object)
 
typedef void(* TPostReadFunction) (TTypeInfo info, TObjectPtr object)
 
typedef void(* TPreWriteFunction) (TTypeInfo info, TConstObjectPtr object)
 
typedef void(* TPostWriteFunction) (TTypeInfo info, TConstObjectPtr object)
 
typedef set< stringTRegModules
 
typedef set< stringTRegClasses
 
- Public Types inherited from CTypeInfo
enum  EMayContainType { eMayContainType_no , eMayContainType_recursion , eMayContainType_yes }
 
typedef TObjectPtr(* TTypeCreate) (TTypeInfo objectType, CObjectMemoryPool *memoryPool)
 

Public Member Functions

const CItemsInfoGetMembers (void) const
 
const CMemberInfoGetMemberInfo (TMemberIndex index) const
 
const CMemberInfoGetMemberInfo (const CIterator &i) const
 
const CMemberInfoGetMemberInfo (const CTempString &name) const
 
virtual bool IsDefault (TConstObjectPtr object) const override
 Check, whether the object contains default value. More...
 
virtual bool Equals (TConstObjectPtr object1, TConstObjectPtr object2, ESerialRecursionMode how=eRecursive) const override
 Check if both objects contain the same values. More...
 
virtual void SetDefault (TObjectPtr dst) const override
 Set object to default value. More...
 
virtual void Assign (TObjectPtr dst, TConstObjectPtr src, ESerialRecursionMode how=eRecursive) const override
 Set object to copy of another one. More...
 
bool RandomOrder (void) const
 
CClassTypeInfoSetRandomOrder (bool random=true)
 
bool Implicit (void) const
 
CClassTypeInfoSetImplicit (void)
 
bool IsImplicitNonEmpty (void) const
 
void AddSubClass (const CMemberId &id, const CTypeRef &type)
 
void AddSubClass (const char *id, TTypeInfoGetter getter)
 
void AddSubClassNull (const CMemberId &id)
 
void AddSubClassNull (const char *id)
 
const TSubClassesSubClasses (void) const
 
const CClassTypeInfoGetParentClassInfo (void) const
 
void SetParentClass (TTypeInfo parentClass)
 
void SetGlobalHook (const CTempString &member_names, CReadClassMemberHook *hook)
 
const type_info * GetCPlusPlusTypeInfo (TConstObjectPtr object) const
 
- Public Member Functions inherited from CClassTypeInfoBase
virtual ~CClassTypeInfoBase (void)
 
CMemberInfoAddMember (const char *memberId, const void *memberPtr, const CTypeRef &memberType)
 
CMemberInfoAddMember (const CMemberId &memberId, const void *memberPtr, const CTypeRef &memberType)
 
const CItemsInfoGetItems (void) const
 
const CItemInfoGetItemInfo (const string &name) const
 
void AssignItemsTags (void)
 
void DataSpec (EDataSpec spec)
 
const type_info & GetId (void) const
 
void SetPreReadFunction (TPreReadFunction func)
 
void SetPostReadFunction (TPostReadFunction func)
 
void SetPreWriteFunction (TPreWriteFunction func)
 
void SetPostWriteFunction (TPostWriteFunction func)
 
virtual const CObjectGetCObjectPtr (TConstObjectPtr objectPtr) const override
 
virtual EMayContainType GetMayContainType (TTypeInfo type) const override
 
- Public Member Functions inherited from CTypeInfo
virtual ~CTypeInfo (void)
 
ETypeFamily GetTypeFamily (void) const
 
const stringGetName (void) const
 Get name of this type. More...
 
bool HasNamespaceName (void) const
 Check if data type has namespace name. More...
 
const stringGetNamespaceName (void) const
 Get namespace name. More...
 
const CTypeInfoSetNamespaceName (const string &ns_name) const
 Set namespace name. More...
 
const CTypeInfoSetNsQualified (bool qualified) const
 Set namespace 'qualified' property. More...
 
ENsQualifiedMode IsNsQualified (void) const
 Get namespace 'qualified' property. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
void SetNamespacePrefix (const string &ns_prefix) const
 Set namespace prefix. More...
 
virtual const stringGetModuleName (void) const
 Get module name. More...
 
void SetModuleName (const string &name)
 Set module name. More...
 
void SetModuleName (const char *name)
 Set module name. More...
 
size_t GetSize (void) const
 Get size of data object in memory (like sizeof in C) More...
 
TObjectPtr Create (CObjectMemoryPool *memoryPool=0) const
 Create object of this type on heap (can be deleted by operator delete) More...
 
virtual void Delete (TObjectPtr object) const
 Delete object. More...
 
virtual void DeleteExternalObjects (TObjectPtr object) const
 
bool IsCObject (void) const
 Check is this TypeInfo object is kind of CClassTypeInfoBase. More...
 
const CSerialUserOpAsCSerialUserOp (TConstObjectPtr obj) const
 
CSerialUserOpAsCSerialUserOp (TObjectPtr obj) const
 
bool IsInternal (void) const
 Check if this TypeInfo describes internal unnamed type. More...
 
const stringGetInternalName (void) const
 Return internal type access string e.g. Int-fuzz.range. More...
 
const stringGetInternalModuleName (void) const
 Return internal type's owner module name. More...
 
void SetInternalName (const string &name)
 Mark this type as internal. More...
 
const stringGetAccessName (void) const
 Return internal or regular name. More...
 
const stringGetAccessModuleName (void) const
 Return internal or regular module name. More...
 
void ReadData (CObjectIStream &in, TObjectPtr object) const
 
void WriteData (CObjectOStream &out, TConstObjectPtr object) const
 
void CopyData (CObjectStreamCopier &copier) const
 
void SkipData (CObjectIStream &in) const
 
bool MayContainType (TTypeInfo type) const
 
EMayContainType IsOrMayContainType (TTypeInfo type) const
 
void SetGlobalReadHook (CReadObjectHook *hook)
 Set global (for all input streams) read hook. More...
 
void SetLocalReadHook (CObjectIStream &in, CReadObjectHook *hook)
 Set local (for a specific input stream) read hook. More...
 
void ResetGlobalReadHook (void)
 Reset global read hooks. More...
 
void ResetLocalReadHook (CObjectIStream &in)
 Reset local read hook. More...
 
void SetPathReadHook (CObjectIStream *in, const string &path, CReadObjectHook *hook)
 Set local context-specific read hook. More...
 
void SetGlobalWriteHook (CWriteObjectHook *hook)
 Set global (for all input streams) write hook. More...
 
void SetLocalWriteHook (CObjectOStream &out, CWriteObjectHook *hook)
 Set local (for a specific input stream) write hook. More...
 
void ResetGlobalWriteHook (void)
 Reset global write hooks. More...
 
void ResetLocalWriteHook (CObjectOStream &out)
 Reset local write hook. More...
 
void SetPathWriteHook (CObjectOStream *out, const string &path, CWriteObjectHook *hook)
 Set local context-specific write hook. More...
 
void SetLocalSkipHook (CObjectIStream &in, CSkipObjectHook *hook)
 Set local (for a specific input stream) skip hook. More...
 
void ResetLocalSkipHook (CObjectIStream &in)
 Reset local skip hook. More...
 
void SetPathSkipHook (CObjectIStream *in, const string &path, CSkipObjectHook *hook)
 Set local context-specific skip hook. More...
 
void SetGlobalCopyHook (CCopyObjectHook *hook)
 Set global (for all input streams) copy hook. More...
 
void SetLocalCopyHook (CObjectStreamCopier &copier, CCopyObjectHook *hook)
 Set local (for a specific input stream) copy hook. More...
 
void ResetGlobalCopyHook (void)
 Reset global copy hooks. More...
 
void ResetLocalCopyHook (CObjectStreamCopier &copier)
 Reset local copy hook. More...
 
void SetPathCopyHook (CObjectStreamCopier *copier, const string &path, CCopyObjectHook *hook)
 Set local context-specific copy hook. More...
 
void DefaultReadData (CObjectIStream &in, TObjectPtr object) const
 
void DefaultWriteData (CObjectOStream &out, TConstObjectPtr object) const
 
void DefaultCopyData (CObjectStreamCopier &copier) const
 
void DefaultSkipData (CObjectIStream &in) const
 
CTypeInfoSetTagType (CAsnBinaryDefs::ETagType ttype)
 
CAsnBinaryDefs::ETagType GetTagType (void) const
 
bool IsTagImplicit (void) const
 
virtual CTypeInfoSetTag (CAsnBinaryDefs::TLongTag tag, CAsnBinaryDefs::ETagClass tagclass=CAsnBinaryDefs::eUniversal, CAsnBinaryDefs::ETagType tagtype=CAsnBinaryDefs::eAutomatic)
 
CAsnBinaryDefs::TLongTag GetTag (void) const
 
bool HasTag (void) const
 
CAsnBinaryDefs::ETagClass GetTagClass (void) const
 
CAsnBinaryDefs::ETagConstructed GetTagConstructed (void) const
 
bool IsTagConstructed (void) const
 
void CodeVersion (size_t codever)
 
size_t GetCodeVersion (void) const
 
void DataSpec (EDataSpec spec)
 
EDataSpec GetDataSpec (void) const
 
void CopyInfoItem (TTypeInfo other)
 

Protected Types

enum  EClassType { eSequential , eRandom , eImplicit }
 
typedef const type_info *(* TGetTypeIdFunction) (TConstObjectPtr object)
 
- Protected Types inherited from CTypeInfo
enum  { eNoExplicitTag = -1 }
 

Protected Member Functions

 CClassTypeInfo (size_t size, const char *name, const void *nonCObject, TTypeCreate createFunc, const type_info &ti, TGetTypeIdFunction idFunc)
 
 CClassTypeInfo (size_t size, const char *name, const CObject *cObject, TTypeCreate createFunc, const type_info &ti, TGetTypeIdFunction idFunc)
 
 CClassTypeInfo (size_t size, const string &name, const void *nonCObject, TTypeCreate createFunc, const type_info &ti, TGetTypeIdFunction idFunc)
 
 CClassTypeInfo (size_t size, const string &name, const CObject *cObject, TTypeCreate createFunc, const type_info &ti, TGetTypeIdFunction idFunc)
 
void AssignMemberDefault (TObjectPtr object, const CMemberInfo *info) const
 
void AssignMemberDefault (TObjectPtr object, TMemberIndex index) const
 
virtual bool IsType (TTypeInfo typeInfo) const override
 
virtual bool IsParentClassOf (const CClassTypeInfo *classInfo) const override
 
virtual EMayContainType CalcMayContainType (TTypeInfo typeInfo) const override
 
virtual TTypeInfo GetRealTypeInfo (TConstObjectPtr object) const override
 
void RegisterSubClasses (void) const
 
- Protected Member Functions inherited from CClassTypeInfoBase
 CClassTypeInfoBase (ETypeFamily typeFamily, size_t size, const char *name, const void *nonCObject, TTypeCreate createFunc, const type_info &ti)
 
 CClassTypeInfoBase (ETypeFamily typeFamily, size_t size, const char *name, const CObject *cObject, TTypeCreate createFunc, const type_info &ti)
 
 CClassTypeInfoBase (ETypeFamily typeFamily, size_t size, const string &name, const void *nonCObject, TTypeCreate createFunc, const type_info &ti)
 
 CClassTypeInfoBase (ETypeFamily typeFamily, size_t size, const string &name, const CObject *cObject, TTypeCreate createFunc, const type_info &ti)
 
CItemsInfoGetItems (void)
 
- Protected Member Functions inherited from CTypeInfo
 CTypeInfo (ETypeFamily typeFamily, size_t size)
 
 CTypeInfo (ETypeFamily typeFamily, size_t size, const char *name)
 
 CTypeInfo (ETypeFamily typeFamily, size_t size, const string &name)
 
void SetCreateFunction (TTypeCreate func)
 
void SetReadFunction (TTypeReadFunction func)
 
TTypeReadFunction GetReadFunction (void) const
 
void SetWriteFunction (TTypeWriteFunction func)
 
void SetCopyFunction (TTypeCopyFunction func)
 
void SetSkipFunction (TTypeSkipFunction func)
 

Private Types

typedef CClassTypeInfoBase CParent
 

Private Member Functions

void InitClassTypeInfo (void)
 
const CMemberInfoGetImplicitMember (void) const
 
void UpdateFunctions (void)
 

Static Private Member Functions

static void ReadClassSequential (CObjectIStream &in, TTypeInfo objectType, TObjectPtr objectPtr)
 
static void ReadClassRandom (CObjectIStream &in, TTypeInfo objectType, TObjectPtr objectPtr)
 
static void ReadImplicitMember (CObjectIStream &in, TTypeInfo objectType, TObjectPtr objectPtr)
 
static void WriteClassRandom (CObjectOStream &out, TTypeInfo objectType, TConstObjectPtr objectPtr)
 
static void WriteClassSequential (CObjectOStream &out, TTypeInfo objectType, TConstObjectPtr objectPtr)
 
static void WriteImplicitMember (CObjectOStream &out, TTypeInfo objectType, TConstObjectPtr objectPtr)
 
static void SkipClassSequential (CObjectIStream &in, TTypeInfo objectType)
 
static void SkipClassRandom (CObjectIStream &in, TTypeInfo objectType)
 
static void SkipImplicitMember (CObjectIStream &in, TTypeInfo objectType)
 
static void CopyClassSequential (CObjectStreamCopier &copier, TTypeInfo objectType)
 
static void CopyClassRandom (CObjectStreamCopier &copier, TTypeInfo objectType)
 
static void CopyImplicitMember (CObjectStreamCopier &copier, TTypeInfo objectType)
 

Private Attributes

EClassType m_ClassType
 
const CClassTypeInfom_ParentClassInfo
 
unique_ptr< TSubClassesm_SubClasses
 
TGetTypeIdFunction m_GetTypeIdFunction
 

Friends

class CClassInfoHelperBase
 

Additional Inherited Members

- Static Public Member Functions inherited from CClassTypeInfoBase
static TTypeInfo GetClassInfoByName (const string &name)
 
static TTypeInfo GetClassInfoById (const type_info &id)
 
static void RegisterModule (const string &module)
 
static void GetRegisteredModuleNames (TRegModules &modules)
 
static void GetRegisteredClassNames (const string &module, TRegClasses &names)
 
- Protected Attributes inherited from CTypeInfo
bool m_IsCObject
 
bool m_IsInternal
 
CAsnBinaryDefs::TLongTag m_Tag
 
CAsnBinaryDefs::ETagClass m_TagClass
 
CAsnBinaryDefs::ETagType m_TagType
 
CAsnBinaryDefs::ETagConstructed m_TagConstructed
 
atomic< ETriStatem_CSerialUserOp
 

Detailed Description

Definition at line 58 of file classinfo.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:42 2024 by modify_doxy.py rev. 669887