12 template<
class KeyType,
class ValueType>
17 typedef std::pair<KeyType, ValueType>
Pair;
76 template<
class K,
class V>
80 valueToKey_.insert(std::make_pair(value,key));
85 template<
class K,
class V>
89 typename std::map<K,V>::const_iterator it = keyToValue_.find(key);
90 if (it != keyToValue_.end()) {
97 template<
class K,
class V>
100 typedef std::vector<const DDsvalues_type *> sv_type;
102 typename std::map<K,V>::const_iterator it = keyToValue_.find(key);
103 if (it != keyToValue_.end()) {
104 sv_type sv = it->second.specifics();
105 sv_type::const_iterator it = sv.begin();
107 for (; it != sv.end(); ++it) {
118 template<
class K,
class V>
121 typedef std::vector<const DDsvalues_type *> sv_type;
123 typename std::map<K,V>::const_iterator it = keyToValue_.find(key);
124 if (it != keyToValue_.end()) {
125 sv_type sv = it->second.specifics();
126 sv_type::const_iterator svIt = sv.begin();
127 sv_type::const_iterator svEd = sv.end();
129 for (; svIt != svEd; ++svIt) {
141 template<
class K,
class V>
144 typedef std::vector<const DDsvalues_type *> sv_type;
146 sv_type sv = val.specifics();
147 sv_type::const_iterator svIt = sv.begin();
148 sv_type::const_iterator svEd = sv.end();
150 for (; svIt != svEd; ++svIt) {
161 template<
class K,
class V>
164 typedef std::vector<const DDsvalues_type *> sv_type;
166 sv_type sv = val.specifics();
167 sv_type::const_iterator svIt = sv.begin();
168 sv_type::const_iterator svEd = sv.end();
170 for (; svIt != svEd; ++svIt) {
181 template<
class K,
class V>
184 typedef std::vector<const DDsvalues_type *> sv_type;
186 typename std::map<K,V>::const_iterator it = keyToValue_.find(key);
187 if (it != keyToValue_.end()) {
188 sv_type sv = it->second.specifics();
189 sv_type::const_iterator svIt = sv.begin();
190 sv_type::const_iterator svEd = sv.end();
193 for (; svIt != svEd; ++svIt) {
207 template<
class K,
class V>
210 std::vector<std::pair<K,V> >
result;
211 typedef std::vector<const DDsvalues_type *> sv_type;
212 typename std::map<V,K>::const_iterator it = valueToKey_.begin();
213 typename std::map<V,K>::const_iterator ed = valueToKey_.end();
216 for (; it != ed; ++it) {
217 sv_type sv = it->first.specifics();
219 sv_type::const_iterator svIt = sv.begin();
220 sv_type::const_iterator svEd = sv.end();
222 for (; svIt != svEd; ++svIt) {
225 const std::vector<std::string> &
s = v.
strings();
229 result.push_back(std::make_pair(it->second,it->first));
241 template<
class K,
class V>
244 std::vector<std::pair<K,V> >
result;
245 typedef std::vector<const DDsvalues_type *> sv_type;
246 typename std::map<V,K>::const_iterator it = valueToKey_.begin();
247 typename std::map<V,K>::const_iterator ed = valueToKey_.end();
250 for (; it != ed; ++it) {
251 sv_type sv = it->first.specifics();
253 sv_type::const_iterator svIt = sv.begin();
254 sv_type::const_iterator svEd = sv.end();
256 for (; svIt != svEd; ++svIt) {
259 const std::vector<double> &
s = v.
doubles();
263 result.push_back(std::make_pair(it->second,it->first));
275 template<
class K,
class V>
278 std::vector<std::pair<K,V> >
result;
279 typedef std::vector<const DDsvalues_type *> sv_type;
280 typename std::map<V,K>::const_iterator it = valueToKey_.begin();
281 typename std::map<V,K>::const_iterator ed = valueToKey_.end();
284 for (; it != ed; ++it) {
285 sv_type sv = it->first.specifics();
287 sv_type::const_iterator svIt = sv.begin();
288 sv_type::const_iterator svEd = sv.end();
290 for (; svIt != svEd; ++svIt) {
292 result.push_back(std::make_pair(it->second,it->first));
unsigned int noSpecifics(const KeyType &key, const std::string &name) const
fetch a key given a value
std::pair< KeyType, ValueType > Pair
usefull typedef
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
bool value(const KeyType &key, ValueType &result)
removes a key-value pair
unsigned int toDouble(const std::string &name, const KeyType &key, double &value, unsigned int pos=0) const
returns the number specific parameters named 'name' and the corrsponding double
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
std::map< KeyType, ValueType > keyToValue_
ValueType
Type of the value held by a Value object.
std::vector< Pair > Vector
usefull typedef
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
unsigned int toString(const std::string &name, const KeyType &key, std::string &value, unsigned int pos=0) const
same as toDouble but for std::string-valued values of named parameters
unsigned int size() const
the size of the stored value-pairs (std::string,double)
void insert(const KeyType &, const ValueType &)
insert a new key-value-pair
Vector all(const std::string &name, const std::string &value) const
get all std::mapped instances which have a specific 'name' with value 'value'
std::multimap< ValueType, KeyType > valueToKey_