RemoveOperation Class Reference

A Operation to remove a object in the scene and the WorkingMemory. More...

#include <MemoryX/gui-plugins/SceneEditor/controller/RemoveOperation.h>

+ Inheritance diagram for RemoveOperation:

Public Member Functions

const OperationPtr createInverseOperation () const override
 Returns a new operation which adds the object again. More...
 
bool isExecuteable () override
 Returns true, if the SceneObject is mutable. More...
 
 RemoveOperation (const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
 Creates a new operation, which removes a object. More...
 
- Public Member Functions inherited from Operation
std::string getObjectId () const
 Returns the ID of the object, this Operation is working on. 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

void executeOnScene () override
 Removes the object from the local Scene. More...
 
void executeOnWorkingMemory () override
 Removes the object from the WorkingMemory. More...
 
- Protected Member Functions inherited from Operation
const std::shared_ptr< memoryxcontroller::MemoryXControllergetMemoryXController () const
 Returns the the MemoryXController to execute the Operation at. More...
 
const std::shared_ptr< scene3D::ScenegetScene () 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 AddOperation
 

Detailed Description

A Operation to remove a object in the scene and the WorkingMemory.

See also
controller::Operation

Definition at line 47 of file RemoveOperation.h.

Constructor & Destructor Documentation

◆ RemoveOperation()

RemoveOperation ( const std::shared_ptr< memoryxcontroller::MemoryXController > &  memoryXController,
const std::shared_ptr< scene3D::Scene > &  scene,
const std::string &  objectId 
)

Creates a new operation, which removes a object.

Parameters
memoryXControllerThe MemoryXController to remove the object at.
sceneThe scene to remove the object at.
objectIdThe ID of the object to remove.
See also
controller::Operation::Operation

Definition at line 45 of file RemoveOperation.cpp.

Member Function Documentation

◆ createInverseOperation()

const controller::OperationPtr createInverseOperation ( ) const
overridevirtual

Returns a new operation which adds the object again.

Returns
The operation, which adds the object again.
See also
controller::Operation::createInverseOperation

Implements Operation.

Definition at line 54 of file RemoveOperation.cpp.

◆ executeOnScene()

void executeOnScene ( )
overrideprotectedvirtual

Removes the object from the local Scene.

See also
controller::Operation::executeOnScene

Implements Operation.

Definition at line 82 of file RemoveOperation.cpp.

◆ executeOnWorkingMemory()

void executeOnWorkingMemory ( )
overrideprotectedvirtual

Removes the object from the WorkingMemory.

See also
controller::Operation::executeOnWorkingMemory

Implements Operation.

Definition at line 67 of file RemoveOperation.cpp.

◆ isExecuteable()

bool isExecuteable ( )
overridevirtual

Returns true, if the SceneObject is mutable.

Returns
true, if the SceneObject is mutable; false otherwise.

Reimplemented from Operation.

Definition at line 99 of file RemoveOperation.cpp.

Friends And Related Function Documentation

◆ AddOperation

friend class AddOperation
friend

Definition at line 49 of file RemoveOperation.h.


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