Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::Primitive< unsigned char > Class Template Reference#include <plistPrimitives.h>
Inheritance diagram for plist::Primitive< unsigned char >:
![]() Detailed Descriptiontemplate<>
provides an |
Public Member Functions | |
Primitive () | |
constructor | |
Primitive (const unsigned char &v, bool isNum=false) | |
casting constructor | |
Primitive & | operator= (unsigned char v) |
assignment | |
virtual Primitive & | operator= (const PrimitiveBase &pb) |
assignment (don't assign listeners); doesn't trigger fireValueChanged, subclass should do that from its own operator=() following assignment | |
Primitive & | operator= (const Primitive &p) |
assignment from primitive of the same type (just assign value) | |
Primitive & | operator+= (unsigned char v) |
add-assign | |
Primitive & | operator-= (unsigned char v) |
subtract-assign | |
Primitive & | operator *= (unsigned char v) |
multiple-assign | |
Primitive & | operator/= (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) |
interprets node as a unsigned 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 long | toLong () const |
return current value as an (long) integer (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type) | |
virtual double | toDouble () const |
return current value as a double (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type) | |
virtual Primitive< unsigned char > * | clone () const __attribute__((warn_unused_result)) |
clone definition for Primitive<unsigned char> | |
const unsigned char & | getPreviousValue () const |
returns the previously assigned value | |
Protected Attributes | |
unsigned char | val |
data storage | |
unsigned char | prevVal |
following each assignment, this is the "old" value -- very handy for PrimitiveListeners | |
bool | numeric |
if true, requests that saves store the numeric value instead of corresponding character | |
Classes | |
struct | conversion_policy |
plist::Primitive< unsigned char >::Primitive | ( | ) | [inline] |
plist::Primitive< unsigned char >::Primitive | ( | const unsigned char & | v, | |
bool | isNum = false | |||
) | [inline] |
Primitive& plist::Primitive< unsigned char >::operator= | ( | unsigned char | v | ) | [inline] |
virtual Primitive& plist::Primitive< unsigned char >::operator= | ( | const PrimitiveBase & | pb | ) | [inline, virtual] |
assignment (don't assign listeners); doesn't trigger fireValueChanged, subclass should do that from its own operator=() following assignment
Reimplemented from plist::PrimitiveBase.
Definition at line 279 of file plistPrimitives.h.
Primitive& plist::Primitive< unsigned char >::operator= | ( | const Primitive< unsigned char > & | p | ) | [inline] |
assignment from primitive of the same type (just assign value)
Definition at line 281 of file plistPrimitives.h.
Primitive& plist::Primitive< unsigned char >::operator+= | ( | unsigned char | v | ) | [inline] |
Primitive& plist::Primitive< unsigned char >::operator-= | ( | unsigned char | v | ) | [inline] |
Primitive& plist::Primitive< unsigned char >::operator *= | ( | unsigned char | v | ) | [inline] |
Primitive& plist::Primitive< unsigned char >::operator/= | ( | unsigned char | v | ) | [inline] |
const unsigned char& plist::Primitive< unsigned char >::operator * | ( | ) | const [inline] |
const unsigned char* plist::Primitive< unsigned char >::operator-> | ( | ) | const [inline] |
plist::Primitive< unsigned char >::operator unsigned char | ( | ) | const [inline] |
void plist::Primitive< unsigned char >::setNumeric | ( | bool | isNum | ) | [inline] |
bool plist::Primitive< unsigned char >::getNumeric | ( | ) | const [inline] |
void plist::Primitive< unsigned char >::loadXML | ( | xmlNode * | node | ) | [virtual] |
interprets node as a unsigned char
Reimplemented from plist::ObjectBase.
Definition at line 135 of file plistPrimitives.cc.
void plist::Primitive< unsigned char >::saveXML | ( | xmlNode * | node | ) | const [virtual] |
subclasses are expected to provide a working implementation
Implements plist::ObjectBase.
Definition at line 170 of file plistPrimitives.cc.
void plist::Primitive< unsigned char >::set | ( | const std::string & | str | ) | [virtual] |
saves val into node
Implements plist::PrimitiveBase.
Definition at line 184 of file plistPrimitives.cc.
std::string plist::Primitive< unsigned char >::get | ( | ) | const [inline, virtual] |
return current value as a string
Implements plist::PrimitiveBase.
Definition at line 299 of file plistPrimitives.h.
virtual long plist::Primitive< unsigned char >::toLong | ( | ) | const [inline, virtual] |
return current value as an (long) integer (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type)
Implements plist::ObjectBase.
Definition at line 307 of file plistPrimitives.h.
virtual double plist::Primitive< unsigned char >::toDouble | ( | ) | const [inline, virtual] |
return current value as a double (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type)
Implements plist::ObjectBase.
Definition at line 308 of file plistPrimitives.h.
Primitive< unsigned char > * plist::Primitive< unsigned char >::clone | ( | ) | const [virtual] |
clone definition for Primitive<unsigned char>
implements the clone function for Primitive<unsigned char>
Implements plist::ObjectBase.
Definition at line 204 of file plistPrimitives.cc.
const unsigned char& plist::Primitive< unsigned char >::getPreviousValue | ( | ) | const [inline] |
unsigned char plist::Primitive< unsigned char >::val [protected] |
unsigned char plist::Primitive< unsigned char >::prevVal [protected] |
following each assignment, this is the "old" value -- very handy for PrimitiveListeners
Definition at line 317 of file plistPrimitives.h.
bool plist::Primitive< unsigned char >::numeric [protected] |
if true, requests that saves store the numeric value instead of corresponding character
Definition at line 318 of file plistPrimitives.h.
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:57 2007 by Doxygen 1.5.4 |