Teuchos - Trilinos Tools Package
Version of the Day
|
A simple aggregate type to bind a key string and and objects value. More...
#include <Teuchos_StringIndexedOrderedValueObjectContainer.hpp>
Public Member Functions | |
KeyObjectPair () | |
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U, ObjType>>> | |
KeyObjectPair (const std::string &key_in, U &&obj_in, bool isActive_in=true) | |
KeyObjectPair (const KeyObjectPair &kop) | |
Copy-constructor. More... | |
KeyObjectPair (KeyObjectPair &&kop) | |
Move-constructor. More... | |
KeyObjectPair & | operator= (const KeyObjectPair &kop) |
Copy-assignment operator. More... | |
bool | isActive () const |
Static Public Member Functions | |
static KeyObjectPair< ObjType > | makeInvalid () |
Public Attributes | |
const std::string & | first |
ObjType | second |
std::string | key |
A simple aggregate type to bind a key string and and objects value.
This is meant to be a drop-in replacement for std::pair<std::string, ObjType>. That is why the key and the object are called 'first' and 'second'.
Note that there is no invariant on the key and the object value so there is no need to encapsulate them. This is good because we can't since we need to provide 'first' and 'second' as raw data members to match std::pair. However, we don't want to allow users to be able to change the 'first' key string (like you can't with the std::map::value_type returned in the iterator) so we use a const reference for 'first'.
Definition at line 73 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inline |
Definition at line 82 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inline |
Definition at line 85 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inline |
Copy-constructor.
Definition at line 88 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inline |
Move-constructor.
Definition at line 91 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inline |
Copy-assignment operator.
Definition at line 94 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inlinestatic |
Definition at line 102 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
|
inline |
Definition at line 105 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
const std::string& Teuchos::StringIndexedOrderedValueObjectContainerBase::KeyObjectPair< ObjType >::first |
Definition at line 76 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
ObjType Teuchos::StringIndexedOrderedValueObjectContainerBase::KeyObjectPair< ObjType >::second |
Definition at line 78 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.
std::string Teuchos::StringIndexedOrderedValueObjectContainerBase::KeyObjectPair< ObjType >::key |
Definition at line 80 of file Teuchos_StringIndexedOrderedValueObjectContainer.hpp.