Home | History | Annotate | Download | only in src

Lines Matching refs:Key

39  * @tparam Key type of the policy element indexing the collection.
46 template <typename Key>
47 class Collection : public std::map<Key, Element<Key> *>
50 typedef std::map<Key, Element<Key> *> Base;
51 typedef Element<Key> T;
52 typedef typename std::map<Key, T *>::iterator CollectionIterator;
53 typedef typename std::map<Key, T *>::const_iterator CollectionConstIterator;
64 * It also set the key as the unique identifier of the policy element.
66 * @tparam Key indexing the collection of policy element.
68 * @param[in] key to be used to index this new policy element.
72 status_t add(const std::string &name, Key key)
74 if ((*this).find(key) != (*this).end()) {
78 (*this)[key] = new T(name);
80 return (*this)[key]->setIdentifier(key);
84 * Get a policy element from the collection by its key. Policy elements are streams, strategies,
87 * @tparam Key indexing the collection of policy element.
88 * @param[in] key of the policy element to find.
92 T *get(Key key) const
94 CollectionConstIterator it = (*this).find(key);
103 * @tparam Key indexing the collection of policy element.