Clears the current prefix as set by registerPrefix
or setPrefix.
If the current prefix was set using registerPrefix,
then the IccJournal class only removes its own reference
to the prefix. The buffer itself is left unchanged.
If the current prefix was set by setPrefix, then
the IccJournal's copy of the buffer is deleted.
const IccJournalTypeId& journalTypeId() const
Returns a reference to an IccJournalTypeId object
that contains a 2-byte field used to identify the origin of journal records.
virtual void put(const IccBuf& buffer)
- buffer
- A reference to an IccBuf object that holds data
to be put into the journal.
A synonym for writeRecord--puts data into the
journal. See Polymorphic Behavior for information on polymorphism.
void registerPrefix(const IccBuf* prefix)
Stores pointer to prefix object for use when the writeRecord method is called on this IccJournal object.
void setJournalTypeId(const IccJournalTypeId& id)
void setJournalTypeId(const char* jtypeid)
Sets the journal type--a 2 byte identifier--included in the
journal record created when using the writeRecord method.
void setPrefix(const IccBuf& prefix)
void setPrefix(const char* prefix)
Stores the current contents of prefix for inclusion in
the journal record created when the writeRecord method
is called.
void wait (unsigned long requestNum=0,
unsigned long option = 0)
- requestNum
- The write request. Zero indicates the last write on this journal.
- option
- An integer that affects the behaviour of writeRecord calls on the IccJournal object. Values other than
0 should be made from the Options enumeration, defined
in this class. The values may be combined by addition or bitwise ORing, for
example
IccJournal::startIO + IccJournal::synchronous.
The default is to use the system default.
Waits until a previous journal write has completed.
Condition:
IOERR, JIDERR, NOTOPEN
unsigned long writeRecord (const IccBuf& record,
unsigned long option = 0)
- record
- A reference to an IccBuf object that holds the
record
- option
- See above.
unsigned long writeRecord (const char* record,
unsigned long option = 0)
- record
- The name of the record
- option
- See above.
Writes the data in the record to the journal.
The returned number represents the particular write request and can be
passed to the wait method in this class.
Conditions
IOERR, JIDERR, LENGERR, NOJBUFSP, NOTAUTH, NOTOPEN
[[ Contents Previous Page | Next Page Index ]]