Anim 0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AnimationSystem::StringIDMap< T, Ptr > Class Template Reference

Specialised container mapping stringID to entities owned by this container. More...

#include <StringIDMap.h>

Inheritance diagram for AnimationSystem::StringIDMap< T, Ptr >:
Collaboration diagram for AnimationSystem::StringIDMap< T, Ptr >:

Public Member Functions

StringId ToID (std::string const &key) const
 Converts a string to a stringID, stores this result for later retrieval.
 
std::string ToString (StringId const key) const
 Converts a string to a stringID, if this map has never seen this stringID then this operation will fail and will return an empty string.
 
void Add (string const &key, Ptr< T > item)
 
void Remove (string const &key)
 
T & Get (string const &key) const
 
T & Get (StringId const id) const
 
ValueResult< std::reference_wrapper< T > > TryGet (string const &key) const
 
ValueResult< std::reference_wrapper< T > > TryGet (StringId key) const
 
vector< StringId > GetAllKeyIDs () const
 
std::vector< string > GetAllKeyStrings () const
 
void Foreach (std::function< void(T &)> &&functionDelegate) const
 Performs the provided function on each value in the collection.
 
int Count () const
 
bool Contains (string const &key) const
 
bool Contains (StringId const id) const
 

Detailed Description

template<typename T, template< typename _ >typename Ptr = std::unique_ptr>
class AnimationSystem::StringIDMap< T, Ptr >

Specialised container mapping stringID to entities owned by this container.

Template Parameters
TEntity contained type
PtrThe type of smart pointer this container uses

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