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), 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 
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
str
std::string str(const T &t)
Definition: UserAssistedSegmenterGuiWidgetController.cpp:43
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:56
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:661
memoryx::SECKeyFrame::SECKeyFrame
SECKeyFrame()
Definition: SECKeyFrame.cpp:30
memoryx::operator<<
std::ostream & operator<<(std::ostream &str, SECKeyFrameBasePtr keyframe)
Definition: SECKeyFrame.cpp:63
memoryx::SECKeyFrame
Definition: SECKeyFrame.h:31
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36