|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
String indexed ordered value-type object container class. More...
#include <Teuchos_StringIndexedOrderedValueObjectContainer.hpp>

Private Types | |
| typedef KeyObjectPair< ObjType > | key_and_obj_t |
| | |
| typedef std::deque< key_and_obj_t > | key_and_obj_array_t |
| | |
| typedef std::map< std::string, OrdinalIndex > | key_to_idx_map_t |
| | |
Private Member Functions | |
| void | assertOrdinalIndex (const Ordinal idx) const |
| | |
| key_and_obj_t & | getNonconstKeyAndObject (const Ordinal idx) |
| | |
| const key_and_obj_t & | getKeyAndObject (const Ordinal idx) const |
| | |
| void | throwInvalidKeyError (const Ordinal idx, const std::string &key) const |
| | |
| Ordinal | assertKeyGetOrdinal (const std::string &key) const |
| | |
Private Attributes | |
| key_and_obj_array_t | key_and_obj_array_ |
| Stories objects contiguously along with key strings. | |
| key_to_idx_map_t | key_to_idx_map_ |
| Provides lookups of key -> ordinal index into above array. | |
Public types. | |
| typedef StringIndexedOrderedValueObjectContainerBase::Ordinal | Ordinal |
| Ordinal used for the index. | |
| typedef FilteredIterator < typename key_and_obj_array_t::iterator, SelectActive< ObjType > > | Iterator |
| The non-const iterator type. | |
| typedef FilteredIterator < typename key_and_obj_array_t::const_iterator, SelectActive< ObjType > > | ConstIterator |
| The const iterator type. | |
Constructors/Destructors/Info | |
| StringIndexedOrderedValueObjectContainer () | |
| | |
| Ordinal | numObjects () const |
| | |
| Ordinal | numStorage () const |
| | |
Set, get, and remove functions | |
| Ordinal | setObj (const std::string &key, const ObjType &obj) |
| Set (or reset) object by value and return its ordinal index. | |
| Ordinal | getObjOrdinalIndex (const std::string &key) const |
| Get the ordinal index given the string key. | |
| Ptr< ObjType > | getNonconstObjPtr (const Ordinal &idx) |
| Get a nonconst semi-persisting association with the stored object indexed by ordinal. | |
| Ptr< const ObjType > | getObjPtr (const Ordinal &idx) const |
| Get a const semi-persisting association with the stored object indexed by ordinal. | |
| Ptr< ObjType > | getNonconstObjPtr (const std::string &key) |
| Get a nonconst semi-persisting association with the stored object indexed by string key. | |
| Ptr< const ObjType > | getObjPtr (const std::string &key) const |
| Get a const semi-persisting association with the stored object indexed by string key. | |
| void | removeObj (const Ordinal &idx) |
| Remove an object given its ordinal index. | |
| void | removeObj (const std::string &key) |
| Remove an object given its string key. | |
Iterator access | |
| Iterator | nonconstBegin () |
| | |
| Iterator | nonconstEnd () |
| | |
| ConstIterator | begin () const |
| | |
| ConstIterator | end () const |
| | |
String indexed ordered value-type object container class.
This class is a simple utility class for managing the storage and retrievel of value-type objects which the following features/properties:
The design of this class comes with a few important limitations:
Definition at line 175 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
typedef KeyObjectPair<ObjType> Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::key_and_obj_t [private] |
Definition at line 181 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
typedef std::deque<key_and_obj_t> Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::key_and_obj_array_t [private] |
Definition at line 183 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
typedef std::map<std::string, OrdinalIndex> Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::key_to_idx_map_t [private] |
Definition at line 185 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| typedef StringIndexedOrderedValueObjectContainerBase::Ordinal Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::Ordinal |
Ordinal used for the index.
Reimplemented from Teuchos::StringIndexedOrderedValueObjectContainerBase.
Definition at line 193 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| typedef FilteredIterator<typename key_and_obj_array_t::iterator, SelectActive<ObjType> > Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::Iterator |
The non-const iterator type.
Definition at line 197 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| typedef FilteredIterator<typename key_and_obj_array_t::const_iterator, SelectActive<ObjType> > Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::ConstIterator |
The const iterator type.
Definition at line 201 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::StringIndexedOrderedValueObjectContainer | ( | ) |
Definition at line 433 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Ordinal Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::numObjects | ( | ) | const |
Definition at line 439 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Ordinal Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::numStorage | ( | ) | const |
Definition at line 447 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Ordinal Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::setObj | ( | const std::string & | key, |
| const ObjType & | obj | ||
| ) |
Set (or reset) object by value and return its ordinal index.
If the object with the given key index does not exist, it will be added. If an object with the given key does not exist, it will be created.
Definition at line 471 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Ordinal Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getObjOrdinalIndex | ( | const std::string & | key | ) | const [inline] |
Get the ordinal index given the string key.
If the key does not exist, then getInvalidOrdinal() is returned.
Definition at line 459 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| Ptr< ObjType > Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getNonconstObjPtr | ( | const Ordinal & | idx | ) | [inline] |
Get a nonconst semi-persisting association with the stored object indexed by ordinal.
Definition at line 348 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| Ptr< const ObjType > Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getObjPtr | ( | const Ordinal & | idx | ) | const [inline] |
Get a const semi-persisting association with the stored object indexed by ordinal.
Definition at line 357 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| Ptr< ObjType > Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getNonconstObjPtr | ( | const std::string & | key | ) | [inline] |
Get a nonconst semi-persisting association with the stored object indexed by string key.
Definition at line 366 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| Ptr< const ObjType > Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getObjPtr | ( | const std::string & | key | ) | const [inline] |
Get a const semi-persisting association with the stored object indexed by string key.
Definition at line 375 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| void Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::removeObj | ( | const Ordinal & | idx | ) |
Remove an object given its ordinal index.
Each object is errased by assigning to a default-constructed ObjType(). This, for example, will wipe out the reference count for a smart pointer class or will unsize an array, etc..
Definition at line 490 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| void Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::removeObj | ( | const std::string & | key | ) |
Remove an object given its string key.
Definition at line 499 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Iterator Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::nonconstBegin | ( | ) | [inline] |
Definition at line 387 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Iterator Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::nonconstEnd | ( | ) | [inline] |
Definition at line 397 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::ConstIterator Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::begin | ( | ) | const [inline] |
Definition at line 407 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::ConstIterator Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::end | ( | ) | const [inline] |
Definition at line 417 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| void Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::assertOrdinalIndex | ( | const Ordinal | idx | ) | const [private] |
Definition at line 515 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::key_and_obj_t & Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getNonconstKeyAndObject | ( | const Ordinal | idx | ) | [private] |
Definition at line 527 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| const StringIndexedOrderedValueObjectContainer< ObjType >::key_and_obj_t & Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::getKeyAndObject | ( | const Ordinal | idx | ) | const [private] |
Definition at line 541 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| void Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::throwInvalidKeyError | ( | const Ordinal | idx, |
| const std::string & | key | ||
| ) | const [private] |
Definition at line 555 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
| StringIndexedOrderedValueObjectContainer< ObjType >::Ordinal Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::assertKeyGetOrdinal | ( | const std::string & | key | ) | const [private] |
Definition at line 565 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
key_and_obj_array_t Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::key_and_obj_array_ [private] |
Stories objects contiguously along with key strings.
Definition at line 291 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
key_to_idx_map_t Teuchos::StringIndexedOrderedValueObjectContainer< ObjType >::key_to_idx_map_ [private] |
Provides lookups of key -> ordinal index into above array.
Definition at line 293 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
1.7.6.1