Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::RGBColor< T > Class Template Reference
Inheritance diagram for plist::RGBColor< T >:
Detailed Descriptiontemplate<class T>
|
Public Member Functions | |
RGBColor () | |
RGBColor (T r, T g, T b, T a=getMax()) | |
virtual void | loadXML (xmlNode *node) |
This specialization looks for the SensorInfo::sensorType, then has the factory construct the correct subtype before loading the node into and returning that. | |
virtual void | saveXML (xmlNode *node) const |
subclasses are expected to provide a working implementation | |
virtual void | set (const RGBColor< T > &x) |
virtual void | set (const plist::ObjectBase &x) |
polymorphic assignment (throws std::bad_cast if the assignment is between invalid types, i.e. a primitive and a collection, or different collection types) | |
virtual void | set (const std::string &str) |
plist::Primitive< T > & | operator[] (int i) |
const plist::Primitive< T > & | operator[] (int i) const |
virtual std::string | toString () const |
return current value as a string | |
virtual size_t | size () const |
return the size of the dictionary | |
virtual void | clear () |
remove all entries in one fell swoop | |
ObjectBase * | resolveEntry (const std::string &s) const |
returns a pointer to entry with the specified 'path', which may recurse through sub-collections | |
unsigned int | getLongestKeyLen (const regex_t *reg, unsigned int depth) const |
returns the length of the longest key, subject to an optional regular expression and max depth | |
virtual bool | canContain (const ObjectBase &obj) |
returns true if the Collection subclass allows storage of the argument | |
virtual RGBColor * | clone () const __attribute__((warn_unused_result)) |
clone implementation for Dictionary | |
template<> | |
float | getMax () |
template<> | |
double | getMax () |
template<> | |
unsigned char | fromByte (unsigned char x) |
template<> | |
char | fromByte (unsigned char x) |
template<> | |
float | fromByte (unsigned char x) |
template<> | |
double | fromByte (unsigned char x) |
template<> | |
float | fromReal (double x) |
template<> | |
double | fromReal (double x) |
template<> | |
void | setNumeric (plist::Primitive< char > &n) |
template<> | |
void | setNumeric (plist::Primitive< unsigned char > &n) |
Public Attributes | |
plist::Primitive< T > | red |
plist::Primitive< T > | green |
plist::Primitive< T > | blue |
plist::Primitive< T > | alpha |
Protected Member Functions | |
virtual void | fireEntryRemoved (ObjectBase &val) |
run through collectionListeners, calling CollectionListener::plistCollectionEntryRemoved(*this,val) | |
void | init () |
Static Protected Member Functions | |
static float | makeFloat (const T &v) |
static int | makeInt (const T &v) |
static T | fromByte (unsigned char x) |
static T | fromReal (double x) |
static T | getMax () |
static void | setNumeric (plist::Primitive< T > &) |
plist::RGBColor< T >::RGBColor | ( | ) |
Definition at line 239 of file plistSpecialty.h.
plist::RGBColor< T >::RGBColor | ( | T | r, | |
T | g, | |||
T | b, | |||
T | a = getMax() | |||
) |
Definition at line 240 of file plistSpecialty.h.
virtual bool plist::RGBColor< T >::canContain | ( | const ObjectBase & | obj | ) | [virtual] |
returns true if the Collection subclass allows storage of the argument
Reimplemented from plist::DictionaryOf< plist::Primitive< T > >.
Definition at line 276 of file plistSpecialty.h.
virtual void plist::RGBColor< T >::clear | ( | ) | [virtual] |
remove all entries in one fell swoop
Reimplemented from plist::DictionaryBase.
Definition at line 265 of file plistSpecialty.h.
RGBColor< T > * plist::RGBColor< T >::clone | ( | ) | const [virtual] |
clone implementation for Dictionary
Reimplemented from plist::DictionaryOf< plist::Primitive< T > >.
Definition at line 498 of file plistSpecialty.h.
void plist::RGBColor< T >::fireEntryRemoved | ( | ObjectBase & | val | ) | [protected, virtual] |
run through collectionListeners, calling CollectionListener::plistCollectionEntryRemoved(*this,val)
Reimplemented from plist::DictionaryBase.
Definition at line 500 of file plistSpecialty.h.
double plist::RGBColor< double >::fromByte | ( | unsigned char | x | ) |
Definition at line 314 of file plistSpecialty.h.
float plist::RGBColor< float >::fromByte | ( | unsigned char | x | ) |
Definition at line 313 of file plistSpecialty.h.
char plist::RGBColor< char >::fromByte | ( | unsigned char | x | ) |
Definition at line 312 of file plistSpecialty.h.
unsigned char plist::RGBColor< unsigned char >::fromByte | ( | unsigned char | x | ) |
Definition at line 311 of file plistSpecialty.h.
static T plist::RGBColor< T >::fromByte | ( | unsigned char | x | ) | [static, protected] |
Definition at line 285 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::set().
double plist::RGBColor< double >::fromReal | ( | double | x | ) |
Definition at line 317 of file plistSpecialty.h.
float plist::RGBColor< float >::fromReal | ( | double | x | ) |
Definition at line 316 of file plistSpecialty.h.
static T plist::RGBColor< T >::fromReal | ( | double | x | ) | [static, protected] |
Definition at line 286 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::set().
unsigned int plist::RGBColor< T >::getLongestKeyLen | ( | const regex_t * | reg, | |
unsigned int | depth | |||
) | const [virtual] |
returns the length of the longest key, subject to an optional regular expression and max depth
Reimplemented from plist::DictionaryBase.
Definition at line 275 of file plistSpecialty.h.
double plist::RGBColor< double >::getMax | ( | ) |
Definition at line 309 of file plistSpecialty.h.
float plist::RGBColor< float >::getMax | ( | ) |
Definition at line 308 of file plistSpecialty.h.
static T plist::RGBColor< T >::getMax | ( | ) | [static, protected] |
Definition at line 287 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::fromReal(), plist::RGBColor< T >::loadXML(), plist::RGBColor< T >::makeFloat(), plist::RGBColor< T >::set(), and plist::RGBColor< T >::toString().
void plist::RGBColor< T >::init | ( | ) | [protected] |
Definition at line 290 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::clear(), and plist::RGBColor< T >::RGBColor().
void plist::RGBColor< T >::loadXML | ( | xmlNode * | node | ) | [virtual] |
This specialization looks for the SensorInfo::sensorType, then has the factory construct the correct subtype before loading the node into and returning that.
From the name of node, will instantiate a new ObjectBase subclass to load it.
supports use of plist::ArrayOf<PlannerObstacle> for polymorphic load/save
The mapping from node names to actual instantiated types is:
If successful, returns a pointer to a newly allocated region, which the caller is responsible for freeing. If an error occurs, NULL is returned.
attempts to load a new T instance from the specified xmlNode
Reimplemented from plist::DictionaryBase.
Definition at line 322 of file plistSpecialty.h.
static float plist::RGBColor< T >::makeFloat | ( | const T & | v | ) | [static, protected] |
Definition at line 283 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::makeInt(), and plist::RGBColor< T >::toString().
static int plist::RGBColor< T >::makeInt | ( | const T & | v | ) | [static, protected] |
Definition at line 284 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::toString().
const plist::Primitive<T>& plist::RGBColor< T >::operator[] | ( | int | i | ) | const |
Definition at line 259 of file plistSpecialty.h.
plist::Primitive<T>& plist::RGBColor< T >::operator[] | ( | int | i | ) |
Definition at line 258 of file plistSpecialty.h.
ObjectBase* plist::RGBColor< T >::resolveEntry | ( | const std::string & | path | ) | const [virtual] |
returns a pointer to entry with the specified 'path', which may recurse through sub-collections
Reimplemented from plist::DictionaryBase.
Definition at line 271 of file plistSpecialty.h.
void plist::RGBColor< T >::saveXML | ( | xmlNode * | node | ) | const [virtual] |
subclasses are expected to provide a working implementation
Reimplemented from plist::DictionaryBase.
Definition at line 347 of file plistSpecialty.h.
void plist::RGBColor< T >::set | ( | const std::string & | str | ) | [virtual] |
Definition at line 374 of file plistSpecialty.h.
void plist::RGBColor< T >::set | ( | const plist::ObjectBase & | ) | [virtual] |
polymorphic assignment (throws std::bad_cast if the assignment is between invalid types, i.e. a primitive and a collection, or different collection types)
Reimplemented from plist::DictionaryOf< plist::Primitive< T > >.
Definition at line 364 of file plistSpecialty.h.
void plist::RGBColor< T >::set | ( | const RGBColor< T > & | x | ) | [virtual] |
Definition at line 358 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::set().
void plist::RGBColor< unsigned char >::setNumeric | ( | plist::Primitive< unsigned char > & | n | ) |
Definition at line 320 of file plistSpecialty.h.
void plist::RGBColor< char >::setNumeric | ( | plist::Primitive< char > & | n | ) |
Definition at line 319 of file plistSpecialty.h.
static void plist::RGBColor< T >::setNumeric | ( | plist::Primitive< T > & | ) | [static, protected] |
Definition at line 288 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::init().
virtual size_t plist::RGBColor< T >::size | ( | ) | const [virtual] |
return the size of the dictionary
Reimplemented from plist::DictionaryBase.
Definition at line 263 of file plistSpecialty.h.
std::string plist::RGBColor< T >::toString | ( | ) | const [virtual] |
return current value as a string
Reimplemented from plist::DictionaryBase.
Definition at line 488 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::saveXML().
plist::Primitive<T> plist::RGBColor< T >::alpha |
Definition at line 245 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::init(), plist::RGBColor< T >::set(), and plist::RGBColor< T >::toString().
plist::Primitive<T> plist::RGBColor< T >::blue |
Definition at line 244 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::init(), plist::RGBColor< T >::set(), and plist::RGBColor< T >::toString().
plist::Primitive<T> plist::RGBColor< T >::green |
Definition at line 243 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::init(), plist::RGBColor< T >::set(), and plist::RGBColor< T >::toString().
plist::Primitive<T> plist::RGBColor< T >::red |
Definition at line 242 of file plistSpecialty.h.
Referenced by plist::RGBColor< T >::init(), plist::RGBColor< T >::set(), and plist::RGBColor< T >::toString().
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:25 2016 by Doxygen 1.6.3 |