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 
27 namespace memoryx
28 {
29 
31  {
32  worldState = new SECObjectRelations();
33  }
34 
36  IceUtil::Shared(source),
37  SECKeyFrameBase(source)
38  {
39  *this = source;
40  }
41 
42  SECKeyFrame::SECKeyFrame(int index, SECObjectRelationsBasePtr worldState)
43  {
44  this->index = index;
45  this->worldState = worldState;
46  }
47 
49  {
50  index = source.index;
51  worldState = SECObjectRelationsBasePtr::dynamicCast(source.worldState->ice_clone());
52  return *this;
53  }
54 
56  {
57  Ice::ObjectPtr result = new SECKeyFrame(*this);
58  return result;
59  }
60 
61  std::ostream& operator<<(std::ostream& str, SECKeyFrameBasePtr keyframe)
62  {
63  str << "Index: " << keyframe->index << " WorldState:" << SECObjectRelationsPtr::dynamicCast(keyframe->worldState)->output();
64  return str;
65  }
66 
67 }
str
std::string str(const T &t)
Definition: UserAssistedSegmenterGuiWidgetController.cpp:42
memoryx::VariantType::SECObjectRelations
const armarx::VariantTypeId SECObjectRelations
Definition: SECObjectRelations.h:29
index
uint8_t index
Definition: EtherCATFrame.h:59
SECKeyFrame.h
SECObjectRelations.h
memoryx::SECKeyFrame::operator=
SECKeyFrame & operator=(const SECKeyFrame &source)
Definition: SECKeyFrame.cpp:48
memoryx::SECKeyFrame::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: SECKeyFrame.cpp:55
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
IceUtil
Definition: Instance.h:21
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:681
memoryx::SECKeyFrame::SECKeyFrame
SECKeyFrame()
Definition: SECKeyFrame.cpp:30
memoryx::operator<<
std::ostream & operator<<(std::ostream &str, SECKeyFrameBasePtr keyframe)
Definition: SECKeyFrame.cpp:61
memoryx::SECKeyFrame
Definition: SECKeyFrame.h:31
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36