16 template <
class Key,
class Value>
24 typename map<Key,Value>::iterator mIterator;
74 inline boost::shared_ptr<CORE_Map<Key,Value> > getThis() {
75 boost::shared_ptr<CORE_Map<Key,Value> > p;
81 inline boost::shared_ptr<const CORE_Map<Key,Value> > getThis()
const {
82 boost::shared_ptr<const CORE_Map<Key,Value> > p;
90 static inline boost::shared_ptr<CORE_Map<Key,Value> >
New() {
102 return mMap.find(k)->second;
109 return mMap.find(k)->second;
118 tBoolean exists(
const Key& k)
const;
123 const Value*
get(
const Key& k)
const;
128 Value*
get(
const Key& k);
131 inline int size()
const{
return (
int) mMap.size();};
134 inline int getSize()
const{
return (
int) mMap.size();};
149 void getValues(vector<Value>& vals)
const;
159 void getKeys(vector<Key>& ks)
const;
172 template<
class K2,
class V2>
178 inline void put(
const Key& k,
const Value& v) {
184 inline void add(
const Value& v) {
202 tBoolean removeValue(
const Value& k);
216 mIterator=mMap.begin();
222 return (mIterator!=mMap.end());
227 inline void next(Key& k,Value*& v) {
228 v=&(mIterator->second);
void values(CORE_Vector< Value > &vals) const
return an array of values
Definition: CORE_Map.h:137
void add(const Value &v)
set the value at the index k
Definition: CORE_Map.h:184
this class describes an array
Definition: CORE_Vector.h:18
void keys(CORE_Vector< Key > &ks) const
return an array of keys
Definition: CORE_Map.h:153
#define tBoolean
Definition: types.h:35
Value & operator[](const Key &k)
get object corresponding to key
Definition: CORE_Map.h:107
int getSize() const
return the size of the array
Definition: CORE_Map.h:134
TYPEDEF_SPTR(CORE_StringRealMap)
void getSharedPointer(boost::shared_ptr< CORE_Map< Key, Value > > &p)
return the shared pointer corresponding to the class with casting
Definition: CORE_Map.h:59
int size() const
return the size of the array
Definition: CORE_Map.h:131
void put(const Key &k, const Value &v)
set the value at the index k
Definition: CORE_Map.h:178
this class describes a map
Definition: CORE_Map.h:18
this class describes an array
Definition: CORE_Array.h:18
static boost::shared_ptr< CORE_Map< Key, Value > > New()
return a CORE_Array shared pointer
Definition: CORE_Map.h:90
void clear()
clear the map
Definition: CORE_Map.h:207
tBoolean hasNext() const
had next
Definition: CORE_Map.h:221
void getSharedPointer(SP::CORE_Object &p)
get the shared pointer of this class into p
Definition: CORE_Object.h:65
void begin()
begin
Definition: CORE_Map.h:215
abstract base class for most classes.
Definition: CORE_Object.h:30
CORE_Map< tString, int > CORE_StringIntMap
Definition: CORE_Map.h:252
void next(Key &k, Value *&v)
had next
Definition: CORE_Map.h:227
void getSharedPointer(boost::shared_ptr< const CORE_Map< Key, Value > > &p) const
return the shared pointer corresponding to the class whith casting
Definition: CORE_Map.h:66
CORE_Map< tString, tReal > CORE_StringRealMap
Definition: CORE_Map.h:251
const Value & operator[](const Key &k) const
get object corresponding to key
Definition: CORE_Map.h:100
#define ASSERT_IN(a)
Definition: types.h:82
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106