CSEngine
Loading...
Searching...
No Matches
CSE::SComponent Class Reference
Inheritance diagram for CSE::SComponent:
CSE::SObject CSE::SISComponent CSE::VariableBinder CSE::ReflectionObject 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 (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)
 
- Public Member Functions inherited from CSE::SObject
 SObject (bool isRegister)
 
virtual void Exterminate ()=0
 
virtual void SetUndestroyable (bool enable)
 
virtual void Destroy ()
 
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
 
- Public Member Functions inherited from CSE::VariableBinder
- Public Member Functions inherited from CSE::ReflectionObject
 ReflectionObject (std::string type)
 
void SetClassType (std::string type)
 
const char * GetClassType () const
 
bool IsSameClass (const char *classType) const
 

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from CSE::ReflectionObject
static ReflectionObjectNewObject (const std::string &name)
 
- Protected Types inherited from CSE::VariableBinder
typedef std::vector< std::string > Arguments
 
- Protected Member Functions inherited from CSE::VariableBinder

Detailed Description

Definition at line 19 of file SComponent.h.

Constructor & Destructor Documentation

◆ SComponent() [1/3]

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

Definition at line 22 of file SComponent.h.

22 : ReflectionObject(std::move(classType)),
23 gameObject(gameObject) {
24 }

◆ SComponent() [2/3]

CSE::SComponent::SComponent ( SGameObject * gameObject)
inlineexplicit

Definition at line 26 of file SComponent.h.

26 : gameObject(gameObject) {
27 }

◆ SComponent() [3/3]

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

Definition at line 29 of file SComponent.h.

29 : SISComponent(src) {
30 gameObject = src.gameObject;
31 isEnable = src.isEnable;
32 SetClassType(src.GetClassType());
33 }

Member Function Documentation

◆ Clone()

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

Definition at line 40 of file SComponent.h.

40 {
41 return nullptr;
42 }

◆ CopyReference()

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

Definition at line 44 of file SComponent.h.

45 {}

◆ GetComponent()

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

Definition at line 47 of file SComponent.h.

47 {
48 return this;
49 }

◆ GetGameObject()

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

Definition at line 59 of file SComponent.h.

59 {
60 return gameObject;
61 }

◆ GetIsEnable()

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

Definition at line 64 of file SComponent.h.

64 {
65 return isEnable;
66 }

◆ PrintValue()

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

Implements CSE::VariableBinder.

Definition at line 53 of file SComponent.h.

53{ return {}; }

◆ SetGameObject()

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

Definition at line 55 of file SComponent.h.

55 {
56 gameObject = object;
57 }

◆ SetIsEnable()

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

Definition at line 69 of file SComponent.h.

69 {
70 isEnable = is_enable;
71 }

◆ SetValue()

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

Used to get serialized values. All classes that inherit from VariableBinder will unconditionally call this function first during initialization.

Parameters
name_strName of values
valueSerialized values

Implements CSE::VariableBinder.

Reimplemented in CSE::TransformComponent.

Definition at line 51 of file SComponent.h.

51{}

◆ Start()

void CSE::SComponent::Start ( )
inlineoverridevirtual

Implements CSE::SISComponent.

Definition at line 38 of file SComponent.h.

38{}

Member Data Documentation

◆ gameObject

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

Definition at line 74 of file SComponent.h.

◆ isEnable

bool CSE::SComponent::isEnable = true
protected

Definition at line 75 of file SComponent.h.


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