Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Simple map used to add, remove, iterate, clear elements efficiently (all O(1)). More...
#include <NaryQuickMap.hpp>
Public Member Functions | |
NaryQuickMap () | |
void | reset () |
void | clear () |
int | size () const |
ValueType * | begin () |
ValueType * | end () |
const ValueType * | begin () const |
const ValueType * | end () const |
void | append (KeyType key) |
void | append (KeyType key, ValueType value) |
void | insert (KeyType key) |
void | insert (KeyType key, const ValueType &value) |
void | erase (KeyType key) |
int | find (KeyType key) const |
bool | hasKey (KeyType key) const |
const ValueType & | valueFromKey (KeyType key) const |
const ValueType & | valueFromIndex (int i) const |
KeyType | key (int i) const |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Attributes | |
ValueType | mValues [MaxMapType] |
KeyType | mValueToKey [MaxMapType] |
int | mMapSize |
int | mKeyToValue [MaxMapType] |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
Simple map used to add, remove, iterate, clear elements efficiently (all O(1)).
To be used only when the number of keys is well defined and not too big. Internally used by VL to deal with enables and render states.
Definition at line 43 of file NaryQuickMap.hpp.
|
inline |
Definition at line 46 of file NaryQuickMap.hpp.
|
inline |
Definition at line 71 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::append().
|
inline |
Definition at line 77 of file NaryQuickMap.hpp.
|
inline |
Definition at line 66 of file NaryQuickMap.hpp.
|
inline |
Definition at line 68 of file NaryQuickMap.hpp.
|
inline |
Definition at line 58 of file NaryQuickMap.hpp.
|
inline |
Definition at line 67 of file NaryQuickMap.hpp.
|
inline |
Definition at line 69 of file NaryQuickMap.hpp.
|
inline |
Definition at line 105 of file NaryQuickMap.hpp.
|
inline |
Definition at line 125 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::erase(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::hasKey(), and vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert().
|
inline |
Definition at line 144 of file NaryQuickMap.hpp.
|
inline |
Definition at line 86 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert().
|
inline |
Definition at line 91 of file NaryQuickMap.hpp.
|
inline |
Definition at line 163 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::append(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::find(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert(), and vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::valueFromKey().
|
inline |
Definition at line 51 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::NaryQuickMap().
|
inline |
Definition at line 64 of file NaryQuickMap.hpp.
|
inline |
Definition at line 158 of file NaryQuickMap.hpp.
|
inline |
Definition at line 149 of file NaryQuickMap.hpp.
|
protected |
Definition at line 179 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::append(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::erase(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::find(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::reset(), and vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::valueFromKey().
|
protected |
Definition at line 177 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::append(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::clear(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::end(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::erase(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::find(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::reset(), and vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::size().
|
protected |
Definition at line 173 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::append(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::begin(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::end(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::erase(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::valueFromIndex(), and vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::valueFromKey().
|
protected |
Definition at line 175 of file NaryQuickMap.hpp.
Referenced by vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::append(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::erase(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::find(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::insert(), vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::key(), and vl::NaryQuickMap< EEnable, EEnable, EN_EnableCount >::reset().
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:52.
© Copyright Michele Bosi. All rights reserved.