fw4spl
ools/include/fwDataTools/helper/Vector.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
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 #ifndef __FWDATATOOLS_HELPER_VECTOR_HPP__
8 #define __FWDATATOOLS_HELPER_VECTOR_HPP__
9 
10 #include "fwDataTools/config.hpp"
11 
12 #include <fwData/Vector.hpp>
13 
14 namespace fwDataTools
15 {
16 namespace helper
17 {
18 
22 class FWDATATOOLS_CLASS_API Vector
23 {
24 
25 public:
26 
28  FWDATATOOLS_API Vector( ::fwData::Vector::wptr vector );
29 
31  FWDATATOOLS_API ~Vector();
32 
39  FWDATATOOLS_API void add( ::fwData::Object::sptr _newObject );
40 
47  FWDATATOOLS_API void remove( ::fwData::Object::sptr _oldObject );
48 
54  FWDATATOOLS_API void clear();
55 
57  FWDATATOOLS_API void notify();
58 
59 private:
60 
61  ::fwData::Vector::ContainerType m_addedObjects;
62  ::fwData::Vector::ContainerType m_removedObjects;
63  ::fwData::Vector::wptr m_vector;
64 };
65 
66 } // namespace helper
67 } // namespace fwDataTools
68 
69 #endif // __FWDATATOOLS_HELPER_VECTOR_HPP__
The namespace fwDataTools contains classes which provide helpers to manipulate fwData::Object. *.
Defines an helper to modify an fwData::Vector and create in parallel the message to announce this mod...