,
const char* name,
47TTypeCreate createFunc,
57 size_t size,
const char* name,
59TTypeCreate createFunc,
70 size_t size,
const string& name,
72TTypeCreate createFunc,
82 size_t size,
const string& name,
84TTypeCreate createFunc,
100 const void* memberPtr,
111 const void* memberPtr,
166unique_ptr<TClassesById> keep(classes =
new TClassesById);
169 if(
info->GetId() !=
typeid(
bool) ) {
174 string(
"duplicate class id: ")+
175 info->GetId().name());
197 if( !
info->GetName().empty() ) {
236 if(
i==
types.end() ) {
237 string msg(
"class not found: ");
247pair<TClassesByName::iterator, TClassesByName::iterator>
i=
249 if(
i.first ==
i.second ) {
251 "class not found: "<<name);
253 if( --
i.second !=
i.first ) {
259 "ambiguous class name: "<<t1->
GetName()<<
262 return i.first->second;
283 if(
info->GetModuleName() == module) {
301 return static_cast<const CObject*
>(objectPtr);
314 if(ins != cache->
end()) {
324pair<TContainedTypes::iterator, bool> ins =
328 returnins.first->second;
331 static intrecursion_level = 0;
338 if( recursion_level == 0 ) {
342cache->
erase(ins.first);
346ins.first->second = ret;
351cache->
erase(ins.first);
398 m_PreRead(
object.GetTypeInfo(),
object.GetObjectPtr());
399 object.GetTypeInfo()->DefaultReadData(
in,
object.GetObjectPtr());
424 object.GetTypeInfo()->DefaultReadData(
in,
object.GetObjectPtr());
425 m_PostRead(
object.GetTypeInfo(),
object.GetObjectPtr());
450 m_PreWrite(
object.GetTypeInfo(),
object.GetObjectPtr());
451 object.GetTypeInfo()->DefaultWriteData(
out,
object.GetObjectPtr());
476 object.GetTypeInfo()->DefaultWriteData(
out,
object.GetObjectPtr());
477 m_PostWrite(
object.GetTypeInfo(),
object.GetObjectPtr());
TPostReadFunction m_PostRead
virtual void ReadObject(CObjectIStream &in, const CObjectInfo &object) override
This method will be called at approriate time when the object of requested type is to be read.
CPostReadHook(TPostReadFunction func)
CClassTypeInfoBase::TPostReadFunction TPostReadFunction
virtual void WriteObject(CObjectOStream &out, const CConstObjectInfo &object) override
This method will be called at approriate time when the object of requested type is to be written.
CClassTypeInfoBase::TPostWriteFunction TPostWriteFunction
TPostWriteFunction m_PostWrite
CPostWriteHook(TPostWriteFunction func)
TPreReadFunction m_PreRead
virtual void ReadObject(CObjectIStream &in, const CObjectInfo &object) override
This method will be called at approriate time when the object of requested type is to be read.
CClassTypeInfoBase::TPreReadFunction TPreReadFunction
CPreReadHook(TPreReadFunction func)
CPreWriteHook(TPreWriteFunction func)
TPreWriteFunction m_PreWrite
virtual void WriteObject(CObjectOStream &out, const CConstObjectInfo &object) override
This method will be called at approriate time when the object of requested type is to be written.
CClassTypeInfoBase::TPreWriteFunction TPreWriteFunction
Read hook for a standalone object.
Root class for all serialization exceptions.
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Write hook for a standalone object.
DEFINE_STATIC_MUTEX(s_ClassInfoMutex)
container_type::iterator iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
const_iterator_pair equal_range(const key_type &key) const
iterator insert(const value_type &val)
container_type::value_type value_type
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
static const struct name_t names[]
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static const struct type types[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
void DataSpec(EDataSpec spec)
const CItemInfo * GetItemInfo(TMemberIndex index) const
TTypeInfo GetTypeInfo(void) const
void AddItem(CItemInfo *item)
void AssignItemsTags(CAsnBinaryDefs::ETagType containerType)
void(* TPreReadFunction)(const CTypeInfo *info, void *object)
void(* TPreWriteFunction)(const CTypeInfo *info, const void *object)
size_t TMemberIndex
Type used for indexing class members and choice variants.
const void * TConstObjectPtr
void(* TPostWriteFunction)(const CTypeInfo *info, const void *object)
#define XSERIAL_TYPEINFO_READLOCK
ssize_t TPointerOffsetType
#define XSERIAL_TYPEINFO_WRITELOCK
void(* TPostReadFunction)(const CTypeInfo *info, void *object)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const string & GetName(void) const
Get name of this type.
virtual const string & GetModuleName(void) const
Get module name.
virtual const CObject * GetCObjectPtr(TConstObjectPtr objectPtr) const override
CMemberInfo * AddMember(const char *memberId, const void *memberPtr, const CTypeRef &memberType)
static TClassesByName * sm_ClassesByName
void(* TPostWriteFunction)(TTypeInfo info, TConstObjectPtr object)
void DataSpec(EDataSpec spec)
static set< string > * sm_Modules
void AssignItemsTags(void)
void SetPostWriteFunction(TPostWriteFunction func)
virtual CTypeInfo * SetTag(CAsnBinaryDefs::TLongTag tag, CAsnBinaryDefs::ETagClass tagclass=CAsnBinaryDefs::eUniversal, CAsnBinaryDefs::ETagType tagtype=CAsnBinaryDefs::eAutomatic)
static void GetRegisteredClassNames(const string &module, TRegClasses &names)
const CItemsInfo & GetItems(void) const
CAsnBinaryDefs::ETagType GetTagType(void) const
void SetGlobalWriteHook(CWriteObjectHook *hook)
Set global (for all input streams) write hook.
static TTypeInfo GetClassInfoById(const type_info &id)
CClassTypeInfoBase(ETypeFamily typeFamily, size_t size, const char *name, const void *nonCObject, TTypeCreate createFunc, const type_info &ti)
void(* TPostReadFunction)(TTypeInfo info, TObjectPtr object)
static TClasses * sm_Classes
static TTypeInfo GetClassInfoByName(const string &name)
bool IsCObject(void) const
Check is this TypeInfo object is kind of CClassTypeInfoBase.
virtual EMayContainType GetMayContainType(TTypeInfo type) const override
static TClassesById * sm_ClassesById
static TClasses & Classes(void)
void(* TPreWriteFunction)(TTypeInfo info, TConstObjectPtr object)
static TClassesByName & ClassesByName(void)
void SetCreateFunction(TTypeCreate func)
void SetGlobalReadHook(CReadObjectHook *hook)
Set global (for all input streams) read hook.
void SetPreWriteFunction(TPreWriteFunction func)
EMayContainType IsOrMayContainType(TTypeInfo type) const
static TClassesById & ClassesById(void)
unique_ptr< TContainedTypes > m_ContainedTypes
static void RegisterModule(const string &module)
void SetPostReadFunction(TPostReadFunction func)
static void GetRegisteredModuleNames(TRegModules &modules)
virtual ~CClassTypeInfoBase(void)
void DataSpec(EDataSpec spec)
set< CClassTypeInfoBase * > TClasses
void(* TPreReadFunction)(TTypeInfo info, TObjectPtr object)
void InitClassTypeInfoBase(const type_info &id)
virtual EMayContainType CalcMayContainType(TTypeInfo typeInfo) const
void SetPreReadFunction(TPreReadFunction func)
@ eMayContainType_recursion
const struct ncbi::grid::netcache::search::fields::SIZE size
Multi-threading â classes, functions, and features.
std::istream & in(std::istream &in_, double &x_)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4