#include <InfoItem.h>
Public Member Functions | |
InfoItem () | |
to create empty InfoItem | |
InfoItem (const JString &xml) | |
to create from XML | |
InfoItem (XMLNode *node) | |
to create from XML node | |
InfoItem (const InfoItem &item) | |
to create from other InfoItem | |
~InfoItem () | |
bool | unitTest () |
Object * | clone () const |
InfoItem * | cloneDataOnly () const |
InfoItem & | operator= (const InfoItem &item) |
virtual unsigned long | getPayloadSize () const |
Get total size of payload. | |
bool | loadFromFile (const JString &filename) |
bool | writeToFile (const JString &filename) |
bool | fromXML (XMLNode *xmlNode) |
Read XML node into this InfoItem... | |
JString | toXML () |
Convert InfoItem to XML... | |
JString | print () |
Nicely formatted text print. | |
JString | printShort () |
One line text print. | |
JString | printHTML (JString htmlTemplate="") |
Generate HTML... | |
JString | toHTML () |
long | getBinarySize (int chunk) |
Get the size of binary data chunk, -1 for all chunks. | |
int | getBinaryChunkCount () |
Get the number of data chunks. | |
long | toBinaryBuffer (int chunk, char *buffer, int maxlen) |
Write binary data to buffer at chunk number 'chunk'. | |
bool | fromBinaryBuffer (int chunk, char *buffer, long len) |
Set the data after separate reception. | |
bool | setObject (Object *obj) |
Set the attached Object for the InfoItem. | |
Object * | getObject () |
Get the attached Object for the InfoItem or NULL. | |
JString | getObjectType () |
Get the attached Object type (Class name) for the InfoItem. | |
bool | deleteObject () |
Delete the attached Object; NB: Will destroy object. | |
Object * | takeObject () |
Takes away the attached object. | |
JString | getID () |
Get a copy of ID. | |
JTime | getCreatedTime () |
JString | getEntry (const JString &name) |
JTime | getTime (const JString &name) |
bool | setID (const JString &id) |
Set InfoItem ID, autogenerated if not set. | |
bool | setCreatedTime (const JTime &time) |
bool | setEntry (const JString &name, const JString &value) |
bool | setTime (const JString &name, const JTime &t) |
Public Attributes | |
JString | id |
JTime | createdTime |
Dictionary | auxDict |
Dictionary of generic text entries. | |
ObjectDictionary | timeDict |
Dictionary of Timestamps. | |
Object * | object |
Definition at line 38 of file InfoItem.h.
cmlabs::InfoItem::InfoItem | ( | ) |
cmlabs::InfoItem::InfoItem | ( | const JString & | xml | ) |
cmlabs::InfoItem::InfoItem | ( | XMLNode * | node | ) |
cmlabs::InfoItem::InfoItem | ( | const InfoItem & | item | ) |
cmlabs::InfoItem::~InfoItem | ( | ) |
Definition at line 91 of file InfoItem.cpp.
bool cmlabs::InfoItem::unitTest | ( | ) | [virtual] |
Object * cmlabs::InfoItem::clone | ( | ) | const [virtual] |
InfoItem * cmlabs::InfoItem::cloneDataOnly | ( | ) | const |
Definition at line 112 of file InfoItem.cpp.
Definition at line 74 of file InfoItem.cpp.
unsigned long cmlabs::InfoItem::getPayloadSize | ( | ) | const [virtual] |
Get total size of payload.
Reimplemented from cmlabs::Object.
Definition at line 68 of file InfoItem.cpp.
bool cmlabs::InfoItem::loadFromFile | ( | const JString & | filename | ) |
Definition at line 426 of file InfoItem.cpp.
bool cmlabs::InfoItem::writeToFile | ( | const JString & | filename | ) |
Definition at line 467 of file InfoItem.cpp.
bool cmlabs::InfoItem::fromXML | ( | XMLNode * | xmlNode | ) | [virtual] |
Read XML node into this InfoItem...
Reimplemented from cmlabs::Object.
Definition at line 126 of file InfoItem.cpp.
JString cmlabs::InfoItem::toXML | ( | ) | [virtual] |
Convert InfoItem to XML...
Reimplemented from cmlabs::Object.
Definition at line 170 of file InfoItem.cpp.
JString cmlabs::InfoItem::print | ( | ) | [virtual] |
Nicely formatted text print.
Reimplemented from cmlabs::Object.
Definition at line 202 of file InfoItem.cpp.
JString cmlabs::InfoItem::printShort | ( | ) |
JString cmlabs::InfoItem::toHTML | ( | ) | [virtual] |
long cmlabs::InfoItem::getBinarySize | ( | int | chunk | ) | [virtual] |
Get the size of binary data chunk, -1 for all chunks.
Get the size of any binary data.
Reimplemented from cmlabs::Object.
Definition at line 391 of file InfoItem.cpp.
int cmlabs::InfoItem::getBinaryChunkCount | ( | ) | [virtual] |
Get the number of data chunks.
Reimplemented from cmlabs::Object.
Definition at line 398 of file InfoItem.cpp.
long cmlabs::InfoItem::toBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
int | maxlen | |||
) | [virtual] |
Write binary data to buffer at chunk number 'chunk'.
Get a pointer to the binary data at chunk number 'chunk'.
Reimplemented from cmlabs::Object.
Definition at line 405 of file InfoItem.cpp.
bool cmlabs::InfoItem::fromBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
long | len | |||
) | [virtual] |
Set the data after separate reception.
Reimplemented from cmlabs::Object.
Definition at line 412 of file InfoItem.cpp.
bool cmlabs::InfoItem::setObject | ( | Object * | obj | ) |
Object * cmlabs::InfoItem::getObject | ( | ) |
JString cmlabs::InfoItem::getObjectType | ( | ) |
Get the attached Object type (Class name) for the InfoItem.
Definition at line 346 of file InfoItem.cpp.
bool cmlabs::InfoItem::deleteObject | ( | ) |
Object * cmlabs::InfoItem::takeObject | ( | ) |
JString cmlabs::InfoItem::getID | ( | ) |
JTime cmlabs::InfoItem::getCreatedTime | ( | ) |
Definition at line 370 of file InfoItem.cpp.
Definition at line 302 of file InfoItem.cpp.
Definition at line 316 of file InfoItem.cpp.
bool cmlabs::InfoItem::setID | ( | const JString & | id | ) |
bool cmlabs::InfoItem::setCreatedTime | ( | const JTime & | time | ) |
Definition at line 379 of file InfoItem.cpp.
Definition at line 295 of file InfoItem.cpp.
Definition at line 308 of file InfoItem.cpp.
Definition at line 127 of file InfoItem.h.
Definition at line 128 of file InfoItem.h.
Definition at line 133 of file InfoItem.h.