Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
Ase::CustomDataContainer Class Reference

#include "utils.hh"

Inheritance diagram for Ase::CustomDataContainer:
[legend]

Public Member Functions

template<class T >
void set_custom_data (CustomDataKey< T > *key, T data)
 Assign data to the custom keyed data member, deletes any previously set data.
 
template<class T >
get_custom_data (CustomDataKey< T > *key) const
 Retrieve contents of the custom keyed data member, returns DataKey::fallback if nothing was set.
 
template<class T >
bool has_custom_data (CustomDataKey< T > *key) const
 Retrieve wether contents of the custom keyed data member exists.
 
template<class T >
bool del_custom_data (CustomDataKey< T > *key)
 Delete the current contents of the custom keyed data member, invokes DataKey::destroy.
 

Protected Member Functions

void custom_data_destroy ()
 

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:

Definition at line 97 of file utils.hh.

Constructor & Destructor Documentation

◆ ~CustomDataContainer()

Ase::CustomDataContainer::~CustomDataContainer ( )
protected

Definition at line 356 of file utils.cc.

Member Function Documentation

◆ custom_data_destroy()

void Ase::CustomDataContainer::custom_data_destroy ( )
protected

Definition at line 344 of file utils.cc.

◆ del_custom_data()

template<class T >
bool Ase::CustomDataContainer::del_custom_data ( CustomDataKey< T > *  key)

Delete the current contents of the custom keyed data member, invokes DataKey::destroy.

Definition at line 119 of file utils.hh.

◆ get_custom_data()

template<class T >
T Ase::CustomDataContainer::get_custom_data ( CustomDataKey< T > *  key) const

Retrieve contents of the custom keyed data member, returns DataKey::fallback if nothing was set.

Definition at line 113 of file utils.hh.

Referenced by Ase::ServerImpl::broadcast_telemetry().

◆ has_custom_data()

template<class T >
bool Ase::CustomDataContainer::has_custom_data ( CustomDataKey< T > *  key) const

Retrieve wether contents of the custom keyed data member exists.

Definition at line 116 of file utils.hh.

◆ set_custom_data()

template<class T >
void Ase::CustomDataContainer::set_custom_data ( CustomDataKey< T > *  key,
data 
)

Assign data to the custom keyed data member, deletes any previously set data.

Definition at line 110 of file utils.hh.

Referenced by Ase::ServerImpl::broadcast_telemetry().


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