7 #ifndef __FWDATA_LIST_HPP__ 8 #define __FWDATA_LIST_HPP__ 10 #include "fwData/config.hpp" 11 #include "fwData/factory/new.hpp" 12 #include "fwData/Object.hpp" 16 fwCampAutoDeclareDataMacro((
fwData)(List), FWDATA_API);
35 typedef std::list< Object::sptr > ContainerType;
37 typedef ContainerType::value_type ValueType;
38 typedef ContainerType::reference ReferenceType;
39 typedef ContainerType::const_reference ConstReferenceType;
40 typedef ContainerType::iterator IteratorType;
41 typedef ContainerType::const_iterator ConstIteratorType;
42 typedef ContainerType::reverse_iterator ReverseIteratorType;
43 typedef ContainerType::const_reverse_iterator ConstReverseIteratorType;
44 typedef ContainerType::size_type SizeType;
53 FWDATA_API
virtual ~
List();
68 ConstIteratorType begin()
const;
69 ConstIteratorType end()
const;
71 ReverseIteratorType rbegin();
72 ReverseIteratorType rend();
73 ConstReverseIteratorType rbegin()
const;
74 ConstReverseIteratorType rend()
const;
77 SizeType size()
const;
79 ReferenceType front();
81 ConstReferenceType front()
const;
82 ConstReferenceType back()
const;
87 ContainerType& getContainer();
88 const ContainerType& getContainer ()
const;
89 void setContainer (
const ContainerType& val);
93 FWDATA_API
void shallowCopy(
const Object::csptr& _source )
override;
96 FWDATA_API
void cachedDeepCopy(
const Object::csptr& _source, DeepCopyCacheType& cache)
override;
100 ContainerType m_container;
107 return m_container.begin();
114 return m_container.end();
121 return m_container.begin();
128 return m_container.end();
135 return m_container.rbegin();
142 return m_container.rend();
149 return m_container.rbegin();
156 return m_container.rend();
163 return m_container.empty();
170 return m_container.size();
177 return m_container.front();
184 return m_container.back();
191 return m_container.front();
198 return m_container.back();
ReverseIteratorType rbegin()
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
ReverseIteratorType rend()
ContainerType::size_type size_type
ContainerType & getContainer()
get/set the list of fwData::Object
ContainerType::const_reverse_iterator const_reverse_iterator
This class defines a list of objects.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
void setContainer(const ContainerType &val)
get/set the list of fwData::Object
Base class for each data object.
ContainerType::const_iterator const_iterator
ContainerType::iterator iterator
Contains the representation of the data objects used in the framework.
ContainerType::value_type value_type
ContainerType::reverse_iterator reverse_iterator