Operation.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package MemoryX::gui-plugins::SceneEditor
19 * @date 2015
20 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21 * GNU General Public License
22 */
23
24#include "Operation.h"
25
27 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
28 const std::shared_ptr<scene3D::Scene>& scene,
29 const std::string& objectId) :
30 scene(scene), memoryXController(memoryXController), objectId(objectId)
31{
32}
33
35 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
36 const std::shared_ptr<scene3D::Scene>& scene) :
37 scene(scene), memoryXController(memoryXController), objectId()
38{
39}
40
41const std::shared_ptr<scene3D::Scene>
43{
44 return scene.lock();
45}
46
47const std::shared_ptr<memoryxcontroller::MemoryXController>
49{
50 return memoryXController.lock();
51}
52
53std::string
55{
56 return objectId;
57}
58
59void
60controller::Operation::setObjectId(const std::string& objectId)
61{
62 Operation::objectId = objectId;
63}
64
65bool
67{
68 return true;
69}
std::string getObjectId() const
Returns the ID of the object, this Operation is working on.
Definition Operation.cpp:54
const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController() const
Returns the the MemoryXController to execute the Operation at.
Definition Operation.cpp:48
const std::shared_ptr< scene3D::Scene > getScene() const
Returns the the Scene to execute the Operation at.
Definition Operation.cpp:42
Operation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
A constructor.
Definition Operation.cpp:26
virtual bool isExecuteable()
Return wehether the operation can be executed currently.
Definition Operation.cpp:66
void setObjectId(const std::string &objectId)
Sets the ID, this operation is working on.
Definition Operation.cpp:60