Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

plist::Primitive< char > Class Template Reference

#include <plist.h>

Inheritance diagram for plist::Primitive< char >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<>
class plist::Primitive< char >

provides a 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 349 of file plist.h.

Public Member Functions

 Primitive ()
 constructor
 Primitive (const char &v, bool isNum=false)
 casting constructor
Primitiveoperator= (const char &v)
 assignment
Primitiveoperator+= (const char &v)
 add-assign
Primitiveoperator-= (const char &v)
 subtract-assign
Primitiveoperator *= (const char &v)
 multiply-assign
Primitiveoperator/= (const char &v)
 divide-assign
const char & operator * () const
 dereference will return data storage
const char * operator-> () const
 can use -> to access members of data storage
 operator 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

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< char >::get  )  const [inline, virtual]
 

return current value as a string

Implements plist::PrimitiveBase.

Definition at line 418 of file plist.h.

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

returns numeric

Definition at line 364 of file plist.h.

void plist::Primitive< 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 365 of file plist.h.

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

dereference will return data storage

Definition at line 359 of file plist.h.

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

multiply-assign

Definition at line 356 of file plist.h.

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

casting operator

Definition at line 362 of file plist.h.

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

add-assign

Definition at line 354 of file plist.h.

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

subtract-assign

Definition at line 355 of file plist.h.

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

can use -> to access members of data storage

Definition at line 361 of file plist.h.

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

divide-assign

Definition at line 357 of file plist.h.

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

assignment

Definition at line 353 of file plist.h.

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

casting constructor

Definition at line 352 of file plist.h.

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

constructor

Definition at line 351 of file plist.h.

void plist::Primitive< 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 396 of file plist.h.

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

assign a new value

Implements plist::PrimitiveBase.

Definition at line 410 of file plist.h.

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

sets numeric

Definition at line 363 of file plist.h.


Member Data Documentation

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

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

Definition at line 423 of file plist.h.

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

data storage

Definition at line 422 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