OTB  6.3.0
Orfeo Toolbox
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
otb::ObjectList< TObject > Class Template Reference

#include <otbObjectList.h>

+ Inheritance diagram for otb::ObjectList< TObject >:
+ Collaboration diagram for otb::ObjectList< TObject >:

Classes

class  ConstIterator
 
class  Iterator
 
class  ReverseConstIterator
 
class  ReverseIterator
 

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
InternalContainerType::size_type 
InternalContainerSizeType
 
typedef std::vector
< ObjectPointerType
InternalContainerType
 
typedef itk::SmartPointer
< ObjectType
ObjectPointerType
 
typedef TObject ObjectType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ObjectList Self
 
typedef itk::DataObject Superclass
 
- Public Types inherited from itk::DataObject
typedef SmartPointer< const SelfConstPointer
 
typedef std::string DataObjectIdentifierType
 
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
 
typedef SmartPointer< SelfPointer
 
typedef DataObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

ObjectPointerType Back (void)
 
Iterator Begin (void)
 
ConstIterator Begin (void) const
 
InternalContainerSizeType Capacity (void) const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
Iterator End (void)
 
ConstIterator End (void) const
 
void Erase (unsigned int index)
 
void Erase (Iterator begin, Iterator end)
 
ObjectPointerType Front (void)
 
virtual const char * GetNameOfClass () const
 
ObjectPointerType GetNthElement (unsigned int index) const
 
void Reserve (InternalContainerSizeType size)
 
void Resize (InternalContainerSizeType size)
 
ReverseIterator ReverseBegin (void)
 
ReverseConstIterator ReverseBegin (void) const
 
ReverseIterator ReverseEnd (void)
 
ReverseConstIterator ReverseEnd (void) const
 
void SetNthElement (unsigned int index, ObjectPointerType element)
 
InternalContainerSizeType Size (void) const
 
void PushBack (ObjectType *element)
 
void PopBack (void)
 
void SetNthElement (unsigned int index, const ObjectType *element)
 
void Clear (void)
 
Iterator Insert (Iterator position, ObjectPointerType element)
 
ReverseIterator Insert (ReverseIterator position, ObjectPointerType element)
 
void Erase (Iterator loc)
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
 
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointerForwardReference
< ProcessObject
GetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void Graft (const DataObject *)
 
virtual void Initialize ()
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
virtual bool VerifyRequestedRegion ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 ObjectList ()
 
 ~ObjectList () ITK_OVERRIDE
 
void PrintSelf (std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

 ObjectList (const Self &)
 
void operator= (const Self &)
 

Private Attributes

InternalContainerType m_InternalContainer
 

Friends

class ConstIterator
 
class Iterator
 
class ReverseConstIterator
 
class ReverseIterator
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

template<class TObject>
class otb::ObjectList< TObject >

This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.

ObjectList stores SmartPointer to ObjectType in a std::vector data structure. It provides the same methods and iterators interfaces.

Definition at line 39 of file otbObjectList.h.

Member Typedef Documentation

template<class TObject>
typedef itk::SmartPointer<const Self> otb::ObjectList< TObject >::ConstPointer

Definition at line 46 of file otbObjectList.h.

template<class TObject>
typedef InternalContainerType::size_type otb::ObjectList< TObject >::InternalContainerSizeType

Definition at line 58 of file otbObjectList.h.

template<class TObject>
typedef std::vector<ObjectPointerType> otb::ObjectList< TObject >::InternalContainerType

Definition at line 57 of file otbObjectList.h.

template<class TObject>
typedef itk::SmartPointer<ObjectType> otb::ObjectList< TObject >::ObjectPointerType

Definition at line 56 of file otbObjectList.h.

template<class TObject>
typedef TObject otb::ObjectList< TObject >::ObjectType

Template parameter typedefs

Definition at line 52 of file otbObjectList.h.

template<class TObject>
typedef itk::SmartPointer<Self> otb::ObjectList< TObject >::Pointer

Definition at line 45 of file otbObjectList.h.

template<class TObject>
typedef ObjectList otb::ObjectList< TObject >::Self

Standard typedefs

Definition at line 43 of file otbObjectList.h.

template<class TObject>
typedef itk::DataObject otb::ObjectList< TObject >::Superclass

Definition at line 44 of file otbObjectList.h.

Constructor & Destructor Documentation

template<class TObject >
otb::ObjectList< TObject >::ObjectList ( )
protected

Constructor

Definition at line 34 of file otbObjectList.txx.

template<class TObject>
otb::ObjectList< TObject >::~ObjectList ( )
inlineprotected

Destructor

Definition at line 668 of file otbObjectList.h.

template<class TObject>
otb::ObjectList< TObject >::ObjectList ( const Self )
private

Member Function Documentation

template<class TObject >
ObjectList< TObject >::ObjectPointerType otb::ObjectList< TObject >::Back ( void  )

Return the last element of the list.

Returns
The last element of the list.

Definition at line 194 of file otbObjectList.txx.

template<class TObject >
ObjectList< TObject >::Iterator otb::ObjectList< TObject >::Begin ( void  )

Get an Iterator that points to the beginning of the container.

Returns
The iterator.

Definition at line 266 of file otbObjectList.txx.

Referenced by otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData().

template<class TObject >
ObjectList< TObject >::ConstIterator otb::ObjectList< TObject >::Begin ( void  ) const

Get a ConstIterator that points to the beginning of the container.

Returns
The iterator.

Definition at line 279 of file otbObjectList.txx.

template<class TObject >
ObjectList< TObject >::InternalContainerSizeType otb::ObjectList< TObject >::Capacity ( void  ) const

Get the capacity of the vector.

Returns
The capacity of the vector.

Definition at line 56 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::Clear ( void  )

Clear the object list.

Definition at line 224 of file otbObjectList.txx.

Referenced by otb::PersistentHistogramVectorImageFilter< TInputImage >::Reset().

template<class TObject>
virtual::itk::LightObject::Pointer otb::ObjectList< TObject >::CreateAnother ( void  ) const
virtual

Reimplemented from itk::Object.

template<class TObject >
ObjectList< TObject >::Iterator otb::ObjectList< TObject >::End ( void  )

Get an Iterator that points past-the-end of the container.

Returns
The iterator.

Definition at line 318 of file otbObjectList.txx.

Referenced by otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData().

template<class TObject >
ObjectList< TObject >::ConstIterator otb::ObjectList< TObject >::End ( void  ) const

Get a ConstIterator that points past-the-end of the container.

Returns
The iterator.

Definition at line 331 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::Erase ( unsigned int  index)

Erase the nth element of the list.

Parameters
indexThe index of the element to erase.

Erase the nth element in the list.

Parameters
indexThe index of the element to erase.

Definition at line 206 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::Erase ( Iterator  begin,
Iterator  end 
)

Erase elements from begin to last.

Parameters
beginIterator pointing on first object to erase.
endIterator pointing past the last object to erase.

Definition at line 371 of file otbObjectList.txx.

References otb::ObjectList< TObject >::Iterator::GetIter().

template<class TObject >
void otb::ObjectList< TObject >::Erase ( Iterator  loc)

Erase loc element.

Parameters
locIterator pointing on object to erase.

Definition at line 384 of file otbObjectList.txx.

References otb::ObjectList< TObject >::Iterator::GetIter().

template<class TObject >
ObjectList< TObject >::ObjectPointerType otb::ObjectList< TObject >::Front ( void  )

Return the first element of the list.

Returns
The first element of the list.

Definition at line 183 of file otbObjectList.txx.

template<class TObject>
virtual const char* otb::ObjectList< TObject >::GetNameOfClass ( ) const
virtual

Type macro

Reimplemented from itk::DataObject.

Reimplemented in otb::SamplingRateCalculatorList.

template<class TObject >
ObjectList< TObject >::ObjectPointerType otb::ObjectList< TObject >::GetNthElement ( unsigned int  index) const
template<class TObject >
ObjectList< TObject >::Iterator otb::ObjectList< TObject >::Insert ( Iterator  position,
ObjectPointerType  element 
)

Insert an element at a given position

Parameters
positionA random access iterator
Returns
An iterator that points to the newly insereted element.

Insert an element

Definition at line 237 of file otbObjectList.txx.

References otb::ObjectList< TObject >::Iterator::GetIter().

template<class TObject >
ObjectList< TObject >::ReverseIterator otb::ObjectList< TObject >::Insert ( ReverseIterator  position,
ObjectPointerType  element 
)

Insert an element at a given position

Parameters
positionA reverse iterator
Returns
A reverse iterator that points to the newly insereted element.

Insert an element

Definition at line 251 of file otbObjectList.txx.

References otb::ObjectList< TObject >::ReverseIterator::GetIter().

template<class TObject>
static Pointer otb::ObjectList< TObject >::New ( )
static

Creation through object factory macro

template<class TObject>
void otb::ObjectList< TObject >::operator= ( const Self )
private
template<class TObject >
void otb::ObjectList< TObject >::PopBack ( void  )

Delete the last element to the list.

Definition at line 105 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual
template<class TObject >
void otb::ObjectList< TObject >::PushBack ( ObjectType element)

Append an element to the list.

Parameters
elementPointer to the element to append.

Definition at line 92 of file otbObjectList.txx.

Referenced by otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData(), and otb::PersistentHistogramVectorImageFilter< TInputImage >::Reset().

template<class TObject >
void otb::ObjectList< TObject >::Reserve ( InternalContainerSizeType  size)

Set the minimum capacity of the vector.

Parameters
sizeSize of the vector to reserve.

Definition at line 44 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::Resize ( InternalContainerSizeType  size)

Resize the maximal list capacity.

Parameters
sizeThe new maximal size of the list.

Definition at line 80 of file otbObjectList.txx.

template<class TObject >
ObjectList< TObject >::ReverseIterator otb::ObjectList< TObject >::ReverseBegin ( void  )

Get a ReverseIterator that points to the reverse beginning of the container.

Returns
The iterator.

Definition at line 292 of file otbObjectList.txx.

Referenced by otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData().

template<class TObject >
ObjectList< TObject >::ReverseConstIterator otb::ObjectList< TObject >::ReverseBegin ( void  ) const

Get a ReverseConstIterator that points to the reverse beginning of the container.

Returns
The iterator.

Definition at line 305 of file otbObjectList.txx.

template<class TObject >
ObjectList< TObject >::ReverseIterator otb::ObjectList< TObject >::ReverseEnd ( void  )

Get a ReverseIterator that points to the reverse past-the-end of the container.

Returns
The iterator.

Definition at line 344 of file otbObjectList.txx.

Referenced by otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData().

template<class TObject >
ObjectList< TObject >::ReverseConstIterator otb::ObjectList< TObject >::ReverseEnd ( void  ) const

Get a ReverseConstIterator that points to the reverse past-the-end of the container.

Returns
The iterator.

Definition at line 357 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::SetNthElement ( unsigned int  index,
ObjectPointerType  element 
)

Set the nth element of the list.

Parameters
indexThe index where to put the element.
elementPointer to the element to set.

Definition at line 123 of file otbObjectList.txx.

template<class TObject >
void otb::ObjectList< TObject >::SetNthElement ( unsigned int  index,
const ObjectType element 
)

Set the nth element of the list.

Parameters
indexThe index where to put the element.
elementPointer to the element to set.

Definition at line 143 of file otbObjectList.txx.

template<class TObject >
ObjectList< TObject >::InternalContainerSizeType otb::ObjectList< TObject >::Size ( void  ) const

Friends And Related Function Documentation

template<class TObject>
friend class ConstIterator
friend

Definition at line 138 of file otbObjectList.h.

template<class TObject>
friend class Iterator
friend

Definition at line 136 of file otbObjectList.h.

template<class TObject>
friend class ReverseConstIterator
friend

Definition at line 140 of file otbObjectList.h.

template<class TObject>
friend class ReverseIterator
friend

Definition at line 139 of file otbObjectList.h.

Member Data Documentation

template<class TObject>
InternalContainerType otb::ObjectList< TObject >::m_InternalContainer
private

The internal std::vector object container

Definition at line 677 of file otbObjectList.h.


The documentation for this class was generated from the following files: