|
| Castable (const Castable &c) |
| Copy constructor: copies the layout and the pointer to the target.
|
|
template<class F > |
| Castable (F &p) |
| Constructor for an object pointing to a variable.
|
|
template<class F > |
| Castable (F *p) |
|
virtual bool | typeIsSet () const |
|
bool | empty () const |
| Returns true, if string is empty or array size is zero. (In future, semantics may change: 0 for scalars?) More...
|
|
virtual const std::type_info & | getType () const |
| Return the storage type (base type) of the referenced variable.
|
|
bool | isValid () const |
| Return true, if the pointer is set.
|
|
virtual bool | isLinking () const |
| Return true, if the referenced variable is external. Inherited classes - like Variable - may have internal data arrays.
|
|
virtual bool | isVariable () const |
| Returns true, if the class contains an own data array. More...
|
|
bool | isCharArrayString () const |
| Returns true, if type is C char array and outputSepator is the null char.
|
|
bool | isStlString () const |
| Returns true, if type is std::string .
|
|
bool | isString () const |
| Returns true, if type is C char array or std::string .
|
|
virtual size_t | getElementCount () const |
| Returns the length of the array, the number of elements in this entry. More...
|
|
size_t | getElementSize () const |
| Return the size of the current storage type, in bytes. More...
|
|
virtual size_t | getSize () const |
| Returns the size in bytes of the target: (elementCount * elementSize) More...
|
|
Castable & | setFill (bool fill=true) |
| Set or unset filling (padding) an array if input set is smaller.
|
|
void | clear () |
| Clears strings, or for scalars and arrays, sets all the values to zero. Does not change type.
|
|
void | reset () |
|
std::string | getTypeName () const |
| Returns the name of the current storage type. More...
|
|
template<class T > |
Castable & | operator= (const T &x) |
|
Castable & | operator= (const char *c) |
|
template<class T > |
Castable & | operator= (const T *x) |
|
Castable & | operator= (const Castable &c) |
| Copies the value referred to by Castable. Notice that if type is unset (void), no operation is performed. More...
|
|
void | assign (const std::string &c) |
|
void | assign (const char *c) |
|
void | assign (const Castable &c) |
|
template<class T > |
void | assign (const T *p) |
|
template<class T > |
void | assign (const T &x) |
| Copies an arbitrary base type or std::string value.
|
|
template<typename T > |
void | assign (std::initializer_list< T > l) |
| Copies elements of a list.
|
|
template<class T > |
void | assign (const std::list< T > &l) |
| Copies elements of a list.
|
|
template<class T > |
void | assign (const std::vector< T > &v) |
| Copies elements of a vector.
|
|
template<class T > |
void | assign (const std::set< T > &s) |
| Copies elements of a set.
|
|
Castable & | assignCastable (const Castable &c) |
| Copy data from Castable. Perhaps copy size and type, too.
|
|
template<class T > |
Castable & | operator<< (const T &x) |
|
template<class T > |
void | append (const T &x) |
| Appends the string or appends the array by one element.
|
|
void | append (const char *s) |
| Appends the string or appends the array by one element.
|
|
template<class T > |
void | append (const std::list< T > &l) |
| Appends elements of std::list. More...
|
|
template<class T > |
void | append (const std::vector< T > &v) |
| Appends elements of a vector. More...
|
|
template<class T > |
void | append (const std::set< T > &s) |
| Appends elements of a set.
|
|
template<class T > |
T | get (size_t i) const |
|
| operator std::string () const |
| Conversion to std::string. More...
|
|
template<class T > |
| operator T () const |
|
template<class T , size_t N> |
| operator UniTuple< T, N > () const |
|
bool | operator== (const Castable &c) const |
|
bool | operator== (const char *s) const |
| Compare as a character string.
|
|
bool | operator== (const nullptr_t ptr) const |
| Experimental. Notice that if type is set, false is returned also for an empty array. More...
|
|
template<class T > |
bool | operator== (const T &x) const |
| Compares a value to internal data.
|
|
template<class T , size_t N> |
bool | operator== (const UniTuple< T, N > &x) const |
|
template<class T > |
bool | operator!= (const T &x) const |
| Compares a value to inner data.
|
|
bool | operator!= (const char *x) const |
|
template<class T > |
bool | operator< (const T &x) const |
| Compares a value to inner data.
|
|
template<class T > |
bool | operator> (const T &x) const |
| Compares a value with inner data.
|
|
template<class T > |
bool | operator<= (const T &x) const |
| Compares a value to inner data.
|
|
template<class T > |
bool | operator>= (const T &x) const |
| Compares a value with inner data.
|
|
Castable & | setSeparator (char c=',') |
| The character used between array elements in output stream. More...
|
|
void | setInputSeparator (char c=',') |
|
void | setOutputSeparator (char c=',') |
|
char | getInputSeparator () |
|
char | getOutputSeparator () |
|
std::ostream & | toStream (std::ostream &ostr=std::cout, char separator='\0') const |
|
std::istream & | fromStream (std::istream &istr) |
|
std::string | toStr () const |
|
void | typeInfo (std::ostream &ostr) const |
| Writes a string of type indentifier char and size in bytes, for example [C@8] for unsigned char and [s@16] for signed short int.".
|
|
virtual void | info (std::ostream &ostr=std::cout) const |
| Print value, type and element count.
|
|
template<class T > |
void | toSequence (T &container, char separator=0) const |
| Converts data to a STL Sequence, for example std::set, std::list or std::vector . More...
|
|
template<class T > |
void | toMap (T &map, char separator=0, char equalSign='=') const |
|
char * | getPtr (size_t i=0) |
| Returns pointer to the array of chars without validity check. More...
|
|
const char * | getPtr (size_t i=0) const |
|
void | copyFormat (const Castable &c) |
| Copies array layout and formatting: separators, element count, fillArray flag.
|
|
virtual bool | requestType (const std::type_info &t) |
|
virtual bool | suggestType (const std::type_info &t) |
| Request to change in type. For Castable, simply returns true if the current type was requested.
|
|
void | assignString (const std::string &s) |
| Input type specific assign operations.
|
|
template<class T , size_t N> |
void | assign (const UniTuple< T, N > &tuple) |
|
template<class T > |
void | assignContainer (const T &v, bool append=false) |
| Assigns a STL Sequence, element by element.
|
|
const char * | getCharArray () const |
| Returns pointer to the array of chars, checks validity first. More...
|
|
|
virtual void | updateSize (size_t elems) |
|
template<class F > |
void | setType () |
| Sets the storage type. If a target value is available, use setPtr() directly. More...
|
|
virtual void | setType (const std::type_info &t) |
| Sets the storage type. If a target value is available, use setPtr() directly.
|
|
virtual bool | requestSize (size_t elementCount) |
| Request to change the array size. For Castable (and Reference) does nothing and returns false. More...
|
|
template<class F > |
void | setPtr (void *p) |
| Stores the pointer and its storage type F. Assumes elementCount=1.
|
|
template<class F > |
void | setPtr (F &p) |
| Stores the pointer and its storage type F.
|
|
void | setPtr (void *p, const std::type_info &t, size_t count=1) |
| Sets the data pointer and its explicit type.
|
|
template<class F , size_t N> |
void | setPtr (UniTuple< F, N > &tuple) |
| Stores the pair as an array of two elements. More...
|
|
void | relink (Castable &c) |
| Copies the link and element count.
|
|
void | castElement (size_t i, const Caster &c, void *p) const |
| Let Caster c convert my element #i to target *p.
|
|
template<class T > |
void | appendToString (const T &x) |
| Append to std::string or char array. More...
|
|
template<class T > |
void | assignToString (const T &x) |
|
void | assignToCharArray (const std::string &s) |
|
void | assignToCharArray (const char *s) |
|
template<class T > |
void | assignToCharArray (const T &s) |
| Input anything to char array string. More...
|
|
void | appendToElementArray (const char *s) |
|
template<class T > |
void | appendToElementArray (const T &s) |
|