msl 1.3.0
Loading...
Searching...
No Matches
msl::DictionaryItem< T > Class Template Reference

Detailed Description

template<typename T>
class msl::DictionaryItem< T >

Typed accessor for a dictionary item.

Note
Both dictionary and key must be set before accessing the value
The dictionary must be kept accessible during the lifetime of the accessor

#include <DictionaryItem.h>

Public Member Functions

 DictionaryItem ()=default
 Uninitialized accessor.
 DictionaryItem (Dictionary::Pointer &dictionary, std::string const &key="")
 Create an accessor from a dictionary and an optional key.
 DictionaryItem (graph::AbstractNode::Pointer node, std::string const &key="")
 Create an accessor from a node registry and an optional key.
 DictionaryItem (graph::AbstractNode *node, std::string const &key="")
 Create an accessor from a node registry and an optional key.
 DictionaryItem (DictionaryItem< T > const &)=default
 DictionaryItem (DictionaryItem< T > &&)=default
DictionaryItem< T > & operator= (DictionaryItem< T > const &)=default
DictionaryItem< T > & operator= (DictionaryItem< T > &&)=default
Dictionary::Pointer dictionary () const
 Return the source dictionary.
DictionaryItem< T > & setDictionary (Dictionary::Pointer dictionary)
 Set the source dictionary.
std::string key () const
 Return the dictionary key.
DictionaryItem< T > & setKey (std::string const &key)
 Set the dictionary key.
T const & operator() () const
 Return the value.
T & operator() ()
 Return the value.

The documentation for this class was generated from the following file: