|
Infinity Engine v0.6.20
C++ API Documentation
|
Unique identifier for a procedural component. More...
#include <ComponentID.hpp>
Public Member Functions | |
| ComponentID ()=default | |
| Default constructor. | |
| ComponentID (const std::string &group, const std::string &name) | |
| Constructs a ComponentID from separate group and name strings. | |
| ComponentID (const std::string &combinedGroupName) | |
| Constructs a ComponentID from a combined group.name string. | |
| bool | operator== (const ComponentID &rhs) const noexcept |
| Equality comparison operator. | |
| std::string | str () const |
| Converts the ComponentID to its string representation. | |
Public Attributes | |
| std::string | group |
| The component's group/namespace identifier. | |
| std::string | name |
| The component's name within the group. | |
Unique identifier for a procedural component.
ComponentID provides a two-part identification system for procedural components, consisting of a group (namespace) and a name. This allows components to be organized hierarchically and avoids naming conflicts between plugins.
Component IDs can be constructed from separate group and name strings, or from a combined string representation (e.g., "MyCompany.Components.MeshGenerator").
Example usage:
|
default |
Default constructor.
Creates an empty ComponentID with no group or name.
| Infinity::Procedural::ComponentID::ComponentID | ( | const std::string & | group, |
| const std::string & | name | ||
| ) |
Constructs a ComponentID from separate group and name strings.
| group | The component's group/namespace (e.g., "MyCompany.Components"). |
| name | The component's name within the group (e.g., "MeshGenerator"). |
| Infinity::Procedural::ComponentID::ComponentID | ( | const std::string & | combinedGroupName | ) |
Constructs a ComponentID from a combined group.name string.
Parses a dot-separated string to extract the group and name components. The last segment after the final dot is treated as the name, and everything before it is treated as the group.
| combinedGroupName | Combined string (e.g., "MyCompany.Components.MeshGenerator"). |
|
noexcept |
Equality comparison operator.
Two ComponentIDs are equal if both their group and name match.
| rhs | The ComponentID to compare against. |
| std::string Infinity::Procedural::ComponentID::str | ( | ) | const |
Converts the ComponentID to its string representation.
Returns the combined "group.name" string form of this ComponentID.
| std::string Infinity::Procedural::ComponentID::group |
The component's group/namespace identifier.
| std::string Infinity::Procedural::ComponentID::name |
The component's name within the group.