cmlabs::InfoItem Class Reference

#include <InfoItem.h>

Inheritance diagram for cmlabs::InfoItem:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::InfoItem:

Collaboration graph
[legend]

List of all members.

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 ()
Objectclone () const
InfoItemcloneDataOnly () const
InfoItemoperator= (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.
ObjectgetObject ()
 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.
ObjecttakeObject ()
 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.
Objectobject


Detailed Description

Definition at line 38 of file InfoItem.h.


Constructor & Destructor Documentation

cmlabs::InfoItem::InfoItem (  ) 

to create empty InfoItem

Definition at line 25 of file InfoItem.cpp.

cmlabs::InfoItem::InfoItem ( const JString xml  ) 

to create from XML

Definition at line 30 of file InfoItem.cpp.

cmlabs::InfoItem::InfoItem ( XMLNode node  ) 

to create from XML node

Definition at line 37 of file InfoItem.cpp.

cmlabs::InfoItem::InfoItem ( const InfoItem item  ) 

to create from other InfoItem

Definition at line 44 of file InfoItem.cpp.

cmlabs::InfoItem::~InfoItem (  ) 

Definition at line 91 of file InfoItem.cpp.


Member Function Documentation

bool cmlabs::InfoItem::unitTest (  )  [virtual]

Reimplemented from cmlabs::Object.

Definition at line 503 of file InfoItem.cpp.

Object * cmlabs::InfoItem::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 96 of file InfoItem.cpp.

InfoItem * cmlabs::InfoItem::cloneDataOnly (  )  const

Definition at line 112 of file InfoItem.cpp.

InfoItem & cmlabs::InfoItem::operator= ( const InfoItem item  ) 

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 (  ) 

One line text print.

Definition at line 206 of file InfoItem.cpp.

JString cmlabs::InfoItem::printHTML ( JString  htmlTemplate = ""  ) 

Generate HTML...

Definition at line 239 of file InfoItem.cpp.

JString cmlabs::InfoItem::toHTML (  )  [virtual]

Reimplemented from cmlabs::Object.

Definition at line 235 of file InfoItem.cpp.

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  ) 

Set the attached Object for the InfoItem.

Definition at line 336 of file InfoItem.cpp.

Object * cmlabs::InfoItem::getObject (  ) 

Get the attached Object for the InfoItem or NULL.

Definition at line 342 of file InfoItem.cpp.

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 (  ) 

Delete the attached Object; NB: Will destroy object.

Definition at line 352 of file InfoItem.cpp.

Object * cmlabs::InfoItem::takeObject (  ) 

Takes away the attached object.

Definition at line 360 of file InfoItem.cpp.

JString cmlabs::InfoItem::getID (  ) 

Get a copy of ID.

Definition at line 366 of file InfoItem.cpp.

JTime cmlabs::InfoItem::getCreatedTime (  ) 

Definition at line 370 of file InfoItem.cpp.

JString cmlabs::InfoItem::getEntry ( const JString name  ) 

Definition at line 302 of file InfoItem.cpp.

JTime cmlabs::InfoItem::getTime ( const JString name  ) 

Definition at line 316 of file InfoItem.cpp.

bool cmlabs::InfoItem::setID ( const JString id  ) 

Set InfoItem ID, autogenerated if not set.

Definition at line 374 of file InfoItem.cpp.

bool cmlabs::InfoItem::setCreatedTime ( const JTime time  ) 

Definition at line 379 of file InfoItem.cpp.

bool cmlabs::InfoItem::setEntry ( const JString name,
const JString value 
)

Definition at line 295 of file InfoItem.cpp.

bool cmlabs::InfoItem::setTime ( const JString name,
const JTime t 
)

Definition at line 308 of file InfoItem.cpp.


Member Data Documentation

Definition at line 127 of file InfoItem.h.

Definition at line 128 of file InfoItem.h.

Dictionary of generic text entries.

Definition at line 130 of file InfoItem.h.

Dictionary of Timestamps.

Definition at line 132 of file InfoItem.h.

Definition at line 133 of file InfoItem.h.


The documentation for this class was generated from the following files:

Generated on Tue Jul 7 16:22:47 2009 for CoreLibrary by  doxygen 1.5.6