Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

plist::Primitive< unsigned char > Class Template Reference

#include <plist.h>

Inheritance diagram for plist::Primitive< unsigned char >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<>
class plist::Primitive< unsigned char >

provides an unsigned char specialization of Primitive<T>

A char can be treated as either a string or an integer, you can use the setNumeric(bool) function to indicate which style to use when saving

Definition at line 430 of file plist.h.

Public Member Functions

 Primitive ()
 constructor
 Primitive (const unsigned char &v, bool isNum=false)
 casting constructor
Primitiveoperator= (const unsigned char &v)
 assignment
Primitiveoperator+= (const unsigned char &v)
 add-assign
Primitiveoperator-= (const unsigned char &v)
 subtract-assign
Primitiveoperator *= (const unsigned char &v)
 multiple-assign
Primitiveoperator/= (const unsigned char &v)
 divide-assign
const unsigned char & operator * () const
 dereference will return data storage
const unsigned char * operator-> () const
 can use -> to access members of data storage
 operator unsigned char () const
 casting operator
void setNumeric (bool isNum)
 sets numeric
bool getNumeric () const
 returns numeric
void LoadXML (xmlNode *node)
 This is called when the subclass needs to update its values from those values in the parse tree.
void SaveXML (xmlNode *node) const
 This is called when XMLLoadSave needs to have the subclass update values in the tree currently in memory -- may already be filled out by previous contents.
void set (const std::string &str)
 assign a new value
std::string get () const
 return current value as a string

Protected Attributes

unsigned char val
 data storage
bool numeric
 if true, requests that saves store the numeric value instead of corresponding character


Member Function Documentation

std::string plist::Primitive< unsigned char >::get  )  const [inline, virtual]
 

return current value as a string

Implements plist::PrimitiveBase.

Definition at line 498 of file plist.h.

bool plist::Primitive< unsigned char >::getNumeric  )  const [inline]
 

returns numeric

Definition at line 445 of file plist.h.

void plist::Primitive< unsigned char >::LoadXML xmlNode node  )  [inline, virtual]
 

This is called when the subclass needs to update its values from those values in the parse tree.

node is the current node in the tree -- it may be the root, but it may also be a subnode within the tree if a recursive structure is used

Implements XMLLoadSave.

Definition at line 446 of file plist.h.

const unsigned char& plist::Primitive< unsigned char >::operator *  )  const [inline]
 

dereference will return data storage

Definition at line 440 of file plist.h.

Primitive& plist::Primitive< unsigned char >::operator *= const unsigned char &  v  )  [inline]
 

multiple-assign

Definition at line 437 of file plist.h.

plist::Primitive< unsigned char >::operator unsigned char  )  const [inline]
 

casting operator

Definition at line 443 of file plist.h.

Primitive& plist::Primitive< unsigned char >::operator+= const unsigned char &  v  )  [inline]
 

add-assign

Definition at line 435 of file plist.h.

Primitive& plist::Primitive< unsigned char >::operator-= const unsigned char &  v  )  [inline]
 

subtract-assign

Definition at line 436 of file plist.h.

const unsigned char* plist::Primitive< unsigned char >::operator->  )  const [inline]
 

can use -> to access members of data storage

Definition at line 442 of file plist.h.

Primitive& plist::Primitive< unsigned char >::operator/= const unsigned char &  v  )  [inline]
 

divide-assign

Definition at line 438 of file plist.h.

Primitive& plist::Primitive< unsigned char >::operator= const unsigned char &  v  )  [inline]
 

assignment

Definition at line 434 of file plist.h.

plist::Primitive< unsigned char >::Primitive const unsigned char &  v,
bool  isNum = false
[inline]
 

casting constructor

Definition at line 433 of file plist.h.

plist::Primitive< unsigned char >::Primitive  )  [inline]
 

constructor

Definition at line 432 of file plist.h.

void plist::Primitive< unsigned char >::SaveXML xmlNode node  )  const [inline, virtual]
 

This is called when XMLLoadSave needs to have the subclass update values in the tree currently in memory -- may already be filled out by previous contents.

node is the current node in the tree -- it may be the root, but it may also be a subnode within the tree if a recursive structure is used

Implements XMLLoadSave.

Definition at line 477 of file plist.h.

void plist::Primitive< unsigned char >::set const std::string &  str  )  [inline, virtual]
 

assign a new value

Implements plist::PrimitiveBase.

Definition at line 491 of file plist.h.

void plist::Primitive< unsigned char >::setNumeric bool  isNum  )  [inline]
 

sets numeric

Definition at line 444 of file plist.h.


Member Data Documentation

bool plist::Primitive< unsigned char >::numeric [protected]
 

if true, requests that saves store the numeric value instead of corresponding character

Definition at line 503 of file plist.h.

unsigned char plist::Primitive< unsigned char >::val [protected]
 

data storage

Definition at line 502 of file plist.h.


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

Tekkotsu v2.4.1
Generated Tue Aug 16 16:35:14 2005 by Doxygen 1.4.4