#include <NML.h>
Public Types | |
typedef unsigned short | NewsObjectId_t |
NML object id. | |
enum | object_type_t { INVALID, MENU, PLAIN, TITLE, LIST } |
NML object types. More... | |
Public Methods | |
NML () | |
default NML constructor | |
NML (const NML &prototype) | |
copy NML constructor | |
~NML () | |
destructor | |
const NML & | operator= (const NML &prototype) |
NML assignment operator. | |
bool | operator== (const NML &prototype) const |
NML comparison operator. | |
std::ostream & | operator<< (std::ostream &os) const |
dump news object to stream | |
std::string | Dump (void) const |
dump the news object as string | |
bool | isValid (void) const |
check whether NML object is valid | |
bool | isRootObject (void) const |
check whether NML object is the root object | |
bool | isMenu (void) const |
check whether NML object is a menu | |
bool | isStatic (void) const |
check whether NML object is static | |
object_type_t | GetObjectType (void) const |
NML object type. | |
const char * | GetObjectTypeString (void) const |
NML object type string. | |
NewsObjectId_t | GetObjectId (void) const |
NML object id. | |
unsigned char | GetRevisionIndex (void) const |
NML revision index. | |
std::string | GetExtendedHeader (void) const |
NML extended header. | |
std::string | GetTitle (void) const |
title of NML object | |
unsigned int | GetNrOfItems (void) const |
number of items contained in NML object | |
const std::vector< Item_t > & | GetItems (void) const |
vector of items contained in NML object | |
std::string | GetItemText (unsigned int i) const |
get specified item contained in NML object | |
NewsObjectId_t | GetLinkId (unsigned int i) const |
get specified link id contained in NML menu. | |
bool | isLinkIdAvailable (unsigned int i) const |
check availability of a depending link id | |
void | SetObjectId (NewsObjectId_t oid) |
set object id | |
void | SetLinkAvailability (unsigned int i, bool f) |
set i-th linked object id (in a menu) availability flag | |
void | SetError (NewsObjectId_t oid, const char *title) |
void | SetErrorDump (NewsObjectId_t oid, const RawNewsObject_t &rno, const char *error_msg) |
set NML to an error object generates a fake NML object containing an error message. | |
Static Public Attributes | |
const unsigned int | NML_MAX_LEN = 2044 |
maximum length of a raw NML object | |
const unsigned int | NML_MAX_NR_OF_LEVELS = 20 |
maximum number of hierarchy levels | |
const unsigned int | NML_MAX_NR_OF_MENU_ITEMS = 32 |
maximum number of menu items | |
const unsigned int | MAX_NR_OF_WATCHES = NML::NML_MAX_NR_OF_MENU_ITEMS + 1 |
maximum number of watches | |
const unsigned int | NML_MIN_NR_OF_ITEM_BYTES = 3 |
minimum number of bytes in a menu or list item | |
const unsigned int | NML_NR_OF_HEADER_BYTES = 3 |
number of header bytes | |
const unsigned short | ROOT_OBJECT_ID = 0x0000 |
object id of root object | |
const char * | ObjectTypeString [] |
textual description of NML object types | |
Private Attributes | |
bool | _valid |
News_t | _news |
NMLEscapeCodeHandler * | _EscapeCodeHandler |
Friends | |
class | NMLFactory |
|
NML object id.
|
|
NML object types.
|
|
default NML constructor
|
|
copy NML constructor
|
|
destructor
|
|
dump the news object as string
|
|
NML extended header.
|
|
vector of items contained in NML object
|
|
get specified item contained in NML object
|
|
get specified link id contained in NML menu. Will only have a useful value if
|
|
number of items contained in NML object
|
|
NML object id.
|
|
NML object type.
|
|
NML object type string.
|
|
NML revision index.
|
|
title of NML object
|
|
check availability of a depending link id
|
|
check whether NML object is a menu
|
|
check whether NML object is the root object
|
|
check whether NML object is static
|
|
check whether NML object is valid
|
|
dump news object to stream
|
|
NML assignment operator.
|
|
NML comparison operator.
|
|
|
|
set NML to an error object generates a fake NML object containing an error message. The title of the error message will be error_msg, and the body will consist of a hex dump of the erroneous raw NML object. and a hex dump of the raw news object
|
|
set i-th linked object id (in a menu) availability flag
|
|
set object id
|
|
|
|
|
|
|
|
|
|
maximum number of watches
|
|
maximum length of a raw NML object
|
|
maximum number of hierarchy levels
|
|
maximum number of menu items
|
|
minimum number of bytes in a menu or list item
|
|
number of header bytes
|
|
Initial value: {"illegal", "menu", "plain", "title", "list"}
|
|
object id of root object
|