CCAFFEINE  0.8.8
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes
gov::sandia::util::TypeMap Class Reference

#include <TypeMap.h>

List of all members.

Public Member Functions

virtual ~TypeMap ()
virtual ::ccafeopq::TypeMap_shared cloneData ()
virtual ::ccafeopq::TypeMap_shared cloneTypeMap ()
virtual ::ccafeopq::TypeMap_shared cloneEmpty ()
virtual int32_t getInt (const ::std::string &key, int32_t defaultValue) throw (TypeMismatchException )
virtual int64_t getLong (const ::std::string &key, int64_t defaultValue) throw (TypeMismatchException )
virtual float getFloat (const ::std::string &key, float defaultValue) throw (TypeMismatchException )
virtual double getDouble (const ::std::string &key, double defaultValue) throw (TypeMismatchException )
virtual ::std::complex< float > getFcomplex (const ::std::string &key,::std::complex< float > defaultValue) throw (TypeMismatchException )
virtual ::std::complex< double > getDcomplex (const ::std::string &key,::std::complex< double > defaultValue) throw (TypeMismatchException )
virtual ::std::string getString (const ::std::string &key,::std::string defaultValue) throw (TypeMismatchException )
virtual bool getBool (const ::std::string &key, bool defaultValue) throw (TypeMismatchException )
virtual ::std::vector< int32_t > getIntArray (const ::std::string &key,::std::vector< int32_t > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector< int64_t > getLongArray (const ::std::string &key,::std::vector< int64_t > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector< long int > getLongArray (const ::std::string &key,::std::vector< long int > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector< float > getFloatArray (const ::std::string &key,::std::vector< float > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector< double > getDoubleArray (const ::std::string &key,::std::vector< double > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector
< ::std::complex< float > > 
getFcomplexArray (const ::std::string &key,::std::vector< ::std::complex< float > > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector
< ::std::complex< double > > 
getDcomplexArray (const ::std::string &key,::std::vector< ::std::complex< double > > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector
< ::std::string > 
getStringArray (const ::std::string &key,::std::vector< ::std::string > &defaultValue) throw (TypeMismatchException )
virtual ::std::vector< bool > getBoolArray (const ::std::string &key,::std::vector< bool > &defaultValue) throw (TypeMismatchException )
virtual void putInt (const ::std::string &key, int32_t value) throw (TypeMismatchException )
virtual void putLong (const ::std::string &key, int64_t value) throw (TypeMismatchException )
virtual void putFloat (const ::std::string &key, float value) throw (TypeMismatchException )
virtual void putDouble (const ::std::string &key, double value) throw (TypeMismatchException )
virtual void putFcomplex (const ::std::string &key,::std::complex< float > value) throw (TypeMismatchException )
virtual void putDcomplex (const ::std::string &key,::std::complex< double > value) throw (TypeMismatchException )
virtual void putString (const ::std::string &key, const ::std::string &value) throw (TypeMismatchException )
virtual void putBool (const ::std::string &key, bool value) throw (TypeMismatchException )
virtual void putIntArray (const ::std::string &key, int32_t *value, int length) throw (TypeMismatchException )
virtual void putIntArray (const ::std::string &key,::std::vector< int32_t > &value) throw (TypeMismatchException )
virtual void putLongArray (const ::std::string &key, int64_t *value, int length) throw (TypeMismatchException )
virtual void putLongArray (const ::std::string &key,::std::vector< int64_t > &value) throw (TypeMismatchException )
virtual void putLongArray (const ::std::string &key,::std::vector< long int > &value) throw (TypeMismatchException )
virtual void putFloatArray (const ::std::string &key, float *value, int length) throw (TypeMismatchException )
virtual void putFloatArray (const ::std::string &key,::std::vector< float > &value) throw (TypeMismatchException )
virtual void putDoubleArray (const ::std::string &key, double *value, int length) throw (TypeMismatchException )
virtual void putDoubleArray (const ::std::string &key,::std::vector< double > &value) throw (TypeMismatchException )
virtual void putFcomplexArray (const ::std::string &key,::std::complex< float > *value, int length) throw (TypeMismatchException )
virtual void putFcomplexArray (const ::std::string &key,::std::vector< ::std::complex< float > > &value) throw (TypeMismatchException )
virtual void putDcomplexArray (const ::std::string &key,::std::complex< double > *value, int length) throw (TypeMismatchException )
virtual void putDcomplexArray (const ::std::string &key,::std::vector< ::std::complex< double > > &value) throw (TypeMismatchException )
virtual void putStringArray (const ::std::string &key,::std::vector< ::std::string > &value) throw (TypeMismatchException )
virtual void putBoolArray (const ::std::string &key, bool *value, int length) throw (TypeMismatchException )
virtual void putBoolArray (const ::std::string &key,::std::vector< bool > &value) throw (TypeMismatchException )
virtual void remove (const ::std::string &key)
virtual ::std::vector
< ::std::string > 
getAllKeys (enum::ccafeopq::Type t)
virtual bool hasKey (const ::std::string &key)
virtual enum::ccafeopq::Type typeOf (const ::std::string &key)
static::std::vector
< ::std::string > 
typemap2props (::ccafeopq::TypeMap_shared tm)

Static Public Member Functions

::ccafeopq::TypeMap_shared createTypeMap ()
static void copyInData (::ccafeopq::TypeMap_shared tmSrc,::ccafeopq::TypeMap_shared tmDest)
static void copyInData (::ccafeopq::TypeMap_shared tmSrc,::ccafeopq::TypeMap_shared tmDest, TypeMapFilter &ignoreKeys)
static void copyInKeys (::ccafeopq::TypeMap_shared tmSrc,::ccafeopq::TypeMap_shared tmDest, TypeMapFilter &srcKeys)
static StringVector copyInKeysTell (::ccafeopq::TypeMap_shared tmSrc,::ccafeopq::TypeMap_shared tmDest, StringVector &destKeys)
static void props2typemap (char **properties,::ccafeopq::TypeMap_shared tm)
::ccafeopq::TypeMap_shared props2newtypemap (char **properties)
static StringMap props2stringmap (char **properties)
static void stringmap2typemap (const StringMap &stringmap,::ccafeopq::TypeMap_shared tm)
::ccafeopq::TypeMap_shared stringmap2newtypemap (const StringMap &stringmap)
static void pi2typemap (::ccafeopq::PortInfo *pi,::ccafeopq::TypeMap_shared tm)
static StringMap typemap2stringmap (::ccafeopq::TypeMap_shared tm)
::std::string stringType (::ccafeopq::TypeMap_shared t, const ::std::string &key)
::std::string stringValue (::ccafeopq::TypeMap_shared t, const ::std::string &key)
::ccafeopq::Type typeFromString (const ::std::string &typeName)
static int putValueByStrings (::ccafeopq::TypeMap_shared t, const ::std::string &key, const ::std::string &valType, const ::std::string &val)
static void dump (::ccafeopq::TypeMap_shared t)

Static Private Member Functions

static void copyInData (TypeMap *tmSrc,::ccafeopq::TypeMap_shared tmDest)

Private Attributes

TypeMapImpl * m

Detailed Description

This is our implementation of ccafeopq::TypeMap. It wraps a templated implementation that noone ever has to see. There is a babel wrapper of this (to make one of these into a ::gov::cca::TypeMap) named ccaffeine_TypeMap_Impl. There is an opaque wrapper of ::gov::cca::TypeMap (to make a babel map into an opaque map) named BabelOpaqueTypeMap.


Constructor & Destructor Documentation

virtual gov::sandia::util::TypeMap::~TypeMap ( ) [virtual]

required destructor


Member Function Documentation

virtual ::ccafeopq::TypeMap_shared gov::sandia::util::TypeMap::cloneData ( )

Create an exact copy of this Map.

virtual ::ccafeopq::TypeMap_shared gov::sandia::util::TypeMap::cloneEmpty ( )

Create a new Map with no key/value associations.

virtual int32_t gov::sandia::util::TypeMap::getInt ( const ::std::string &  key,
int32_t  defaultValue 
) throw (TypeMismatchException ) [virtual]

Get the Int value associated with a given key. If the key was not found, return the value defaultValue.

virtual int64_t gov::sandia::util::TypeMap::getLong ( const ::std::string &  key,
int64_t  defaultValue 
) throw (TypeMismatchException ) [virtual]

Get the Long value associated with a given key. If the key was not found, return the value defaultValue.

virtual float gov::sandia::util::TypeMap::getFloat ( const ::std::string &  key,
float  defaultValue 
) throw (TypeMismatchException ) [virtual]

Get the Float value associated with a given key. If the key was not found, return the value defaultValue.

virtual double gov::sandia::util::TypeMap::getDouble ( const ::std::string &  key,
double  defaultValue 
) throw (TypeMismatchException ) [virtual]

Get the Double value associated with a given key. If the key was not found, return the value defaultValue.

virtual ::std::complex<float> gov::sandia::util::TypeMap::getFcomplex ( const ::std::string &  key,
::std::complex< float >  defaultValue 
) throw (TypeMismatchException )

Get the Fcomplex value associated with a given key. If the key was not found, return complex the value defaultValue.

virtual ::std::complex<double> gov::sandia::util::TypeMap::getDcomplex ( const ::std::string &  key,
::std::complex< double >  defaultValue 
) throw (TypeMismatchException )

Get the Dcomplex value associated with a given key. If the key was not found, return the complex value defaultValue.

virtual ::std::string gov::sandia::util::TypeMap::getString ( const ::std::string &  key,
::std::string  defaultValue 
) throw (TypeMismatchException )

Get the string value associated with a given key. If the key was not found, return the value defaultValue.

virtual bool gov::sandia::util::TypeMap::getBool ( const ::std::string &  key,
bool  defaultValue 
) throw (TypeMismatchException ) [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 > gov::sandia::util::TypeMap::getIntArray ( const ::std::string &  key,
::std::vector< int32_t > &  defaultValue 
) throw (TypeMismatchException )

Get the value associated with a given key. If the key was not found, return the value defaultValue.

virtual ::std::vector< int64_t > gov::sandia::util::TypeMap::getLongArray ( const ::std::string &  key,
::std::vector< int64_t > &  defaultValue 
) throw (TypeMismatchException )

Get the value associated with a given key. If the key was not found, return the value defaultValue.

virtual ::std::vector< float > gov::sandia::util::TypeMap::getFloatArray ( const ::std::string &  key,
::std::vector< float > &  defaultValue 
) throw (TypeMismatchException )

Get the value associated with a given key. If the key was not found, return the value defaultValue.

virtual ::std::vector< double > gov::sandia::util::TypeMap::getDoubleArray ( const ::std::string &  key,
::std::vector< double > &  defaultValue 
) throw (TypeMismatchException )

Get the value associated with a given key. If the key was not found, return the value defaultValue.

virtual ::std::vector< ::std::complex<float> > gov::sandia::util::TypeMap::getFcomplexArray ( const ::std::string &  key,
::std::vector< ::std::complex< float > > &  defaultValue 
) throw (TypeMismatchException )

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> > gov::sandia::util::TypeMap::getDcomplexArray ( const ::std::string &  key,
::std::vector< ::std::complex< double > > &  defaultValue 
) throw (TypeMismatchException )

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 > gov::sandia::util::TypeMap::getStringArray ( const ::std::string &  key,
::std::vector< ::std::string > &  defaultValue 
) throw (TypeMismatchException )

Get the value associated with a given key. If the key was not found, return the value defaultValue.

virtual ::std::vector< bool > gov::sandia::util::TypeMap::getBoolArray ( const ::std::string &  key,
::std::vector< bool > &  defaultValue 
) throw (TypeMismatchException )

Get the value associated with a given key. If the key was not found, return the value defaultValue.

virtual void gov::sandia::util::TypeMap::putInt ( const ::std::string &  key,
int32_t  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten.

virtual void gov::sandia::util::TypeMap::putLong ( const ::std::string &  key,
int64_t  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten.

virtual void gov::sandia::util::TypeMap::putFloat ( const ::std::string &  key,
float  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten.

virtual void gov::sandia::util::TypeMap::putDouble ( const ::std::string &  key,
double  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten.

virtual void gov::sandia::util::TypeMap::putFcomplex ( const ::std::string &  key,
::std::complex< float >  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and complex value. Any complex value previously assigned will be overwritten.

virtual void gov::sandia::util::TypeMap::putDcomplex ( const ::std::string &  key,
::std::complex< double >  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and complex value. Any complex value previously assigned will be overwritten.

virtual void gov::sandia::util::TypeMap::putString ( const ::std::string &  key,
const ::std::string &  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten.

virtual void gov::sandia::util::TypeMap::putBool ( const ::std::string &  key,
bool  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten.

virtual void gov::sandia::util::TypeMap::putIntArray ( const ::std::string &  key,
int32_t *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten. Arrays are stored by COPY, not by reference.

virtual void gov::sandia::util::TypeMap::putIntArray ( const ::std::string &  key,
::std::vector< int32_t > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::putLongArray ( const ::std::string &  key,
int64_t *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten. Arrays are stored by COPY, not by reference.

virtual void gov::sandia::util::TypeMap::putLongArray ( const ::std::string &  key,
::std::vector< int64_t > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::putFloatArray ( const ::std::string &  key,
float *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten. Arrays are stored by COPY, not by reference.

virtual void gov::sandia::util::TypeMap::putFloatArray ( const ::std::string &  key,
::std::vector< float > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::putDoubleArray ( const ::std::string &  key,
double *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten. Arrays are stored by COPY, not by reference.

virtual void gov::sandia::util::TypeMap::putDoubleArray ( const ::std::string &  key,
::std::vector< double > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::putFcomplexArray ( const ::std::string &  key,
::std::complex< float > *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and complex array value. Any value previously assigned to the same key will be overwritten. complex arrays are stored by COPY.

virtual void gov::sandia::util::TypeMap::putFcomplexArray ( const ::std::string &  key,
::std::vector< ::std::complex< float > > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::putDcomplexArray ( const ::std::string &  key,
::std::complex< double > *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and complex array value. Any value previously assigned to the same key will be overwritten. Complex arrays are stored by COPY.

virtual void gov::sandia::util::TypeMap::putDcomplexArray ( const ::std::string &  key,
::std::vector< ::std::complex< double > > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::putStringArray ( const ::std::string &  key,
::std::vector< ::std::string > &  value 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten. Arrays are stored by COPY, not by reference.

virtual void gov::sandia::util::TypeMap::putBoolArray ( const ::std::string &  key,
bool *  value,
int  length 
) throw (TypeMismatchException ) [virtual]

Assign a key and value. Any value previously assigned to the same key will be overwritten. Arrays are stored by COPY, not by reference.

virtual void gov::sandia::util::TypeMap::putBoolArray ( const ::std::string &  key,
::std::vector< bool > &  value 
) throw (TypeMismatchException ) [virtual]

c++ convenience function.

virtual void gov::sandia::util::TypeMap::remove ( const ::std::string &  key) [virtual]

Make the key and associated value disappear from the object.

virtual ::std::vector< ::std::string > gov::sandia::util::TypeMap::getAllKeys ( enum::ccafeopq::Type  t)

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.

See also:
gov.cca.Type
virtual bool gov::sandia::util::TypeMap::hasKey ( const ::std::string &  key) [virtual]

Return true if the key exists in this map

virtual enum ::ccafeopq::Type gov::sandia::util::TypeMap::typeOf ( const ::std::string &  key) [virtual]

Return the type of the value associated with this key

static void gov::sandia::util::TypeMap::copyInData ( ::ccafeopq::TypeMap_shared  tmSrc,
::ccafeopq::TypeMap_shared  tmDest 
) [static]

copy data into typemap from another

static void gov::sandia::util::TypeMap::copyInData ( ::ccafeopq::TypeMap_shared  tmSrc,
::ccafeopq::TypeMap_shared  tmDest,
TypeMapFilter &  ignoreKeys 
) [static]

copy data into typemap from another, but ignore keys in tmSrc that match the names in ignoreKeys.

static void gov::sandia::util::TypeMap::copyInKeys ( ::ccafeopq::TypeMap_shared  tmSrc,
::ccafeopq::TypeMap_shared  tmDest,
TypeMapFilter &  srcKeys 
) [static]

copy data from tmSrc to tmDest, but only for the keys and types in tmSrc that match the names in srcKeys.

static StringVector gov::sandia::util::TypeMap::copyInKeysTell ( ::ccafeopq::TypeMap_shared  tmSrc,
::ccafeopq::TypeMap_shared  tmDest,
StringVector &  destKeys 
) [static]

copy data from tmSrc to tmDest, but only for the keys and types in tmSrc that match the names in destKeys and the type for the given name in destKeys. Names with a different type in src than in dest will be ignored.

static void gov::sandia::util::TypeMap::props2typemap ( char **  properties,
::ccafeopq::TypeMap_shared  tm 
) [static]

copy k/v/k/v...0 array of strings to typemap. Particularly it pays attention to known standard properties and make everything else strings in the received map.

static void gov::sandia::util::TypeMap::stringmap2typemap ( const StringMap &  stringmap,
::ccafeopq::TypeMap_shared  tm 
) [static]

copy into typemap from stringmap

::ccafeopq::TypeMap_shared gov::sandia::util::TypeMap::stringmap2newtypemap ( const StringMap &  stringmap) [static]

create typemap from stringmap


The documentation for this class was generated from the following file: