Previous:
WordRecord ASCII FORMAT
, Up:
WordRecord
10.17.5 WordRecord METHODS
`
inline WordRecord(WordContext* ncontext)
'
Constructor. Build an empty record. The
ncontext
argument must be a pointer to a valid WordContext object.
`
inline void Clear()
'
Reset to empty and set the type to the default specified in the configuration.
`
inline int DefaultType()
'
Return the default type WORD_RECORD_{DATA,STR,NONE}
`
inline int Pack(String& packed) const
'
Convert the object to a representation for disk storage written in the
packed
string. Return OK on success, NOTOK otherwise.
`
inline int Unpack(const char* string, int length)
'
Alias for Unpack(String(string, length))
`
inline int Unpack(const String& packed)
'
Read the object from a representation for disk storage contained in the
packed
argument. Return OK on success, NOTOK otherwise.
`
int Set(const String& bufferin)
'
Set the whole structure from ASCII string description stored in the
bufferin
argument. Return OK on success, NOTOK otherwise.
`
int Get(String& bufferout) const
'
Convert the whole structure to an ASCII string description and return it in the
bufferout
argument. Return OK on success, NOTOK otherwise.
`
String Get() const
'
Convert the whole structure to an ASCII string description and return it.
`
inline WordContext* GetContext()
'
Return a pointer to the WordContext object used to create this instance.
`
inline const WordContext* GetContext() const
'
Return a pointer to the WordContext object used to create this instance as a const.
`
int Write(FILE* f) const
'
Print object in ASCII form on descriptor
f
using the Get method.