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

Search Toolkit Book for CAliasTypeInfo

#include <serial/impl/aliasinfo.hpp>

+ Inheritance diagram for CAliasTypeInfo:
+ Collaboration diagram for CAliasTypeInfo:

Public Member Functions

 CAliasTypeInfo (const string &name, TTypeInfo type)
 
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...
 
virtual void Delete (TObjectPtr object) const override
 Delete object. More...
 
virtual void DeleteExternalObjects (TObjectPtr object) const override
 
virtual const CObjectGetCObjectPtr (TConstObjectPtr objectPtr) const override
 
virtual TTypeInfo GetRealTypeInfo (TConstObjectPtr object) const override
 
virtual bool IsParentClassOf (const CClassTypeInfo *classInfo) const override
 
void SetDataOffset (TPointerOffsetType offset)
 
TObjectPtr GetDataPtr (TObjectPtr objectPtr) const
 
TConstObjectPtr GetDataPtr (TConstObjectPtr objectPtr) const
 
void SetCreateFunction (TTypeCreate func)
 
void SetFullAlias (bool set=true)
 
bool IsFullAlias (void) const
 
- Public Member Functions inherited from CPointerTypeInfo
 CPointerTypeInfo (TTypeInfo type)
 
 CPointerTypeInfo (const CTypeRef &typeRef)
 
 CPointerTypeInfo (size_t size, TTypeInfo type)
 
 CPointerTypeInfo (size_t size, const CTypeRef &typeRef)
 
 CPointerTypeInfo (const string &name, TTypeInfo type)
 
 CPointerTypeInfo (const string &name, size_t size, TTypeInfo type)
 
TTypeInfo GetPointedType (void) const
 
TConstObjectPtr GetObjectPointer (TConstObjectPtr object) const
 
TObjectPtr GetObjectPointer (TObjectPtr object) const
 
void SetObjectPointer (TObjectPtr object, TObjectPtr pointer) const
 
TTypeInfo GetRealDataTypeInfo (TConstObjectPtr object) const
 
virtual EMayContainType GetMayContainType (TTypeInfo type) const override
 
void SetFunctions (TGetDataFunction getFunc, TSetDataFunction setFunc)
 
virtual CTypeInfoSetTag (CAsnBinaryDefs::TLongTag tag, CAsnBinaryDefs::ETagClass tagclass=CAsnBinaryDefs::eUniversal, CAsnBinaryDefs::ETagType tagtype=CAsnBinaryDefs::eAutomatic) 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...
 
bool IsCObject (void) const
 Check is this TypeInfo object is kind of CClassTypeInfoBase. More...
 
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
 
virtual bool IsType (TTypeInfo type) 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
 
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
 

Static Protected Member Functions

static TObjectPtr GetDataPointer (const CPointerTypeInfo *objectType, TObjectPtr objectPtr)
 
static void SetDataPointer (const CPointerTypeInfo *objectType, TObjectPtr objectPtr, TObjectPtr dataPtr)
 
- Static Protected Member Functions inherited from CPointerTypeInfo
static TObjectPtr GetPointer (const CPointerTypeInfo *objectType, TObjectPtr objectPtr)
 
static void SetPointer (const CPointerTypeInfo *objectType, TObjectPtr objectPtr, TObjectPtr dataPtr)
 
static TObjectPtr CreatePointer (TTypeInfo objectType, CObjectMemoryPool *memoryPool)
 
static void ReadPointer (CObjectIStream &in, TTypeInfo objectType, TObjectPtr objectPtr)
 
static void WritePointer (CObjectOStream &out, TTypeInfo objectType, TConstObjectPtr objectPtr)
 
static void SkipPointer (CObjectIStream &in, TTypeInfo objectType)
 
static void CopyPointer (CObjectStreamCopier &copier, TTypeInfo objectType)
 

Protected Attributes

TPointerOffsetType m_DataOffset
 
bool m_FullAlias
 
- Protected Attributes inherited from CPointerTypeInfo
CTypeRef m_DataTypeRef
 
TGetDataFunction m_GetData
 
TSetDataFunction m_SetData
 
- 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
 

Private Types

typedef CPointerTypeInfo CParent
 

Private Member Functions

void InitAliasTypeInfoFunctions (void)
 

Friends

class CAliasTypeInfoFunctions
 

Additional Inherited Members

- Public Types inherited from CPointerTypeInfo
typedef TObjectPtr(* TGetDataFunction) (const CPointerTypeInfo *objectType, TObjectPtr objectPtr)
 
typedef void(* TSetDataFunction) (const CPointerTypeInfo *objectType, TObjectPtr objectPtr, TObjectPtr dataPtr)
 
- Public Types inherited from CTypeInfo
enum  EMayContainType { eMayContainType_no, eMayContainType_recursion, eMayContainType_yes }
 
typedef TObjectPtr(* TTypeCreate) (TTypeInfo objectType, CObjectMemoryPool *memoryPool)
 
- Static Public Member Functions inherited from CPointerTypeInfo
static TTypeInfo GetTypeInfo (TTypeInfo base)
 
- Protected Types inherited from CTypeInfo
enum  { eNoExplicitTag = -1 }
 
- 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)
 

Detailed Description

Definition at line 45 of file aliasinfo.hpp.

Member Typedef Documentation

Definition at line 47 of file aliasinfo.hpp.

Constructor & Destructor Documentation

CAliasTypeInfo::CAliasTypeInfo ( const string name,
TTypeInfo  type 
)

Definition at line 62 of file aliasinfo.cpp.

References InitAliasTypeInfoFunctions().

Member Function Documentation

void CAliasTypeInfo::Assign ( TObjectPtr  dst,
TConstObjectPtr  src,
ESerialRecursionMode  how = eRecursive 
) const
overridevirtual

Set object to copy of another one.

Reimplemented from CPointerTypeInfo.

Definition at line 118 of file aliasinfo.cpp.

References CTypeInfo::Assign(), CPointerTypeInfo::GetObjectPointer(), CPointerTypeInfo::GetPointedType(), and CPointerTypeInfo::GetRealDataTypeInfo().

Referenced by SetDataPointer().

void CAliasTypeInfo::Delete ( TObjectPtr  object) const
overridevirtual

Delete object.

Reimplemented from CTypeInfo.

Definition at line 132 of file aliasinfo.cpp.

References CTypeInfo::Delete(), and CPointerTypeInfo::GetPointedType().

void CAliasTypeInfo::DeleteExternalObjects ( TObjectPtr  object) const
overridevirtual

Reimplemented from CTypeInfo.

Definition at line 138 of file aliasinfo.cpp.

References CTypeInfo::DeleteExternalObjects(), and CPointerTypeInfo::GetPointedType().

bool CAliasTypeInfo::Equals ( TConstObjectPtr  object1,
TConstObjectPtr  object2,
ESerialRecursionMode  how = eRecursive 
) const
overridevirtual

Check if both objects contain the same values.

Reimplemented from CPointerTypeInfo.

Definition at line 101 of file aliasinfo.cpp.

References CPointerTypeInfo::Equals(), CTypeInfo::Equals(), and CPointerTypeInfo::GetPointedType().

const CObject * CAliasTypeInfo::GetCObjectPtr ( TConstObjectPtr  objectPtr) const
overridevirtual

Reimplemented from CTypeInfo.

Definition at line 144 of file aliasinfo.cpp.

References CTypeInfo::GetCObjectPtr(), and CPointerTypeInfo::GetPointedType().

TObjectPtr CAliasTypeInfo::GetDataPointer ( const CPointerTypeInfo objectType,
TObjectPtr  objectPtr 
)
staticprotected

Definition at line 70 of file aliasinfo.cpp.

References GetDataPtr().

Referenced by InitAliasTypeInfoFunctions().

TObjectPtr CAliasTypeInfo::GetDataPtr ( TObjectPtr  objectPtr) const

Definition at line 178 of file aliasinfo.cpp.

References m_DataOffset.

Referenced by GetDataPointer(), CObjectIStream::ReadAlias(), and CObjectOStream::WriteAlias().

TConstObjectPtr CAliasTypeInfo::GetDataPtr ( TConstObjectPtr  objectPtr) const

Definition at line 184 of file aliasinfo.cpp.

References m_DataOffset.

TTypeInfo CAliasTypeInfo::GetRealTypeInfo ( TConstObjectPtr  object) const
overridevirtual

Reimplemented from CTypeInfo.

Definition at line 150 of file aliasinfo.cpp.

References CTypeInfo::GetRealTypeInfo().

void CAliasTypeInfo::InitAliasTypeInfoFunctions ( void  )
private
bool CAliasTypeInfo::IsDefault ( TConstObjectPtr  object) const
overridevirtual

Check, whether the object contains default value.

Reimplemented from CPointerTypeInfo.

Definition at line 95 of file aliasinfo.cpp.

References CPointerTypeInfo::GetPointedType(), and CTypeInfo::IsDefault().

bool CAliasTypeInfo::IsFullAlias ( void  ) const
inline
bool CAliasTypeInfo::IsParentClassOf ( const CClassTypeInfo classInfo) const
overridevirtual

Reimplemented from CTypeInfo.

Definition at line 157 of file aliasinfo.cpp.

References CPointerTypeInfo::GetPointedType(), and CTypeInfo::IsParentClassOf().

void CAliasTypeInfo::SetCreateFunction ( TTypeCreate  func)
inline

Definition at line 70 of file aliasinfo.hpp.

References CTypeInfo::SetCreateFunction().

void CAliasTypeInfo::SetDataOffset ( TPointerOffsetType  offset)

Definition at line 163 of file aliasinfo.cpp.

References _ASSERT, m_DataOffset, and offset().

void CAliasTypeInfo::SetDataPointer ( const CPointerTypeInfo objectType,
TObjectPtr  objectPtr,
TObjectPtr  dataPtr 
)
staticprotected

Definition at line 77 of file aliasinfo.cpp.

References Assign().

Referenced by InitAliasTypeInfoFunctions().

void CAliasTypeInfo::SetDefault ( TObjectPtr  dst) const
overridevirtual

Set object to default value.

Reimplemented from CPointerTypeInfo.

Definition at line 112 of file aliasinfo.cpp.

References CPointerTypeInfo::GetPointedType(), and CTypeInfo::SetDefault().

void CAliasTypeInfo::SetFullAlias ( bool  set = true)
inline

Definition at line 76 of file aliasinfo.hpp.

References m_FullAlias.

Referenced by CDataType::GetAnyTypeInfo().

Friends And Related Function Documentation

friend class CAliasTypeInfoFunctions
friend

Definition at line 92 of file aliasinfo.hpp.

Member Data Documentation

TPointerOffsetType CAliasTypeInfo::m_DataOffset
protected

Definition at line 89 of file aliasinfo.hpp.

Referenced by GetDataPtr(), and SetDataOffset().

bool CAliasTypeInfo::m_FullAlias
protected

Definition at line 90 of file aliasinfo.hpp.

Referenced by IsFullAlias(), and SetFullAlias().


The documentation for this class was generated from the following files:
Modified on Sun Nov 19 16:42:07 2017 by modify_doxy.py rev. 546573