33 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
34 const std::shared_ptr<scene3D::Scene>& scene,
35 const std::string& oldGroupName,
36 const std::string& newGroupName) :
38 oldGroupName(oldGroupName),
39 newGroupName(newGroupName),
42 if (oldGroupName.empty() || oldGroupName ==
"" || newGroupName.empty() || newGroupName ==
"")
53 return inverseOperation;
67 std::shared_ptr<scene3D::Scene> scene =
getScene();
69 scene->getGroupManager()->renameGroup(group, newGroupName);
const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController() const
Returns the the MemoryXController to execute the Operation at.
const std::shared_ptr< scene3D::Scene > getScene() const
Returns the the Scene to execute the Operation at.
Operation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
A constructor.
A operation to rename a group.
const OperationPtr createInverseOperation() const override
Returns a new operation, which reverts the renameing of the group.
void executeOnScene() override
Renames the group.
RenameGroupOperation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &oldGroupName, const std::string &newGroupName)
Creates a new operation, which renames a group.
void executeOnWorkingMemory() override
Because the WorkingMemory does not support groups, nothing is done here.
std::shared_ptr< Operation > OperationPtr
std::shared_ptr< SceneGroup > SceneGroupPtr