pointeePtr = pointeeType->
Create();
359choice_type->
SetIndex(choice_ptr, index);
525vector<int>& pattern,
size_t& pos,
int depth,
531good = pattern[pos] ==
depth&& pattern[pos+2] == (
int)
tag;
539pattern[pos] ==
depth&&
546good = pattern[pos] ==
depth&&
554 if(pos+2 >= pattern.size()) {
562 if(pattern[pos] ==
depth) {
571 while(pattern[pos] ==
depth) {
583 if(pos+2 >= pattern.size()) {
616 size_telem_count = 0;
629 if(pos+2 >= pattern.size()) {
645 if(pos+2 >= pattern.size()) {
655good = elem_count != 0;
702 for( ;
b.Valid(); ++
b) {
725 if(!regex_match(v, regex(
m_Value))) {
727 "value \""+ v +
"\", does not match pattern \""+
m_Value+
"\"");
808 template<
typenameT>
814 template<
typenameT>
820 template<
typenameT>
827 template<
typenameTValue>
835TValue v = xxx_Value<TValue>(oi);
850 template<
typenameTValue>
859TValue v = xxx_Value<TValue>(oi);
906 Uint8v =
b.GetElementCount();
924 for( ;
b.Valid(); ++
b, ++ib) {
925 for( e=
b, ie=ib+1, ++e; e.
Valid(); ++e, ++ie) {
Serializable object that stores any combination of parsable data.
Copy hook for a standalone object.
Read hook for a standalone object.
Root class for all serialization exceptions.
virtual void Validate(const CConstObjectInfo &oi, const CObjectStack &stk) const override
CSerialFacetContainer(ESerialFacet type, Uint8 value)
static string GetLocation(const CObjectStack &stk)
CSerialFacetImpl(ESerialFacet type)
const CSerialFacet * m_Next
virtual ~CSerialFacetImpl(void)
void ValidateContainerElements(const CConstObjectInfo &oi, const CObjectStack &stk) const
virtual void Validate(const CConstObjectInfo &oi, const CObjectStack &stk) const override
virtual void Validate(const CConstObjectInfo &oi, const CObjectStack &stk) const override
CSerialFacetLength(ESerialFacet type, Uint8 value)
virtual void Validate(const CConstObjectInfo &oi, const CObjectStack &stk) const override
CSerialFacetMultipleOf(ESerialFacet type, TValue value)
void AddPattern(const string &value)
CSerialFacetPattern(ESerialFacet type, const string &value)
virtual void Validate(const CConstObjectInfo &oi, const CObjectStack &stk) const override
virtual void Validate(const CConstObjectInfo &oi, const CObjectStack &stk) const override
CSerialFacetValue(ESerialFacet type, TValue value)
Skip hook for a standalone object.
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Write hook for a standalone object.
Include a standard set of the NCBI C++ Toolkit most basic headers.
static unsigned char depth[2 *(256+1+29)+1]
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
TMemberIndex Find(const CTempString &name) const
CItemInfo * RestrictI(ESerialFacet type, Int8 value)
virtual ~CSerialFacet(void)
TObjectPtr GetMemberPtr(TObjectPtr classPtr) const
void UpdateSetFlagMaybe(TObjectPtr object) const
set 'setFlag' to eSetMaybe
TConstObjectPtr GetVariantPtr(TConstObjectPtr choicePtr) const
CItemInfo * RestrictD(ESerialFacet type, double value)
void Validate(TTypeInfo info, TConstObjectPtr object, const CObjectStack &stk) const
TTypeInfo GetTypeInfo(void) const
const CSerialFacet * m_Restrict
bool NonEmpty(void) const
CItemInfo * Restrict(ESerialFacet type, const string &pattern)
size_t TMemberIndex
Type used for indexing class members and choice variants.
const TMemberIndex kInvalidMember
Special value returned from FindMember.
const void * TConstObjectPtr
EPrimitiveValueType
Primitive value type.
static const TObjectType * SafeCast(TTypeInfo type)
@ eShallow
Assign/Compare pointers only.
@ ePrimitiveValueSpecial
null, void
@ ePrimitiveValueOctetString
vector<(signed|unsigned)? char>
@ ePrimitiveValueString
string|char*|const char*
@ ePrimitiveValueInteger
(signed|unsigned) (char|short|int|long)
@ ePrimitiveValueChar
char
@ ePrimitiveValueBool
bool
@ ePrimitiveValueEnum
enum
@ ePrimitiveValueReal
float|double
@ ePrimitiveValueBitString
TMemberIndex FindMemberIndex(const string &name) const
Find class member index by its name.
void SetPrimitiveValueChar(char value)
void ResetGlobalWriteHook(void) const
Reset global write hooks.
CTypeInfo * GetNCTypeInfo(void) const
void GetPrimitiveValueBitString(CBitString &value) const
Get bit string data.
TMemberIndex FindVariantIndex(const string &name) const
Find choice variant index by its name.
CMemberIterator BeginMembers(void) const
Create class member iterator.
void SetGlobalReadHook(CReadObjectHook *hook) const
Set global (for all streams) read hook.
bool Valid(void) const
Is iterator valid.
void SetLocalReadHook(CObjectIStream &stream, CReadObjectHook *hook) const
Set local (for the specified stream) read hook.
CObjectInfo AddNewPointedElement(void) const
add new pointer element, create new pointed object and return it
void SetLocalSkipHook(CObjectIStream &stream, CSkipObjectHook *hook) const
Set local (for the specified stream) skip hook.
CObjectTypeInfo GetPointedType(void) const
Get type information of data to which this type refers.
void CheckTypeFamily(ETypeFamily family) const
CConstObjectInfo GetPointedObject(void) const
Get data and type information of object to which this type refers.
CObjectInfo GetPointedObject(void) const
Get data and type information of object to which this type refers.
const CPointerTypeInfo * GetPointerTypeInfo(void) const
void ResetGlobalCopyHook(void) const
Reset global read hooks.
unsigned long GetPrimitiveValueULong(void) const
Get data as unsigned loch.
bool GetPrimitiveValueBool(void) const
Get boolean data.
virtual string GetStackTrace(void) const =0
CObjectTypeInfo GetMemberType(void) const
Get data type information.
void GetPrimitiveValueOctetString(vector< char > &value) const
Get octet string data.
void ResetLocalWriteHook(CObjectOStream &stream) const
Reset local write hook.
TObjectPtr GetObjectPtr(void) const
Get pointer to object.
void SetPrimitiveValueString(const string &value)
void ResetLocalReadHook(CObjectIStream &stream) const
Reset local read hook.
Uint4 GetPrimitiveValueUint4(void) const
Get data as Uint4.
TMemberIndex GetCurrentChoiceVariantIndex(void) const
Get index of currently selected choice variant.
void ResetLocalSkipHook(CObjectIStream &stream) const
Reset local skip hook.
void SetPrimitiveValueBool(bool value)
Set boolean data.
const CEnumeratedTypeValues & GetEnumeratedTypeValues(void) const
Get a set of possible values of enumeration.
void SetPrimitiveValueUint4(Uint4 value)
bool MatchPattern(vector< int > &pattern, size_t &pos, int depth, const CItemInfo *item=NULL) const
TTypeInfo GetTypeInfo(void) const
int GetPrimitiveValueInt(void) const
Get data as int.
const CChoiceTypeInfo * GetChoiceTypeInfo(void) const
void SetGlobalCopyHook(CCopyObjectHook *hook) const
Set global (for all streams) copy hook.
CObjectInfo(void)
Create empty CObjectInfo.
void SetPrimitiveValueULong(unsigned long value)
void SetPrimitiveValueInt8(Int8 value)
const CClassTypeInfo * GetClassTypeInfo(void) const
void SetLocalCopyHook(CObjectStreamCopier &stream, CCopyObjectHook *hook) const
Set local (for the specified stream) copy hook.
const CPrimitiveTypeInfo * GetPrimitiveTypeInfo(void) const
void SetPrimitiveValueInt4(Int4 value)
char GetPrimitiveValueChar(void) const
Get char data.
CObjectInfo AddNewElement(void) const
Add and return new element object.
void ResetLocalCopyHook(CObjectStreamCopier &stream) const
Reset local copy hook.
void SetPrimitiveValueUInt(unsigned value)
void SetPrimitiveValueBitString(const CBitString &value)
void GetPrimitiveValueAnyContent(CAnyContentObject &value) const
Get data as CAnyContentObject.
long GetPrimitiveValueLong(void) const
Get data as long.
CMemberIterator GetMemberIterator(TMemberIndex index) const
ETypeFamily GetTypeFamily(void) const
Get data type family.
void SetLocalWriteHook(CObjectOStream &stream, CWriteObjectHook *hook) const
Set local (for the specified stream) write hook.
void GetPrimitiveValueString(string &value) const
Get string data.
void SetPrimitiveValueLong(long value)
void SetPrimitiveValueUint8(Uint8 value)
double GetPrimitiveValueDouble(void) const
Get data as double.
string GetPrimitiveValueString(void) const
Get string data.
void SetPathSkipHook(CObjectIStream *stream, const string &path, CSkipObjectHook *hook) const
Set local context-specific skip hook.
void SetPrimitiveValueAnyContent(const CAnyContentObject &value)
CElementIterator BeginElements(void) const
Create container elements iterator.
Int4 GetPrimitiveValueInt4(void) const
Get data as Int4.
void SetPrimitiveValueDouble(double value)
void SetPathWriteHook(CObjectOStream *stream, const string &path, CWriteObjectHook *hook) const
Set local context-specific write hook.
void SetGlobalWriteHook(CWriteObjectHook *hook) const
Set global (for all streams) write hook.
void SetPathCopyHook(CObjectStreamCopier *stream, const string &path, CCopyObjectHook *hook) const
Set local context-specific copy hook.
void SetPathReadHook(CObjectIStream *stream, const string &path, CReadObjectHook *hook) const
Set local context-specific read hook.
TASNTag GetASNTag() const
void WrongTypeFamily(ETypeFamily needFamily) const
CObjectTypeInfo GetVariantType(void) const
Get data type information.
const CEnumeratedTypeInfo * GetEnumeratedTypeInfo(void) const
TConstObjectPtr GetObjectPtr(void) const
Get pointer to object.
void SetPrimitiveValueInt(int value)
void SetPrimitiveValueOctetString(const vector< char > &value)
CObjectInfo SetChoiceVariant(TMemberIndex index) const
Select choice variant, if necessary, and return variant object.
const CContainerTypeInfo * GetContainerTypeInfo(void) const
EPrimitiveValueType GetPrimitiveValueType(void) const
Get type of primitive value.
Uint8 GetPrimitiveValueUint8(void) const
Get data as Uint8.
Int8 GetPrimitiveValueInt8(void) const
Get data as Int8.
unsigned GetPrimitiveValueUInt(void) const
Get data as unsigned int.
CObjectInfo SetClassMember(TMemberIndex index) const
Create member if necessary and return member object.
void ResetGlobalReadHook(void) const
Reset global read hooks.
bool IsPrimitiveValueSigned(void) const
Is primitive value signed.
CObjectTypeInfo GetElementType(void) const
Get type information of an element of container.
CConstObjectInfo GetElement(void) const
Get element data and type information.
CObjectInfo SetPointedObject(void) const
Create if necessary and return pointed object.
virtual string GetPosition(void) const =0
CVariantIterator GetVariantIterator(TMemberIndex index) const
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
void SetPathCopyHook(CObjectStreamCopier *copier, const string &path, CCopyObjectHook *hook)
Set local context-specific copy hook.
long GetValueLong(TConstObjectPtr objectPtr) const
void SetValueInt(TObjectPtr objectPtr, int value) const
virtual Uint4 GetValueUint4(TConstObjectPtr objectPtr) const
void ResetLocalWriteHook(CObjectOStream &out)
Reset local write hook.
virtual void GetValueAnyContent(TConstObjectPtr objectPtr, CAnyContentObject &value) const
int GetValueInt(TConstObjectPtr objectPtr) const
EPrimitiveValueType GetPrimitiveValueType(void) const
void SetObjectPointer(TObjectPtr object, TObjectPtr pointer) const
virtual void SetValueInt8(TObjectPtr objectPtr, Int8 value) const
virtual void SetValueInt4(TObjectPtr objectPtr, Int4 value) const
const CItemsInfo & GetItems(void) const
virtual void GetValueString(TConstObjectPtr objectPtr, string &value) const
void SetGlobalWriteHook(CWriteObjectHook *hook)
Set global (for all input streams) write hook.
ETypeFamily GetTypeFamily(void) const
virtual void SetValueBool(TObjectPtr objectPtr, bool value) const
TObjectPtr AddElement(TObjectPtr containerPtr, TConstObjectPtr elementPtr, ESerialRecursionMode how=eRecursive) const
void ResetGlobalReadHook(void)
Reset global read hooks.
virtual Int4 GetValueInt4(TConstObjectPtr objectPtr) const
TTypeInfo GetPointedType(void) const
virtual void SetValueOctetString(TObjectPtr objectPtr, const vector< char > &value) const
const CItemsInfo & GetVariants(void) const
TMemberIndex GetIndex(TConstObjectPtr object) const
void SetLocalWriteHook(CObjectOStream &out, CWriteObjectHook *hook)
Set local (for a specific input stream) write hook.
void ResetGlobalCopyHook(void)
Reset global copy hooks.
unsigned GetValueUInt(TConstObjectPtr objectPtr) const
const CMemberInfo * GetMemberInfo(TMemberIndex index) const
void ResetLocalSkipHook(CObjectIStream &in)
Reset local skip hook.
virtual void GetValueOctetString(TConstObjectPtr objectPtr, vector< char > &value) const
const CVariantInfo * GetVariantInfo(TMemberIndex index) const
void SetValueUInt(TObjectPtr objectPtr, unsigned value) const
bool Implicit(void) const
void SetLocalCopyHook(CObjectStreamCopier &copier, CCopyObjectHook *hook)
Set local (for a specific input stream) copy hook.
virtual void GetValueBitString(TConstObjectPtr objectPtr, CBitString &value) const
virtual void SetValueChar(TObjectPtr objectPtr, char value) const
void SetGlobalCopyHook(CCopyObjectHook *hook)
Set global (for all input streams) copy hook.
void SetValueLong(TObjectPtr objectPtr, long value) const
void SetValueULong(TObjectPtr objectPtr, unsigned long value) const
virtual char GetValueChar(TConstObjectPtr objectPtr) const
virtual void SetValueUint8(TObjectPtr objectPtr, Uint8 value) const
bool IsStringStore(void) const
virtual void SetValueUint4(TObjectPtr objectPtr, Uint4 value) const
void SetPathReadHook(CObjectIStream *in, const string &path, CReadObjectHook *hook)
Set local context-specific read hook.
virtual void SetValueBitString(TObjectPtr objectPtr, const CBitString &value) const
virtual bool IsSigned(void) const
void SetPathWriteHook(CObjectOStream *out, const string &path, CWriteObjectHook *hook)
Set local context-specific write hook.
virtual void SetValueDouble(TObjectPtr objectPtr, double value) const
void SetGlobalReadHook(CReadObjectHook *hook)
Set global (for all input streams) read hook.
virtual void SetValueAnyContent(TObjectPtr objectPtr, const CAnyContentObject &value) const
virtual double GetValueDouble(TConstObjectPtr objectPtr) const
EType GetStringType(void) const
virtual bool GetValueBool(TConstObjectPtr objectPtr) const
void SetPathSkipHook(CObjectIStream *in, const string &path, CSkipObjectHook *hook)
Set local context-specific skip hook.
TConstObjectPtr GetObjectPointer(TConstObjectPtr object) const
virtual void SetValueString(TObjectPtr objectPtr, const string &value) const
void SetLocalSkipHook(CObjectIStream &in, CSkipObjectHook *hook)
Set local (for a specific input stream) skip hook.
const CItemsInfo & GetMembers(void) const
void ResetLocalCopyHook(CObjectStreamCopier &copier)
Reset local copy hook.
const CEnumeratedTypeValues & Values(void) const
unsigned long GetValueULong(TConstObjectPtr objectPtr) const
void SetLocalReadHook(CObjectIStream &in, CReadObjectHook *hook)
Set local (for a specific input stream) read hook.
void ResetLocalReadHook(CObjectIStream &in)
Reset local read hook.
void ResetGlobalWriteHook(void)
Reset global write hooks.
TTypeInfo GetElementType(void) const
virtual Int8 GetValueInt8(TConstObjectPtr objectPtr) const
TObjectPtr Create(CObjectMemoryPool *memoryPool=0) const
Create object of this type on heap (can be deleted by operator delete)
void SetIndex(TObjectPtr object, TMemberIndex index, CObjectMemoryPool *pool=0) const
virtual Uint8 GetValueUint8(TConstObjectPtr objectPtr) const
unsigned int
A callback function used to compare two keys in a database.
const GenericPointer< typename T::ValueType > T2 value
std::enable_if< std::is_same< T, Int8 >::value, T >::type xxx_Value(const CConstObjectInfo &oi)
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