Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::UnitComponent Class Referencefinal

#include <UnitComponent.h>

+ Inheritance diagram for Divide::UnitComponent:

Public Member Functions

 UnitComponent (SceneGraphNode *parentSGN, PlatformContext &context)
 
bool setUnit (const Unit_ptr &unit)
 
template<typename T = Unit>
requires std::is_base_of_v<Unit, T>
std::shared_ptr< T > getUnit () const noexcept
 

Private Types

using Parent = BaseComponentType< UnitComponent, ComponentType::UNIT >
 

Private Attributes

Unit_ptr _unit
 

Friends

class UnitSystem
 

Detailed Description

Definition at line 41 of file UnitComponent.h.

Member Typedef Documentation

◆ Parent

Constructor & Destructor Documentation

◆ UnitComponent()

Divide::UnitComponent::UnitComponent ( SceneGraphNode parentSGN,
PlatformContext context 
)

Definition at line 9 of file UnitComponent.cpp.

Member Function Documentation

◆ getUnit()

template<typename T = Unit>
requires std::is_base_of_v<Unit, T>
std::shared_ptr< T > Divide::UnitComponent::getUnit ( ) const
inlinenoexcept

Definition at line 49 of file UnitComponent.h.

◆ setUnit()

bool Divide::UnitComponent::setUnit ( const Unit_ptr &  unit)

Definition at line 15 of file UnitComponent.cpp.

Friends And Related Function Documentation

◆ UnitSystem

friend class UnitSystem
friend

Definition at line 41 of file UnitComponent.h.

Member Data Documentation

◆ _unit

Unit_ptr Divide::UnitComponent::_unit
private

Definition at line 55 of file UnitComponent.h.


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