NEOCCA bindings Specification
0.2.8
|
A CCA typed hash map. More...
#include <TypeMap.hh>
Public Member Functions | |
virtual | ~TypeMap () |
required destructor | |
virtual TypeMap_shared | cloneData ()=0 |
Create an exact copy of this Map. | |
virtual TypeMap_shared | cloneEmpty ()=0 |
Create a new Map with no key/value associations. | |
virtual int32_t | getInt (const ::std::string &key, int32_t defaultValue)=0 throw (TypeMismatchException ) |
Get the Int value associated with a given key. | |
virtual int64_t | getLong (const ::std::string &key, int64_t defaultValue)=0 throw (TypeMismatchException ) |
Get the Long value associated with a given key. | |
virtual float | getFloat (const ::std::string &key, float defaultValue)=0 throw (TypeMismatchException ) |
Get the Float value associated with a given key. | |
virtual double | getDouble (const ::std::string &key, double defaultValue)=0 throw (TypeMismatchException ) |
Get the Double value associated with a given key. | |
virtual ::std::complex< float > | getFcomplex (const ::std::string &key,::std::complex< float > defaultValue)=0 throw (TypeMismatchException ) |
Get the Fcomplex value associated with a given key. | |
virtual ::std::complex< double > | getDcomplex (const ::std::string &key,::std::complex< double > defaultValue)=0 throw (TypeMismatchException ) |
Get the Dcomplex value associated with a given key. | |
virtual ::std::string | getString (const ::std::string &key,::std::string defaultValue)=0 throw (TypeMismatchException ) |
Get the string value associated with a given key. | |
virtual bool | getBool (const ::std::string &key, bool defaultValue)=0 throw (TypeMismatchException ) |
Get the boolean value associated with a given key. | |
virtual ::std::vector< int32_t > | getIntArray (const ::std::string &key,::std::vector< int32_t > &defaultValue)=0 throw (TypeMismatchException ) |
Get the value associated with a given key. | |
virtual ::std::vector< int64_t > | getLongArray (const ::std::string &key,::std::vector< int64_t > &defaultValue)=0 throw (TypeMismatchException ) |
Get the value associated with a given key. | |
virtual ::std::vector< float > | getFloatArray (const ::std::string &key,::std::vector< float > &defaultValue)=0 throw (TypeMismatchException ) |
Get the value associated with a given key. | |
virtual ::std::vector< double > | getDoubleArray (const ::std::string &key,::std::vector< double > &defaultValue)=0 throw (TypeMismatchException ) |
Get the value associated with a given key. | |
virtual ::std::vector < ::std::complex< float > > | getFcomplexArray (const ::std::string &key,::std::vector< ::std::complex< float > > &defaultValue)=0 throw (TypeMismatchException ) |
Get the complex value associated with a given key. | |
virtual ::std::vector < ::std::complex< double > > | getDcomplexArray (const ::std::string &key,::std::vector< ::std::complex< double > > &defaultValue)=0 throw (TypeMismatchException ) |
Get the complex value associated with a given key. | |
virtual ::std::vector < ::std::string > | getStringArray (const ::std::string &key,::std::vector< ::std::string > &defaultValue)=0 throw (TypeMismatchException ) |
Get the value associated with a given key. | |
virtual ::std::vector< bool > | getBoolArray (const ::std::string &key,::std::vector< bool > &defaultValue)=0 throw (TypeMismatchException ) |
Get the value associated with a given key. | |
virtual void | putInt (const ::std::string &key, int value)=0 |
Assign a key and value. | |
virtual void | putLong (const ::std::string &key, int64_t value)=0 |
Assign a key and value. | |
virtual void | putFloat (const ::std::string &key, float value)=0 |
Assign a key and value. | |
virtual void | putDouble (const ::std::string &key, double value)=0 |
Assign a key and value. | |
virtual void | putFcomplex (const ::std::string &key,::std::complex< float > value)=0 |
Assign a key and complex value. | |
virtual void | putDcomplex (const ::std::string &key,::std::complex< double > value)=0 |
Assign a key and complex value. | |
virtual void | putString (const ::std::string &key, const ::std::string &value)=0 |
Assign a key and value. | |
virtual void | putBool (const ::std::string &key, bool value)=0 |
Assign a key and value. | |
virtual void | putIntArray (const ::std::string &key, int *value, int length)=0 |
Assign a key and value. | |
virtual void | putIntArray (const ::std::string &key,::std::vector< int > &value)=0 |
c++ convenience function. | |
virtual void | putLongArray (const ::std::string &key, int64_t *value, int length)=0 |
Assign a key and value. | |
virtual void | putLongArray (const ::std::string &key,::std::vector< int64_t > &value)=0 |
c++ convenience function. | |
virtual void | putFloatArray (const ::std::string &key, float *value, int length)=0 |
Assign a key and value. | |
virtual void | putFloatArray (const ::std::string &key,::std::vector< float > &value)=0 |
c++ convenience function. | |
virtual void | putDoubleArray (const ::std::string &key, double *value, int length)=0 |
Assign a key and value. | |
virtual void | putDoubleArray (const ::std::string &key,::std::vector< double > &value)=0 |
c++ convenience function. | |
virtual void | putFcomplexArray (const ::std::string &key,::std::complex< float > *value, int length)=0 |
Assign a key and complex array value. | |
virtual void | putFcomplexArray (const ::std::string &key,::std::vector< ::std::complex< float > > &value)=0 |
c++ convenience function. | |
virtual void | putDcomplexArray (const ::std::string &key,::std::complex< double > *value, int length)=0 |
Assign a key and complex array value. | |
virtual void | putDcomplexArray (const ::std::string &key,::std::vector< ::std::complex< double > > &value)=0 |
c++ convenience function. | |
virtual void | putStringArray (const ::std::string &key,::std::vector< ::std::string > &value)=0 |
Assign a key and value. | |
virtual void | putBoolArray (const ::std::string &key, bool *value, int length)=0 |
Assign a key and value. | |
virtual void | putBoolArray (const ::std::string &key,::std::vector< bool > &value)=0 |
c++ convenience function. | |
virtual void | remove (const ::std::string &key)=0 |
Make the key and associated value disappear from the object. | |
virtual ::std::vector < ::std::string > | getAllKeys (enum Type t)=0 |
Get all the names associated with a particular type without exposing the data implementation details. | |
virtual bool | hasKey (const ::std::string &key)=0 |
Return true if the key exists in this map. | |
virtual enum Type | typeOf (const ::std::string &key)=0 |
Return the type of the value associated with this key. |
A CCA typed hash map.
Maps a string key to a particular value. Types are strictly enforced. For example, values places into the map using putInt can be retrieved only using getInt. Calls to getLong, getString, getIntArray and other get methods will fail (i.e. return the default value) if the value stored is of type Int.
virtual neo::cca::TypeMap::~TypeMap | ( | ) | [inline, virtual] |
required destructor
{}
virtual TypeMap_shared neo::cca::TypeMap::cloneData | ( | ) | [pure virtual] |
Create an exact copy of this Map.
virtual TypeMap_shared neo::cca::TypeMap::cloneEmpty | ( | ) | [pure virtual] |
Create a new Map with no key/value associations.
virtual int32_t neo::cca::TypeMap::getInt | ( | const ::std::string & | key, |
int32_t | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the Int value associated with a given key.
If the key was not found, return the value defaultValue.
virtual int64_t neo::cca::TypeMap::getLong | ( | const ::std::string & | key, |
int64_t | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the Long value associated with a given key.
If the key was not found, return the value defaultValue.
virtual float neo::cca::TypeMap::getFloat | ( | const ::std::string & | key, |
float | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the Float value associated with a given key.
If the key was not found, return the value defaultValue.
virtual double neo::cca::TypeMap::getDouble | ( | const ::std::string & | key, |
double | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the Double value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::complex<float> neo::cca::TypeMap::getFcomplex | ( | const ::std::string & | key, |
::std::complex< float > | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the Fcomplex value associated with a given key.
If the key was not found, return complex the value defaultValue.
virtual ::std::complex<double> neo::cca::TypeMap::getDcomplex | ( | const ::std::string & | key, |
::std::complex< double > | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the Dcomplex value associated with a given key.
If the key was not found, return the complex value defaultValue.
virtual ::std::string neo::cca::TypeMap::getString | ( | const ::std::string & | key, |
::std::string | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the string value associated with a given key.
If the key was not found, return the value defaultValue.
virtual bool neo::cca::TypeMap::getBool | ( | const ::std::string & | key, |
bool | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the boolean value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::vector< int32_t > neo::cca::TypeMap::getIntArray | ( | const ::std::string & | key, |
::std::vector< int32_t > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::vector< int64_t > neo::cca::TypeMap::getLongArray | ( | const ::std::string & | key, |
::std::vector< int64_t > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::vector< float > neo::cca::TypeMap::getFloatArray | ( | const ::std::string & | key, |
::std::vector< float > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::vector< double > neo::cca::TypeMap::getDoubleArray | ( | const ::std::string & | key, |
::std::vector< double > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::vector< ::std::complex<float> > neo::cca::TypeMap::getFcomplexArray | ( | const ::std::string & | key, |
::std::vector< ::std::complex< float > > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the complex value associated with a given key.
If the key was not found, return the complex value defaultValue.
virtual ::std::vector< ::std::complex<double> > neo::cca::TypeMap::getDcomplexArray | ( | const ::std::string & | key, |
::std::vector< ::std::complex< double > > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the complex value associated with a given key.
If the key was not found, return the complex value defaultValue.
virtual ::std::vector< ::std::string > neo::cca::TypeMap::getStringArray | ( | const ::std::string & | key, |
::std::vector< ::std::string > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the value associated with a given key.
If the key was not found, return the value defaultValue.
virtual ::std::vector< bool > neo::cca::TypeMap::getBoolArray | ( | const ::std::string & | key, |
::std::vector< bool > & | defaultValue | ||
) | throw (TypeMismatchException ) [pure virtual] |
Get the value associated with a given key.
If the key was not found, return the value defaultValue.
virtual void neo::cca::TypeMap::putInt | ( | const ::std::string & | key, |
int | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.
virtual void neo::cca::TypeMap::putLong | ( | const ::std::string & | key, |
int64_t | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.
virtual void neo::cca::TypeMap::putFloat | ( | const ::std::string & | key, |
float | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.
virtual void neo::cca::TypeMap::putDouble | ( | const ::std::string & | key, |
double | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.
virtual void neo::cca::TypeMap::putFcomplex | ( | const ::std::string & | key, |
::std::complex< float > | value | ||
) | [pure virtual] |
Assign a key and complex value.
Any complex value previously assigned will be overwritten.
virtual void neo::cca::TypeMap::putDcomplex | ( | const ::std::string & | key, |
::std::complex< double > | value | ||
) | [pure virtual] |
Assign a key and complex value.
Any complex value previously assigned will be overwritten.
virtual void neo::cca::TypeMap::putString | ( | const ::std::string & | key, |
const ::std::string & | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.
virtual void neo::cca::TypeMap::putBool | ( | const ::std::string & | key, |
bool | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.
virtual void neo::cca::TypeMap::putIntArray | ( | const ::std::string & | key, |
int * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical. Arrays are stored by COPY, not by reference.
virtual void neo::cca::TypeMap::putIntArray | ( | const ::std::string & | key, |
::std::vector< int > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::putLongArray | ( | const ::std::string & | key, |
int64_t * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical. Arrays are stored by COPY, not by reference.
virtual void neo::cca::TypeMap::putLongArray | ( | const ::std::string & | key, |
::std::vector< int64_t > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::putFloatArray | ( | const ::std::string & | key, |
float * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical. Arrays are stored by COPY, not by reference.
virtual void neo::cca::TypeMap::putFloatArray | ( | const ::std::string & | key, |
::std::vector< float > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::putDoubleArray | ( | const ::std::string & | key, |
double * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical. Arrays are stored by COPY, not by reference.
virtual void neo::cca::TypeMap::putDoubleArray | ( | const ::std::string & | key, |
::std::vector< double > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::putFcomplexArray | ( | const ::std::string & | key, |
::std::complex< float > * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and complex array value.
Any value previously assigned to the same key will be overwritten if type identical. Complex arrays are stored by COPY.
virtual void neo::cca::TypeMap::putFcomplexArray | ( | const ::std::string & | key, |
::std::vector< ::std::complex< float > > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::putDcomplexArray | ( | const ::std::string & | key, |
::std::complex< double > * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and complex array value.
Any value previously assigned to the same key will be overwritten if type identical. Complex arrays are stored by COPY.
virtual void neo::cca::TypeMap::putDcomplexArray | ( | const ::std::string & | key, |
::std::vector< ::std::complex< double > > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::putStringArray | ( | const ::std::string & | key, |
::std::vector< ::std::string > & | value | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical.. Arrays are stored by COPY, not by reference.
virtual void neo::cca::TypeMap::putBoolArray | ( | const ::std::string & | key, |
bool * | value, | ||
int | length | ||
) | [pure virtual] |
Assign a key and value.
Any value previously assigned to the same key will be overwritten if type identical. Arrays are stored by COPY, not by reference.
virtual void neo::cca::TypeMap::putBoolArray | ( | const ::std::string & | key, |
::std::vector< bool > & | value | ||
) | [pure virtual] |
c++ convenience function.
virtual void neo::cca::TypeMap::remove | ( | const ::std::string & | key | ) | [pure virtual] |
Make the key and associated value disappear from the object.
virtual ::std::vector< ::std::string > neo::cca::TypeMap::getAllKeys | ( | enum Type | t | ) | [pure virtual] |
Get all the names associated with a particular type without exposing the data implementation details.
The keys will be returned in an arbitrary order. If type specified is NoType (no specification) all keys of all types are returned.
virtual bool neo::cca::TypeMap::hasKey | ( | const ::std::string & | key | ) | [pure virtual] |
Return true if the key exists in this map.
virtual enum Type neo::cca::TypeMap::typeOf | ( | const ::std::string & | key | ) | [pure virtual] |
Return the type of the value associated with this key.