unique_ptr<CObjectOStream> os
124ostr.read(&
data[0],
data.size());
137 catch(
conststd::exception&) {
153 stringstrdata(
data.data(),
data.size());
155unique_ptr<CObjectIStream> is
163 ERR_POST(
"CAbstractProjectItem::PostRead(): " 164 "failed to deserialize other item: "<< e);
168 throwruntime_error(
"invalid format");
171 ERR_POST(
Error<<
"failed to deserialize abstract object: "<< e);
User-defined methods of the data storage class.
const CSerialObject & Get(void) const
virtual void UserOp_Assign(const CSerialUserOp &source)
Will be called after copying the datatool-generated members.
void PreWrite() const
PreWrite() / PostRead to trap read/write conversion.
~CAbstractProjectItem(void)
virtual bool UserOp_Equals(const CSerialUserOp &object) const
Will be called after comparing the datatool-generated members.
const CSerialObject * GetObject(void) const
CRef< CSerialObject > m_OtherObject
fall-back: non-serialized core object
void Set(CSerialObject &object)
In-memory stream (a la strstream or stringstream)
Root class for all serialization exceptions.
Base class for all serializable objects.
Base class for user-defined serializable classes to allow for objects assignment and comparison.
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Error(CExceptionArgs_Base &args)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
ESerialDataFormat
Data file format.
@ eSerial_AsnText
ASN.1 text.
@ eSerial_AsnBinary
ASN.1 binary.
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static TTypeInfo GetClassInfoByName(const string &name)
TObjectPtr Create(CObjectMemoryPool *memoryPool=0) const
Create object of this type on heap (can be deleted by operator delete)
TData & SetData(void)
Assign a value to Data data member.
const TType & GetType(void) const
Get the Type member data.
const TData & GetData(void) const
Get the Data member data.
TType & SetType(void)
Assign a value to Type data member.
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