Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

plist::Primitive< char > Class Template Reference

#include <plistPrimitives.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 plist::Primitive<T>, adds a unique numeric property to the usual template implementation

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 123 of file plistPrimitives.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)
 interprets node as a char
void saveXML (xmlNode *node) const
 subclasses are expected to provide a working implementation
void set (const std::string &str)
 saves val into node
std::string get () const
 return current value as a string
virtual Primitive< char > * clone () const __attribute__((warn_unused_result))
 implements the clone function for Primitive<char>

Protected Attributes

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


Constructor & Destructor Documentation

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

constructor

Definition at line 125 of file plistPrimitives.h.

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

casting constructor

Definition at line 126 of file plistPrimitives.h.


Member Function Documentation

Primitive< char > * plist::Primitive< char >::clone (  )  const [virtual]

implements the clone function for Primitive<char>

Implements plist::ObjectBase.

Definition at line 123 of file plistPrimitives.cc.

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

return current value as a string

Implements plist::PrimitiveBase.

Definition at line 144 of file plistPrimitives.h.

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

returns numeric

Definition at line 139 of file plistPrimitives.h.

void plist::Primitive< char >::loadXML ( xmlNode node  )  [virtual]

interprets node as a char

Reimplemented from plist::ObjectBase.

Definition at line 59 of file plistPrimitives.cc.

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

dereference will return data storage

Definition at line 133 of file plistPrimitives.h.

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

multiply-assign

Definition at line 130 of file plistPrimitives.h.

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

casting operator

Definition at line 136 of file plistPrimitives.h.

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

add-assign

Definition at line 128 of file plistPrimitives.h.

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

subtract-assign

Definition at line 129 of file plistPrimitives.h.

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

can use -> to access members of data storage

Definition at line 135 of file plistPrimitives.h.

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

divide-assign

Definition at line 131 of file plistPrimitives.h.

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

assignment

Definition at line 127 of file plistPrimitives.h.

void plist::Primitive< char >::saveXML ( xmlNode node  )  const [virtual]

subclasses are expected to provide a working implementation

Implements plist::ObjectBase.

Definition at line 90 of file plistPrimitives.cc.

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

saves val into node

Implements plist::PrimitiveBase.

Definition at line 104 of file plistPrimitives.cc.

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

sets numeric

Definition at line 138 of file plistPrimitives.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 157 of file plistPrimitives.h.

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

data storage

Definition at line 153 of file plistPrimitives.h.


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

Tekkotsu v3.0
Generated Wed Oct 4 00:05:23 2006 by Doxygen 1.4.7