NEOCCA bindings Specification
0.2.8
|
00001 #ifndef neo_TypeMap_hh_seen 00002 #define neo_TypeMap_hh_seen 00003 00004 /* A file of auxiliaries that mainly distract the new reader. */ 00005 00006 namespace neo { 00007 namespace cca { 00008 00014 typedef boost::shared_ptr<TypeMap> TypeMap_shared; 00015 00022 class TypeMap 00023 { 00024 public: 00025 00027 virtual ~TypeMap(){} 00028 00030 virtual TypeMap_shared cloneData()= 0; 00031 00033 virtual TypeMap_shared cloneEmpty()= 0; 00034 00037 virtual int32_t getInt(const ::std::string & key, int32_t defaultValue) throw (TypeMismatchException )= 0; 00038 00041 virtual int64_t getLong(const ::std::string & key, int64_t defaultValue) throw (TypeMismatchException )= 0; 00042 00045 virtual float getFloat(const ::std::string & key, float defaultValue) throw (TypeMismatchException )= 0; 00046 00049 virtual double getDouble(const ::std::string & key, double defaultValue) throw (TypeMismatchException )= 0; 00050 00053 virtual ::std::complex<float> getFcomplex(const ::std::string & key, ::std::complex<float> defaultValue) throw (TypeMismatchException )= 0; 00054 00057 virtual ::std::complex<double> getDcomplex(const ::std::string & key, ::std::complex<double> defaultValue) throw (TypeMismatchException )= 0; 00058 00061 virtual ::std::string getString(const ::std::string & key, ::std::string defaultValue) throw (TypeMismatchException )= 0; 00062 00065 virtual bool getBool(const ::std::string & key, bool defaultValue) throw (TypeMismatchException )= 0; 00066 00067 // ====================================================== 00068 00071 virtual ::std::vector< int32_t > getIntArray(const ::std::string & key, ::std::vector< int32_t >& defaultValue) throw (TypeMismatchException )= 0; 00072 00075 virtual ::std::vector< int64_t > getLongArray(const ::std::string & key, ::std::vector< int64_t >& defaultValue) throw (TypeMismatchException )= 0; 00076 00079 virtual ::std::vector< float > getFloatArray(const ::std::string & key, ::std::vector< float >& defaultValue) throw (TypeMismatchException )= 0; 00080 00083 virtual ::std::vector< double > getDoubleArray(const ::std::string & key, ::std::vector< double >& defaultValue) throw (TypeMismatchException )= 0; 00084 00087 virtual ::std::vector< ::std::complex<float> > getFcomplexArray(const ::std::string & key, ::std::vector< ::std::complex<float> >& defaultValue) throw (TypeMismatchException )= 0; 00088 00091 virtual ::std::vector< ::std::complex<double> > getDcomplexArray(const ::std::string & key, ::std::vector< ::std::complex<double> >& defaultValue) throw (TypeMismatchException )= 0; 00092 00095 virtual ::std::vector< ::std::string > getStringArray(const ::std::string & key, ::std::vector< ::std::string >& defaultValue) throw (TypeMismatchException )= 0; 00096 00099 virtual ::std::vector< bool > getBoolArray(const ::std::string & key, ::std::vector< bool >& defaultValue) throw (TypeMismatchException )= 0; 00100 00101 00102 // ====================================================== 00103 00106 virtual void putInt(const ::std::string & key, int value)= 0; 00107 00110 virtual void putLong(const ::std::string & key, int64_t value)= 0; 00111 00114 virtual void putFloat(const ::std::string & key, float value)= 0; 00115 00118 virtual void putDouble(const ::std::string & key, double value)= 0; 00119 00122 virtual void putFcomplex(const ::std::string & key, ::std::complex<float> value)= 0; 00123 00126 virtual void putDcomplex(const ::std::string & key, ::std::complex<double> value)= 0; 00127 00130 virtual void putString(const ::std::string & key, const ::std::string & value)= 0; 00131 00134 virtual void putBool(const ::std::string & key, bool value)= 0; 00135 00136 // ====================================================== 00137 00141 virtual void putIntArray(const ::std::string & key, int * value ,int length)= 0; 00143 virtual void putIntArray(const ::std::string & key, ::std::vector< int >& value)= 0; 00144 00148 virtual void putLongArray(const ::std::string & key, int64_t * value ,int length)= 0; 00150 virtual void putLongArray(const ::std::string & key, ::std::vector< int64_t >& value )= 0; 00151 00155 virtual void putFloatArray(const ::std::string & key, float * value ,int length)= 0; 00157 virtual void putFloatArray(const ::std::string & key, ::std::vector< float >& value )= 0; 00158 00162 virtual void putDoubleArray(const ::std::string & key, double * value ,int length)= 0; 00164 virtual void putDoubleArray(const ::std::string & key, ::std::vector< double >& value)= 0; 00165 00169 virtual void putFcomplexArray(const ::std::string & key, ::std::complex<float> * value ,int length)= 0; 00171 virtual void putFcomplexArray(const ::std::string & key, ::std::vector< ::std::complex<float> >& value)= 0; 00172 00176 virtual void putDcomplexArray(const ::std::string & key, ::std::complex<double> * value ,int length)= 0; 00178 virtual void putDcomplexArray(const ::std::string & key, ::std::vector< ::std::complex<double> >& value)= 0; 00179 00183 virtual void putStringArray(const ::std::string & key, ::std::vector< ::std::string >& value)= 0; 00184 00188 virtual void putBoolArray(const ::std::string & key, bool * value ,int length)= 0; 00190 virtual void putBoolArray(const ::std::string & key, ::std::vector< bool >& value)= 0; 00191 00192 // ====================================================== 00193 00195 virtual void remove (const ::std::string & key)= 0; 00196 00203 virtual ::std::vector< ::std::string > getAllKeys( enum Type t)= 0; 00204 00206 virtual bool hasKey(const ::std::string & key)= 0; 00207 00209 virtual enum Type typeOf(const ::std::string & key)= 0; 00210 00211 } ; // end interface TypeMap 00212 00213 00214 } // end namespace cca 00215 } // end namespace neo 00216 00217 #endif // neo_TypeMap_hh_seen