Class Ase::CustomDataContainer
ClassList > Ase > CustomDataContainer
#include <utils.hh>
Inherited by the following classes: Ase::GadgetImpl, Ase::JsonapiConnection
Public Functions
Type | Name |
---|---|
bool | del_custom_data (CustomDataKey< T > * key) Delete the current contents of the custom keyed data member, invokes DataKey::destroy. |
T | get_custom_data (CustomDataKey< T > * key) const Retrieve contents of the custom keyed data member, returns DataKey::fallback if nothing was set. |
bool | has_custom_data (CustomDataKey< T > * key) const Retrieve wether contents of the custom keyed data member exists. |
void | set_custom_data (CustomDataKey< T > * key, T data) Assign data to the custom keyed data member, deletes any previously set data. |
Protected Functions
Type | Name |
---|---|
void | custom_data_destroy () |
~CustomDataContainer () |
Detailed Description
DataListContainer - typesafe storage and retrieval of arbitrary members. By using a DataKey, DataListContainer objects allow storage and retrieval of custom data members in a typesafe fashion. The custom data members will initially default to DataKey::fallback and are deleted by the DataListContainer destructor. Example:
Public Functions Documentation
function del_custom_data
template<class T>
inline bool Ase::CustomDataContainer::del_custom_data (
CustomDataKey < T > * key
)
function get_custom_data
template<class T>
inline T Ase::CustomDataContainer::get_custom_data (
CustomDataKey < T > * key
) const
function has_custom_data
template<class T>
inline bool Ase::CustomDataContainer::has_custom_data (
CustomDataKey < T > * key
) const
function set_custom_data
template<class T>
inline void Ase::CustomDataContainer::set_custom_data (
CustomDataKey < T > * key,
T data
)
Protected Functions Documentation
function custom_data_destroy
void Ase::CustomDataContainer::custom_data_destroy ()
function ~CustomDataContainer
Ase::CustomDataContainer::~CustomDataContainer ()
The documentation for this class was generated from the following file /__w/anklang/anklang/ase/utils.hh