| void setDocument(Document const & document) | Set the Message's document.
|
| Document const & document() const | Return a reference to the Message's Document.
|
| Node * oob() const | Return the Out-of-Band Node or 0 if none exists.
|
| int size() const | Return the number of Nodes of this Message.
|
| virtual int length() const | Return the length in bits of this Message.
|
| bool empty() const | Returns true if the Message is empty. This means it has no
data. To see if the Message has a Document associated with it,
call document().empty().
|
| void clear() | Clear the Message, making it empty.
|
| BitString const & bitString() const | Returns a reference to the Message's data.
|
| virtual Node * find(const char * name) const | Return the first top-level Node by its name.
0 is returned if the field does not exist.
This is the same as calling firstNode()->find().
Complexity of O(n).
|
| const char * xml() | Returns an XML representation of the Message. The return value will
be valid for the life of the Message, or until an xml() method is called
again.
|
| size_t xml(char * dest, size_t length) | Provides an XML representation of the Message. At most length bytes
will be copied into dest. Returns the desired length of the buffer
required to hold the entire xml representation.
|
| const char * text(const char * fstring = "30n 6l 8v 10h s", bool headerOnly = false) const | Returns a textual representation of the Message. The return value will
be valid for the life of the Message, or until a text() method is called
again. See the other text() method for parameter descriptions.
|
| size_t code(char * dest, size_t length, const char * base = "msg") const | Return a C++ representation of the Message. Experimental.
|
| const char * code(const char * = "msg") const | Returns a C++ representation of the Message. The return value will
be valid for the life of the Message, or until a code() method is called
again. Experimental.
|
| int validate() | Iterate through all the Nodes in the Message to validate. The
return value is the number of invalid nodes.
Complexity of O(n).
|
| bool valid() const | Returns true if there were no invalid nodes the last time
validate() was called.
|
| void reserve(unsigned size = 1024) | Reserve space for the Message's data. size is in bits.
This is used to reserve space for encoding. See trim().
|
| void trim() | Resize the Message to remove any unused bits that were reserved via reserve().
|
| Node * firstNode() const | Return a pointer to the first node in the message.
|
| Node * lastNode() | Return a pointer to the last node in the message.
|
| Node * endNode() | Return a pointer to the node one past the last node in the message.
|
| Node * nextNode(Node * node) | Return the next node as it occurs in sequential order in the message.
|
| Node * prevNode(Node * node) | Return the previous node as it occurs in sequential order in the message.
|