| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::Primitive< std::string > Class Template Reference#include <plistPrimitives.h>
Inheritance diagram for plist::Primitive< std::string >:
![]() Detailed Descriptiontemplate<>
Provides a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| Primitive () | |
| constructor | |
| Primitive (const std::string &v) | |
| casting constructor | |
| Primitive (const std::string &v, size_type off, size_type count=npos) | |
| casting constructor | |
| Primitive (const char *v, size_type count) | |
| casting constructor | |
| Primitive (const char *v) | |
| casting constructor | |
| Primitive (size_type count, char v) | |
| casting constructor | |
| Primitive & | operator= (const std::string &v) |
| assignment | |
| Primitive & | operator= (const char *v) |
| assignment | |
| Primitive & | operator= (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) | |
| const std::string & | operator * () const |
| dereference will return data storage as a string (for uniformity with the other Primitives, although unnecessary with this instantiation) | |
| const std::string * | operator-> () const |
| returns a pointer to this (for uniformity with the other Primitives, although unnecessary with this instantiation) | |
| void | loadXML (xmlNode *node) |
| interprets node as a string | |
| void | saveXML (xmlNode *node) const |
| saves the content of the string into node | |
| void | set (const std::string &str) |
| assign a new value | |
| 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< std::string > * | clone () const __attribute__((warn_unused_result)) |
| clone definition for Primitive<std::string> | |
| const std::string & | getPreviousValue () const |
| returns the previously assigned value | |
Protected Attributes | |
| std::string | prevVal |
| stores the previously assigned value for reference/reset by a value listener | |
Classes | |
| struct | conversion_policy |
| plist::Primitive< std::string >::Primitive | ( | ) | [inline] |
| plist::Primitive< std::string >::Primitive | ( | const std::string & | v | ) | [inline] |
| plist::Primitive< std::string >::Primitive | ( | const std::string & | v, | |
| size_type | off, | |||
| size_type | count = npos | |||
| ) | [inline] |
| plist::Primitive< std::string >::Primitive | ( | const char * | v, | |
| size_type | count | |||
| ) | [inline] |
| plist::Primitive< std::string >::Primitive | ( | const char * | v | ) | [inline] |
| plist::Primitive< std::string >::Primitive | ( | size_type | count, | |
| char | v | |||
| ) | [inline] |
| Primitive& plist::Primitive< std::string >::operator= | ( | const std::string & | v | ) | [inline] |
assignment
Reimplemented from plist::PrimitiveBase.
Definition at line 334 of file plistPrimitives.h.
| Primitive& plist::Primitive< std::string >::operator= | ( | const char * | v | ) | [inline] |
| Primitive& plist::Primitive< std::string >::operator= | ( | char | v | ) | [inline] |
| virtual Primitive& plist::Primitive< std::string >::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 337 of file plistPrimitives.h.
| Primitive& plist::Primitive< std::string >::operator= | ( | const Primitive< std::string > & | p | ) | [inline] |
assignment from primitive of the same type (just assign value)
Definition at line 339 of file plistPrimitives.h.
| const std::string& plist::Primitive< std::string >::operator * | ( | ) | const [inline] |
dereference will return data storage as a string (for uniformity with the other Primitives, although unnecessary with this instantiation)
Definition at line 341 of file plistPrimitives.h.
| const std::string* plist::Primitive< std::string >::operator-> | ( | ) | const [inline] |
returns a pointer to this (for uniformity with the other Primitives, although unnecessary with this instantiation)
Definition at line 343 of file plistPrimitives.h.
| void plist::Primitive< std::string >::loadXML | ( | xmlNode * | node | ) | [virtual] |
interprets node as a string
Reimplemented from plist::ObjectBase.
Definition at line 207 of file plistPrimitives.cc.
| void plist::Primitive< std::string >::saveXML | ( | xmlNode * | node | ) | const [virtual] |
saves the content of the string into node
Implements plist::ObjectBase.
Definition at line 229 of file plistPrimitives.cc.
| void plist::Primitive< std::string >::set | ( | const std::string & | str | ) | [inline, virtual] |
assign a new value
Implements plist::PrimitiveBase.
Definition at line 348 of file plistPrimitives.h.
| std::string plist::Primitive< std::string >::get | ( | ) | const [inline, virtual] |
return current value as a string
Implements plist::PrimitiveBase.
Definition at line 350 of file plistPrimitives.h.
| long plist::Primitive< std::string >::toLong | ( | ) | const [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 235 of file plistPrimitives.cc.
| double plist::Primitive< std::string >::toDouble | ( | ) | const [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 236 of file plistPrimitives.cc.
| Primitive< std::string > * plist::Primitive< std::string >::clone | ( | ) | const [virtual] |
clone definition for Primitive<std::string>
implements the clone function for Primitive<std::string>
Implements plist::ObjectBase.
Definition at line 238 of file plistPrimitives.cc.
| const std::string& plist::Primitive< std::string >::getPreviousValue | ( | ) | const [inline] |
std::string plist::Primitive< std::string >::prevVal [protected] |
stores the previously assigned value for reference/reset by a value listener
Definition at line 360 of file plistPrimitives.h.
|
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:57 2007 by Doxygen 1.5.4 |