SECKeyFrame.cpp
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @package ArmarX::
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2013
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#include "SECKeyFrame.h"
24
25#include "SECObjectRelations.h"
26
27namespace memoryx
28{
29
31 {
32 worldState = new SECObjectRelations();
33 }
34
36 IceUtil::Shared(source), SECKeyFrameBase(source)
37 {
38 *this = source;
39 }
40
41 SECKeyFrame::SECKeyFrame(int index, SECObjectRelationsBasePtr worldState)
42 {
43 this->index = index;
44 this->worldState = worldState;
45 }
46
49 {
50 index = source.index;
51 worldState = SECObjectRelationsBasePtr::dynamicCast(source.worldState->ice_clone());
52 return *this;
53 }
54
55 Ice::ObjectPtr
57 {
58 Ice::ObjectPtr result = new SECKeyFrame(*this);
59 return result;
60 }
61
62 std::ostream&
63 operator<<(std::ostream& str, SECKeyFrameBasePtr keyframe)
64 {
65 str << "Index: " << keyframe->index
66 << " WorldState:" << SECObjectRelationsPtr::dynamicCast(keyframe->worldState)->output();
67 return str;
68 }
69
70} // namespace memoryx
uint8_t index
std::string str(const T &t)
Ice::ObjectPtr ice_clone() const override
SECKeyFrame & operator=(const SECKeyFrame &source)
VirtualRobot headers.
std::ostream & operator<<(std::ostream &str, SECKeyFrameBasePtr keyframe)