#include <sdes.h>
Public Types | |
enum | SDES_ITEM_TYPE { SDES_UNDEF = 0, SDES_CNAME = 1, SDES_NAME = 2, SDES_EMAIL = 3, SDES_PHONE = 4, SDES_LOC = 5, SDES_TOOL = 6, SDES_NOTE = 7, SDES_PRIV = 8 } |
Public Member Functions | |
SDESItem () | |
SDESItem (SDES_ITEM_TYPE type, const char *content) | |
SDESItem (const SDESItem &sdesItem) | |
virtual | ~SDESItem () |
SDESItem & | operator= (const SDESItem &sdesItem) |
virtual SDESItem * | dup () const |
virtual std::string | info () |
virtual void | dump (std::ostream &os) |
virtual SDES_ITEM_TYPE | getType () |
virtual const char * | getContent () |
virtual int | getLength () |
Protected Attributes | |
SDES_ITEM_TYPE | _type |
int | _length |
const char * | _content |
This enumeration holds the types of source description items as defined in the rfc. In this implementation only SDES_UNDEF and SDES_CNAME are usable.
SDES_UNDEF | |
SDES_CNAME | |
SDES_NAME | |
SDES_EMAIL | |
SDES_PHONE | |
SDES_LOC | |
SDES_TOOL | |
SDES_NOTE | |
SDES_PRIV |
00040 { 00041 SDES_UNDEF = 0, 00042 SDES_CNAME = 1, 00043 SDES_NAME = 2, 00044 SDES_EMAIL = 3, 00045 SDES_PHONE = 4, 00046 SDES_LOC = 5, 00047 SDES_TOOL = 6, 00048 SDES_NOTE = 7, 00049 SDES_PRIV = 8 00050 };
SDESItem::SDESItem | ( | ) |
Default constructor.
Referenced by dup().
00029 : cObject() { 00030 _type = SDES_UNDEF; 00031 _length = 2; 00032 _content = ""; 00033 };
SDESItem::SDESItem | ( | SDES_ITEM_TYPE | type, | |
const char * | content | |||
) |
SDESItem::SDESItem | ( | const SDESItem & | sdesItem | ) |
SDESItem * SDESItem::dup | ( | ) | const [virtual] |
std::string SDESItem::info | ( | ) | [virtual] |
void SDESItem::dump | ( | std::ostream & | os | ) | [virtual] |
SDESItem::SDES_ITEM_TYPE SDESItem::getType | ( | ) | [virtual] |
Returns the type of this sdes item.
Referenced by SDESChunk::addSDESItem().
00083 { 00084 return _type; 00085 };
const char * SDESItem::getContent | ( | ) | [virtual] |
int SDESItem::getLength | ( | ) | [virtual] |
This method returns the size of this SDESItem in bytes as it would be in the real world.
Referenced by SDESChunk::addSDESItem().
00093 { 00094 // bytes needed for this sdes item are 00095 // one byte for type, one for length 00096 // and the string 00097 return _length + 2; 00098 };
SDES_ITEM_TYPE SDESItem::_type [protected] |
The type of this SDESItem.
Referenced by dump(), getType(), operator=(), and SDESItem().
int SDESItem::_length [protected] |
The length of this SDESItem.
Referenced by getLength(), operator=(), and SDESItem().
const char* SDESItem::_content [protected] |
The sdes string.
Referenced by dump(), getContent(), info(), operator=(), and SDESItem().