Class MHO_ClassIdentityMap.
More...
#include <MHO_ClassIdentityMap.hh>
|
void | AddToMap (const MHO_UUID &type_uuid, const std::string &name) |
| Adds an entry to the UUID-name map and its reverse map. More...
|
|
Class MHO_ClassIdentityMap.
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
- Date
- Thu Apr 29 12:30:28 2021 -0400
◆ MHO_ClassIdentityMap()
hops::MHO_ClassIdentityMap::MHO_ClassIdentityMap |
( |
| ) |
|
|
inline |
◆ ~MHO_ClassIdentityMap()
virtual hops::MHO_ClassIdentityMap::~MHO_ClassIdentityMap |
( |
| ) |
|
|
inlinevirtual |
◆ AddClassType() [1/2]
template<typename XClassType >
void hops::MHO_ClassIdentityMap::AddClassType |
( |
| ) |
|
|
inline |
◆ AddClassType() [2/2]
template<typename XClassType >
void hops::MHO_ClassIdentityMap::AddClassType |
( |
const XClassType & |
obj | ) |
|
|
inline |
Function AddClassType, overload provided for passing object reference.
- Parameters
-
- Returns
- Return value (template< typename XClassType > void)
◆ AddToMap()
void hops::MHO_ClassIdentityMap::AddToMap |
( |
const MHO_UUID & |
type_uuid, |
|
|
const std::string & |
name |
|
) |
| |
|
inlineprotected |
Adds an entry to the UUID-name map and its reverse map.
- Parameters
-
type_uuid | The UUID of the type to add. |
name | The name associated with the given UUID. |
◆ GenerateContainerFromUUID()
Generates a container from a UUID and returns a ptr to MHO_Serializable if found in factory map.
- Parameters
-
uuid | Input UUID to search for in factory map |
returns a ptr to base class MHO_Serializable, but the underlying type is that which is associated with the uuid, if the uuid is not in the factory map then nullptr is returned, memory managment is delegated to the caller
- Returns
- MHO_Serializable* object pointer or nullptr if UUID not found
◆ GetClassNameFromObject()
template<typename XClassType >
std::string hops::MHO_ClassIdentityMap::GetClassNameFromObject |
( |
const XClassType & |
obj | ) |
|
|
inline |
Getter for class name from object.
- Parameters
-
obj | Input object of type XClassType& to retrieve its class name. |
- Returns
- String representation of the input object's class name.
◆ GetClassNameFromUUID()
std::string hops::MHO_ClassIdentityMap::GetClassNameFromUUID |
( |
const MHO_UUID & |
uuid | ) |
const |
|
inline |
Getter for class name from uuid.
- Parameters
-
uuid | Input UUID to lookup its corresponding class name |
- Returns
- Class name as string; 'unknown' if not found
◆ GetUUIDFor()
template<typename XClassType >
MHO_UUID hops::MHO_ClassIdentityMap::GetUUIDFor |
( |
| ) |
const |
|
inline |
Getter for uuid for a class type.
- Returns
- MHO_UUID corresponding to the input class type
◆ GetUUIDFromClassName()
MHO_UUID hops::MHO_ClassIdentityMap::GetUUIDFromClassName |
( |
const std::string & |
name | ) |
const |
|
inline |
Getter for uuid from class name.
- Parameters
-
name | Class name to search for |
- Returns
- UUID corresponding to the input class name if found
◆ IsTypePresent()
bool hops::MHO_ClassIdentityMap::IsTypePresent |
( |
const MHO_UUID & |
uuid | ) |
const |
|
inline |
Checks if a UUID is present in the class name map.
- Parameters
-
uuid | The UUID to search for. |
- Returns
- True if the UUID is found, false otherwise.
◆ fClassName2UUID
std::map< std::string, MHO_UUID > hops::MHO_ClassIdentityMap::fClassName2UUID |
|
protected |
◆ fFactoryMap
◆ fJSONConverterMap
◆ fMD5Generator
◆ fUUID2ClassName
std::map< MHO_UUID, std::string > hops::MHO_ClassIdentityMap::fUUID2ClassName |
|
protected |
The documentation for this class was generated from the following file: