Template Class CSdvObjectClass#
Defined in File component_impl.h
Inheritance Relationships#
Base Type#
public sdv::ISdvObjectClassInfo
(Struct ISdvObjectClassInfo)
Class Documentation#
-
template<class TSdvObject>
class CSdvObjectClass : public sdv::ISdvObjectClassInfo# SDV object creator class. Used to define the SDV class object and register its definition into the system as welll a as providing the creation interface for creating an object instance.
- Template Parameters:
TSdvObject – Class type of the SDV object derived from CSdvObject.
Public Functions
-
inline CSdvObjectClass()#
Constructor assigning the SDV prototype to the module.
-
CSdvObjectClass(CSdvObjectClass&) = delete#
-
CSdvObjectClass(CSdvObjectClass&&) = delete#
-
CSdvObjectClass &operator=(CSdvObjectClass&) = delete#
-
CSdvObjectClass &operator=(CSdvObjectClass&&) = delete#
-
inline virtual ~CSdvObjectClass()#
Destructor revoking the object prototype.
-
inline virtual sdv::u8string GetClassName() const#
Gets the object class name.
Remark
Default implementation gets the information from the object class if not defined in the definition.
- Returns:
Returns the class name of the object.
-
inline virtual sdv::sequence<sdv::u8string> GetClassAliases() const#
Gets the class name aliases.
Remark
Default implementation gets the information from the object class if not defined in the definition.
- Returns:
Returns a sequence containing zero or more class name aliases.
-
inline virtual sdv::u8string GetDefaultObjectName() const#
Gets the default object name.
- Returns:
Returns the default name of the object if exists.
-
inline virtual bool IsSingleton() const#
Is the object marked as singleton.
- Returns:
Returns whether the object is a singleton object.
-
inline virtual sdv::sequence<sdv::u8string> GetObjectDependencies() const#
Get object dependencies.
- Returns:
Returns a vector containing the class names of the objects this component is dependent on.
-
inline virtual EObjectType GetObjectType() const#
Gets the object type.
Remark
Default implementation gets the information from the object class if not defined in the definition.
- Returns:
Returns the type of the object
Protected Functions
-
inline uint32_t GetObjectFlags() const#
Helper function to retrieve the object creation flags.
- Returns:
Returns the current flags of the object
-
inline virtual sdv::SClassInfo GetClassInfo() const override#
Get the class information struct. Overload of ISdvObjectClassInfo::GetClassInfo.
- Returns:
Returns the class information struct.
-
inline virtual std::unique_ptr<CSdvObject> CreateObject() override#
Create the SDV object. Overload of ISdvObjectClassInfo::CreateObject.
- Returns:
Returns an instance of the SDV object or nullptr when the object could not be created (exception thrown during construction).