fw4spl
Sequence.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #include "fwAtoms/registry/macros.hpp"
8 #include "fwAtoms/Sequence.hpp"
9 
10 #include <algorithm>
11 #include <functional>
12 
13 fwAtomsRegisterMacro( ::fwAtoms::Sequence );
14 
15 namespace fwAtoms
16 {
17 
18 //------------------------------------------------------------------------------
19 
20 Base::sptr Sequence::clone() const
21 {
22  Sequence::sptr cloneSeq = Sequence::New();
23  cloneSeq->m_value.resize(m_value.size());
24  std::transform(m_value.begin(), m_value.end(), cloneSeq->m_value.begin(),
25  std::bind(&::fwAtoms::Base::clone, std::placeholders::_1));
26  return cloneSeq;
27 }
28 
29 }
30 
fwAtoms contains basic objects to represent any other kind of object
virtual FWATOMS_API Base::sptr clone() const override
Returns a clone object.
Definition: Sequence.cpp:20
virtual Base::sptr clone() const =0
Returns a clone object.
Sequence represented a list of meta object.
Definition: Sequence.hpp:22