KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::KarmaClassObjectMap Class Reference

Class for caching list of UObject pointers categorized by UClass. More...

#include <UObjectGlobals.h>

Inheritance diagram for Karma::KarmaClassObjectMap:
Collaboration diagram for Karma::KarmaClassObjectMap:

Public Member Functions

 KarmaClassObjectMap ()
 
 ~KarmaClassObjectMap ()
 
KarmaVector< UObject * > * FindClassObjects (const UClass *Key)
 
KarmaVector< UObject * > * FindOrAddClass (const UClass *Key)
 
- Public Member Functions inherited from KarmaMap< UClass *, KarmaVector< UObject * > * >
 KarmaMap ()
 Constructor.
 
KarmaVector< UObject * > *& FindOrAdd (const UClass *&Key)
 Find the value associated with a specified key, or if none exists, adds a value using the default constructor.
 
KarmaVector< UObject * > ** Find (const UClass *&Key)
 Find the value associated with a specified key.
 

Additional Inherited Members

- Public Types inherited from KarmaMap< UClass *, KarmaVector< UObject * > * >
typedef std::map< UClass *, KarmaVector< UObject * > * > AMap
 
typedef AMap::iterator AnIterator
 
- Protected Attributes inherited from KarmaMap< UClass *, KarmaVector< UObject * > * >
AMap m_KeyValuePair
 

Detailed Description

Class for caching list of UObject pointers categorized by UClass.

Constructor & Destructor Documentation

◆ KarmaClassObjectMap()

Karma::KarmaClassObjectMap::KarmaClassObjectMap ( )
inline

Default constructor

Since
Karma 1.0.0

◆ ~KarmaClassObjectMap()

Karma::KarmaClassObjectMap::~KarmaClassObjectMap ( )

Default destructor

Since
Karma 1.0.0

Member Function Documentation

◆ FindClassObjects()

KarmaVector< UObject * > * Karma::KarmaClassObjectMap::FindClassObjects ( const UClass * Key)

Find the object vector associated with class

Parameters
KeyThe key to search for.
Returns
A pointer to the object vector
See also
UStruct::IsChildOf()
Todo
write class registration system for comparing UClass
Since
Karma 1.0.0

◆ FindOrAddClass()

KarmaVector< UObject * > * Karma::KarmaClassObjectMap::FindOrAddClass ( const UClass * Key)

Find the value associated with a specified UClass key, or if none exists, adds a value using the default constructor.

Parameters
KeyThe key to search for
Returns
A reference to the value associated with the specified key
Todo
Priority based: memory management needed, especially since new is used to allocate KarmaVector<UObject*> on heap
Since
Karma 1.0.0

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