CSEngine
Loading...
Searching...
No Matches
CSE::SComponent Class Reference
Inheritance diagram for CSE::SComponent:
CSE::SObject CSE::SISComponent CSE::VariableBinder CSE::AnimatorComponent CSE::CameraComponent CSE::CustomComponent CSE::DrawableStaticMeshComponent CSE::JointComponent CSE::LightComponent CSE::RenderComponent CSE::TransformComponent

Public Member Functions

 SComponent (std::string classType, SGameObject *gameObject)
 
 SComponent (const SComponent &src)
 
void Start () override
 
virtual SComponentClone (SGameObject *object)
 
virtual void CopyReference (SComponent *src, std::map< SGameObject *, SGameObject * > lists_obj, std::map< SComponent *, SComponent * > lists_comp)
 
virtual auto GetComponent () -> SObject *
 
void SetValue (std::string name_str, Arguments value) override
 
std::string PrintValue () const override
 
void SetGameObject (SGameObject *object)
 
virtual SGameObjectGetGameObject () const
 
virtual bool GetIsEnable () const
 
virtual void SetIsEnable (bool is_enable)
 
std::string GetClassType () const
 
void SetClassType (std::string type)
 
- Public Member Functions inherited from CSE::SObject
 SObject (bool isRegister)
 
virtual void Exterminate ()=0
 
virtual void SetUndestroyable (bool enable)
 
virtual void Destroy ()
 
virtual void __FORCE_DESTROY__ ()
 
virtual std::string GenerateMeta ()
 
std::string GetHash () const
 
virtual void SetHash (std::string &hash)
 
- Public Member Functions inherited from CSE::SISComponent
 SISComponent (const SISComponent &src)=default
 
virtual void Init ()=0
 
virtual void Tick (float elapsedTime)=0
 

Protected Attributes

SGameObjectgameObject = nullptr
 
bool isEnable = true
 
std::string m_classType
 
- Protected Attributes inherited from CSE::SObject
std::string m_hash
 

Additional Inherited Members

- Protected Types inherited from CSE::VariableBinder
typedef std::vector< std::string > Arguments
 

Detailed Description

Definition at line 17 of file SComponent.h.

Constructor & Destructor Documentation

◆ SComponent() [1/2]

CSE::SComponent::SComponent ( std::string  classType,
SGameObject gameObject 
)
inlineexplicit

Definition at line 20 of file SComponent.h.

20 : m_classType(std::move(classType)),
21 gameObject(gameObject) {
22 }

◆ SComponent() [2/2]

CSE::SComponent::SComponent ( const SComponent src)
inline

Definition at line 24 of file SComponent.h.

24 : SISComponent(src) {
25 gameObject = src.gameObject;
26 isEnable = src.isEnable;
27 m_classType = src.m_classType;
28 }

Member Function Documentation

◆ Clone()

virtual SComponent * CSE::SComponent::Clone ( SGameObject object)
inlinevirtual

Definition at line 35 of file SComponent.h.

35 {
36 return nullptr;
37 }

◆ CopyReference()

virtual void CSE::SComponent::CopyReference ( SComponent src,
std::map< SGameObject *, SGameObject * >  lists_obj,
std::map< SComponent *, SComponent * >  lists_comp 
)
inlinevirtual

Definition at line 39 of file SComponent.h.

40 {}

◆ GetClassType()

std::string CSE::SComponent::GetClassType ( ) const
inline

Definition at line 68 of file SComponent.h.

68 {
69 return m_classType;
70 }

◆ GetComponent()

virtual auto CSE::SComponent::GetComponent ( ) -> SObject*
inlinevirtual

Definition at line 42 of file SComponent.h.

42 {
43 return this;
44 }

◆ GetGameObject()

virtual SGameObject * CSE::SComponent::GetGameObject ( ) const
inlinevirtual

Definition at line 54 of file SComponent.h.

54 {
55 return gameObject;
56 }

◆ GetIsEnable()

virtual bool CSE::SComponent::GetIsEnable ( ) const
inlinevirtual

Definition at line 59 of file SComponent.h.

59 {
60 return isEnable;
61 }

◆ PrintValue()

std::string CSE::SComponent::PrintValue ( ) const
inlineoverridevirtual

Implements CSE::VariableBinder.

Definition at line 48 of file SComponent.h.

48{ return {}; }

◆ SetClassType()

void CSE::SComponent::SetClassType ( std::string  type)
inline

Definition at line 72 of file SComponent.h.

72 {
73 m_classType = std::move(type);
74 }

◆ SetGameObject()

void CSE::SComponent::SetGameObject ( SGameObject object)
inline

Definition at line 50 of file SComponent.h.

50 {
51 gameObject = object;
52 }

◆ SetIsEnable()

virtual void CSE::SComponent::SetIsEnable ( bool  is_enable)
inlinevirtual

Definition at line 64 of file SComponent.h.

64 {
65 isEnable = is_enable;
66 }

◆ SetValue()

void CSE::SComponent::SetValue ( std::string  name_str,
Arguments  value 
)
inlineoverridevirtual

Implements CSE::VariableBinder.

Definition at line 46 of file SComponent.h.

46{}

◆ Start()

void CSE::SComponent::Start ( )
inlineoverridevirtual

Implements CSE::SISComponent.

Definition at line 33 of file SComponent.h.

33{}

Member Data Documentation

◆ gameObject

SGameObject* CSE::SComponent::gameObject = nullptr
protected

Definition at line 77 of file SComponent.h.

◆ isEnable

bool CSE::SComponent::isEnable = true
protected

Definition at line 78 of file SComponent.h.

◆ m_classType

std::string CSE::SComponent::m_classType
protected

Definition at line 80 of file SComponent.h.


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