|
An abstract class, which offers methods to run operations on the WorkingMemory and the Scene. More...
#include <MemoryX/gui-plugins/SceneEditor/controller/Operation.h>
Public Member Functions | |
virtual const OperationPtr | createInverseOperation () const =0 |
Returns a Operation, which reverts the changes done in this instance of the Operation. More... | |
std::string | getObjectId () const |
Returns the ID of the object, this Operation is working on. More... | |
virtual bool | isExecuteable () |
Return wehether the operation can be executed currently. More... | |
Operation (const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene) | |
A constructor. More... | |
Operation (const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId) | |
A constructor. More... | |
Protected Member Functions | |
virtual void | executeOnScene ()=0 |
Executes the Operation on the given Scene. More... | |
virtual void | executeOnWorkingMemory ()=0 |
Executes the Operation on the given WorkingMemory. More... | |
const std::shared_ptr< memoryxcontroller::MemoryXController > | getMemoryXController () const |
Returns the the MemoryXController to execute the Operation at. More... | |
const std::shared_ptr< scene3D::Scene > | getScene () const |
Returns the the Scene to execute the Operation at. More... | |
void | setObjectId (const std::string &objectId) |
Sets the ID, this operation is working on. More... | |
Friends | |
class | Controller |
class | UndoRedoStack |
An abstract class, which offers methods to run operations on the WorkingMemory and the Scene.
Definition at line 44 of file Operation.h.
Operation | ( | const std::shared_ptr< memoryxcontroller::MemoryXController > & | memoryXController, |
const std::shared_ptr< scene3D::Scene > & | scene, | ||
const std::string & | objectId | ||
) |
A constructor.
Sets the Scene and WorkingMemory to execute the scene at.
memoryXController | the Controller for the WorkingMemory instance to run the Operation at |
scene | the Scene to run the Operation at |
the | ID of the object, which is affected by this operation |
Definition at line 26 of file Operation.cpp.
Operation | ( | const std::shared_ptr< memoryxcontroller::MemoryXController > & | memoryXController, |
const std::shared_ptr< scene3D::Scene > & | scene | ||
) |
A constructor.
Sets the Scene and WorkingMemory to execute the scene at.
memoryXController | the Controller for the WorkingMemory instance to run the Operation at |
scene | the Scene to run the Operation at |
Definition at line 34 of file Operation.cpp.
|
pure virtual |
Returns a Operation, which reverts the changes done in this instance of the Operation.
Implemented in AddOperation, RotateTranslateOperation, RemoveOperation, AddToGroupOperation, RemoveFromGroupOperation, RenameGroupOperation, CreateGroupOperation, DeleteGroupOperation, DeselectOperation, SelectOperation, and EmptyOperation.
|
protectedpure virtual |
Executes the Operation on the given Scene.
Implemented in AddOperation, RotateTranslateOperation, RemoveOperation, AddToGroupOperation, RemoveFromGroupOperation, RenameGroupOperation, CreateGroupOperation, DeleteGroupOperation, DeselectOperation, SelectOperation, and EmptyOperation.
|
protectedpure virtual |
Executes the Operation on the given WorkingMemory.
Implemented in AddOperation, RotateTranslateOperation, RemoveOperation, AddToGroupOperation, RemoveFromGroupOperation, RenameGroupOperation, CreateGroupOperation, DeleteGroupOperation, DeselectOperation, SelectOperation, and EmptyOperation.
|
protected |
Returns the the MemoryXController to execute the Operation at.
Definition at line 47 of file Operation.cpp.
std::string getObjectId | ( | ) | const |
Returns the ID of the object, this Operation is working on.
Definition at line 52 of file Operation.cpp.
|
protected |
Returns the the Scene to execute the Operation at.
Definition at line 42 of file Operation.cpp.
|
virtual |
Return wehether the operation can be executed currently.
If the Operation is never executeable this method return true.
Reimplemented in RotateTranslateOperation, and RemoveOperation.
Definition at line 62 of file Operation.cpp.
|
protected |
Sets the ID, this operation is working on.
the | new ID |
Definition at line 57 of file Operation.cpp.
|
friend |
Definition at line 46 of file Operation.h.
|
friend |
Definition at line 47 of file Operation.h.