Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::RemoveComponentCommand Class Reference

#include <ComponentCommand.h>

Inheritance diagram for Elevate::RemoveComponentCommand:
Elevate::Command

Public Member Functions

 RemoveComponentCommand (Component *comp)
 
- Public Member Functions inherited from Elevate::Command
virtual ~Command ()=default
 
virtual bool IsUndoable () const
 

Detailed Description

Definition at line 10 of file ComponentCommand.h.

Constructor & Destructor Documentation

◆ RemoveComponentCommand()

Elevate::RemoveComponentCommand::RemoveComponentCommand ( Component comp)
inline

Definition at line 13 of file ComponentCommand.h.

13 : m_component(comp)
14 {
15 if (m_component)
16 {
17 try {
18 m_obj = comp->gameObject->shared_from_this();
19 }
20 catch (...) {}
21
22 m_backup.reset(m_component->Clone());
23 m_factory = m_component->GetFactory();
24 m_destructor = m_component->GetDestructor();
25 }
26 }
virtual Component * Clone()=0
virtual GameObjectComponentDestructor GetDestructor() const =0
virtual GameObjectComponentFactory GetFactory() const =0

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