7 #ifndef __FWMEDDATA_SERIESDB_HPP__ 8 #define __FWMEDDATA_SERIESDB_HPP__ 10 #include "fwMedData/config.hpp" 11 #include "fwMedData/types.hpp" 13 #include <fwCom/Signal.hpp> 14 #include <fwCom/Signals.hpp> 16 #include <fwData/factory/new.hpp> 17 #include <fwData/Object.hpp> 21 fwCampAutoDeclareDataMacro((
fwMedData)(SeriesDB), FWMEDDATA_API);
39 typedef std::vector< SPTR(Series) > ContainerType;
41 typedef ContainerType::value_type ValueType;
42 typedef ContainerType::reference ReferenceType;
43 typedef ContainerType::const_reference ConstReferenceType;
44 typedef ContainerType::iterator IteratorType;
45 typedef ContainerType::const_iterator ConstIteratorType;
46 typedef ContainerType::reverse_iterator ReverseIteratorType;
47 typedef ContainerType::const_reverse_iterator ConstReverseIteratorType;
48 typedef ContainerType::size_type SizeType;
61 ConstIteratorType begin()
const;
62 ConstIteratorType end()
const;
64 ReverseIteratorType rbegin();
65 ReverseIteratorType rend();
66 ConstReverseIteratorType rbegin()
const;
67 ConstReverseIteratorType rend()
const;
70 SizeType size()
const;
75 ReferenceType operator[] ( size_type n );
76 ConstReferenceType operator[] ( size_type n )
const;
78 ReferenceType at ( SizeType n );
79 ConstReferenceType at ( SizeType n )
const;
92 FWMEDDATA_API
void shallowCopy( const ::fwData::Object::csptr& _source )
override;
95 FWMEDDATA_API
void cachedDeepCopy( const ::fwData::Object::csptr& _source, DeepCopyCacheType& cache )
override;
104 ContainerType& getContainer();
105 const ContainerType& getContainer ()
const;
106 void setContainer (
const ContainerType& val);
137 return m_container.begin();
144 return m_container.end();
151 return m_container.begin();
158 return m_container.end();
165 return m_container.rbegin();
172 return m_container.rend();
179 return m_container.rbegin();
186 return m_container.rend();
193 return m_container.empty();
200 return m_container.size();
207 return m_container.front();
214 return m_container.back();
221 return this->m_container[n];
228 return this->m_container[n];
235 return m_container.at(n);
240 inline SeriesDB::ConstReferenceType
SeriesDB::at(SeriesDB::SizeType n)
const 242 return m_container.at(n);
270 #endif // __FWMEDDATA_SERIESDB_HPP__ ContainerType::const_reverse_iterator const_reverse_iterator
ContainerType::value_type value_type
Namespace containing medical data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
ContainerType::const_iterator const_iterator
ReverseIteratorType rbegin()
void setContainer(const ContainerType &val)
Series container.
ReferenceType operator[](size_type n)
ContainerType::iterator iterator
static FWMEDDATA_APIconst::fwCom::Signals::SignalKeyType s_ADDED_SERIES_SIG
Type of signal when series are added.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
static FWMEDDATA_APIconst::fwCom::Signals::SignalKeyType s_REMOVED_SERIES_SIG
Type of signal when series are added.
Base class for each data object.
ContainerType & getContainer()
Series container.
ReverseIteratorType rend()
ContainerType::size_type size_type
ContainerType m_container
Series container.
ReferenceType at(SizeType n)
::fwCom::Signal< void(ContainerType) > RemovedSeriesSignalType
Type of signal when series are removed.
ContainerType::reverse_iterator reverse_iterator