FREE::SmartCollectionBase< TElement > Class Template Reference

Template class for all kind of collections storing itk::LightObject based objects. More...

#include <freSmartCollectionBase.h>

Inheritance diagram for FREE::SmartCollectionBase< TElement >:

Inheritance graph
FREE::KeyedCollectionBase\< TElement \>FREE::SetupParameterConstraints\< FREE::SetupParameterConstraint \>FREE::CollectionBase\< TElement, itk::SmartPointer\< TElement \> \>FREE::ComponentCacheCollection\< std::string, TCache, FREE::ComponentCacheIdentifier\< TCache \> \>FREE::XMLKeyedCollectionBase\< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier \>FREE::XMLKeyedCollectionBase\< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier \>FREE::XMLKeyedCollectionBase\< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase \>FREE::XMLKeyedCollectionBase\< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier \>FREE::XMLKeyedCollectionBase\< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier \>
[legend]
Collaboration diagram for FREE::SmartCollectionBase< TElement >:

Collaboration graph
FREE::CollectionBase\< TElement, itk::SmartPointer\< TElement \> \>
[legend]

List of all members.

Public Types

typedef
CollectionBase
< TElement,
itk::SmartPointer
< TElement > > 
Superclass
typedef
Superclass::ElementType 
ElementType
typedef
Superclass::StorageType 
StorageType
typedef
Superclass::ElementVectorType 
ElementVectorType
typedef
Superclass::ElementsCountType 
ElementsCountType

Public Member Functions

virtual const char * GetNameOfClass () const
 SmartCollectionBase ()
 SmartCollectionBase (const SmartCollectionBase< TElement > &rCollection)
virtual
SmartCollectionBase
operator= (const SmartCollectionBase &rCollection)
virtual
SmartCollectionBase
operator+ (const SmartCollectionBase &collection)
virtual ElementTypeGetElement (const ElementsCountType &index) const
virtual ElementsCountType AddElement (ElementType *pElement)
virtual ElementsCountType AddElement (const ElementType &element)


Detailed Description

template<class TElement>
class FREE::SmartCollectionBase< TElement >

Template class for all kind of collections storing itk::LightObject based objects.

All objects in the collection are stored in a smartpointer vector. So a removed object will not be deleted directly. Only the smartpointer will be removed. The object will be deleted when no smartpointer is refering to it anymore.

Definition at line 42 of file freSmartCollectionBase.h.


Member Typedef Documentation

template<class TElement>
typedef CollectionBase<TElement, itk::SmartPointer<TElement> > FREE::SmartCollectionBase< TElement >::Superclass

Reimplemented in FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >, FREE::XMLCollectionBase< TXMLElement >, FREE::XMLKeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::Adaptation::Adaptation, FREE::Adaptation::AdaptationList, FREE::ComponentSetupCollection, FREE::CtrlProfile::ProfileRequirement, FREE::CtrlProfile::ProfileRequirements, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::KeyedCollectionBase< std::string, TCache, FREE::ComponentCacheIdentifier< TCache > >, FREE::KeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::KeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileOption >, FREE::XMLCollectionBase< FREE::Adaptation::Adaptation >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileRequirement >, FREE::XMLCollectionBase< FREE::Adaptation::AdaptationComponent >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, and FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >.

Definition at line 45 of file freSmartCollectionBase.h.

template<class TElement>
typedef Superclass::ElementType FREE::SmartCollectionBase< TElement >::ElementType

Reimplemented from FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >.

Reimplemented in FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >, FREE::XMLCollectionBase< TXMLElement >, FREE::XMLKeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::KeyedCollectionBase< std::string, TCache, FREE::ComponentCacheIdentifier< TCache > >, FREE::KeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::KeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileOption >, FREE::XMLCollectionBase< FREE::Adaptation::Adaptation >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileRequirement >, FREE::XMLCollectionBase< FREE::Adaptation::AdaptationComponent >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, and FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >.

Definition at line 46 of file freSmartCollectionBase.h.

template<class TElement>
typedef Superclass::StorageType FREE::SmartCollectionBase< TElement >::StorageType

Reimplemented from FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >.

Definition at line 47 of file freSmartCollectionBase.h.

template<class TElement>
typedef Superclass::ElementVectorType FREE::SmartCollectionBase< TElement >::ElementVectorType

Reimplemented from FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >.

Reimplemented in FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >, FREE::XMLCollectionBase< TXMLElement >, FREE::XMLKeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::KeyedCollectionBase< std::string, TCache, FREE::ComponentCacheIdentifier< TCache > >, FREE::KeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::KeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileOption >, FREE::XMLCollectionBase< FREE::Adaptation::Adaptation >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileRequirement >, FREE::XMLCollectionBase< FREE::Adaptation::AdaptationComponent >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, and FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >.

Definition at line 48 of file freSmartCollectionBase.h.

template<class TElement>
typedef Superclass::ElementsCountType FREE::SmartCollectionBase< TElement >::ElementsCountType

Reimplemented from FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >.

Reimplemented in FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >, FREE::XMLCollectionBase< TXMLElement >, FREE::XMLKeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::ComponentMediaLinks, FREE::CtrlProfile::ProfileMediaMap, FREE::CtrlProfile::ProfileParameters, FREE::CtrlProfile::ProfileRequirement, FREE::CtrlProfile::ProfileRequirements, FREE::CtrlProfile::ProfileSubComponents, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::KeyedCollectionBase< std::string, TCache, FREE::ComponentCacheIdentifier< TCache > >, FREE::KeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::KeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileOption >, FREE::XMLCollectionBase< FREE::Adaptation::Adaptation >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileRequirement >, FREE::XMLCollectionBase< FREE::Adaptation::AdaptationComponent >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, and FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >.

Definition at line 49 of file freSmartCollectionBase.h.


Constructor & Destructor Documentation

template<class TElement>
FREE::SmartCollectionBase< TElement >::SmartCollectionBase (  )  [inline]

Normal default Constructor.

Definition at line 55 of file freSmartCollectionBase.h.

template<class TElement>
FREE::SmartCollectionBase< TElement >::SmartCollectionBase ( const SmartCollectionBase< TElement > &  rCollection  )  [inline]

Copy constructor

Definition at line 59 of file freSmartCollectionBase.h.


Member Function Documentation

template<class TElement>
virtual const char* FREE::SmartCollectionBase< TElement >::GetNameOfClass (  )  const [inline, virtual]

Reimplemented from FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >.

Reimplemented in FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >, FREE::XMLCollectionBase< TXMLElement >, FREE::XMLKeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::SetupParameterConstraints, FREE::ComponentCacheCollection< TCache >, FREE::Adaptation::Adaptation, FREE::Adaptation::AdaptationList, FREE::ComponentSetupCollection, FREE::CtrlProfile::ProfileRequirement, FREE::CtrlProfile::ProfileSubComponents, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::KeyedCollectionBase< std::string, TCache, FREE::ComponentCacheIdentifier< TCache > >, FREE::KeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::KeyedCollectionBase< TKey, TXMLElement, TIdentifierClass >, FREE::KeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, FREE::KeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileOption >, FREE::XMLCollectionBase< FREE::Adaptation::Adaptation >, FREE::XMLCollectionBase< FREE::CtrlProfile::ProfileRequirement >, FREE::XMLCollectionBase< FREE::Adaptation::AdaptationComponent >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Parameter, FREE::CtrlProfile::ProfileParameterIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentSetup, FREE::ComponentSetupIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::ComponentMediaLink, FREE::ComponentMediaLinkIdentifier >, FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::SubComponent, FREE::CtrlProfile::ProfileSubCompIdentifier >, and FREE::XMLKeyedCollectionBase< std::string, FREE::CtrlProfile::Media, FREE::CtrlProfile::MediaIdentifierBase >.

Definition at line 51 of file freSmartCollectionBase.h.

template<class TElement>
SmartCollectionBase< TElement > & FREE::SmartCollectionBase< TElement >::operator= ( const SmartCollectionBase< TElement > &  rCollection  )  [inline, virtual]

Assignment operator. /remark

Definition at line 34 of file freSmartCollectionBase.txx.

References FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >::operator=().

Here is the call graph for this function:

FREE::CollectionBase\< TElement, itk::SmartPointer\< TElement \> \>::operator=

template<class TElement>
SmartCollectionBase< TElement > & FREE::SmartCollectionBase< TElement >::operator+ ( const SmartCollectionBase< TElement > &  collection  )  [inline, virtual]

Adds copies of the elements of the passed collection to its own.

Definition at line 44 of file freSmartCollectionBase.txx.

References FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >::operator+().

Here is the call graph for this function:

FREE::CollectionBase\< TElement, itk::SmartPointer\< TElement \> \>::operator+

template<class TElement>
SmartCollectionBase< TElement >::ElementType * FREE::SmartCollectionBase< TElement >::GetElement ( const ElementsCountType index  )  const [inline, virtual]

The function returns the pointer to the element specified by index. If index is out of range, the function returns NULL.

Parameters:
[in] index The index of the element.
Returns:
Pointer to the ComponentFact.

Definition at line 53 of file freSmartCollectionBase.txx.

References FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >::m_Elements.

Referenced by FREE::GenericSetupToImageAdaptor::AdaptSetup(), FREE::StatisticDictionary::AddEntryDefinition(), FREE::StatisticDictionary::AddValueDefinition(), FREE::ConstrainedMetricInterface::ComputeConstraintPenalty(), FREE::SetupParameterConstraints::GetElementsByDestination(), FREE::StatisticDictionary::GetEntryDefinitionByID(), FREE::StatisticDictionary::GetEntryDefinitionByIndex(), FREE::StatisticDictionary::GetEntryDefinitionByName(), FREE::SetupParameterTraitsGenerator::GetParameterOrder(), FREE::StatisticDictionary::GetValueDefinitionByID(), FREE::StatisticDictionary::GetValueDefinitionByIndex(), and FREE::StatisticDictionary::GetValueDefinitionByName().

template<class TElement>
SmartCollectionBase< TElement >::ElementsCountType FREE::SmartCollectionBase< TElement >::AddElement ( ElementType pElement  )  [inline, virtual]

The function adds the passed element to its collection.

Remarks:
The collection takes the ownership. Therfore it will delete the object when the collection is reset by any cause.
Parameters:
[in] pElement Pointer of the fact which should be added.
Returns:
Index within the collection to where the element has been added.

Definition at line 65 of file freSmartCollectionBase.txx.

References FREE::CollectionBase< TElement, itk::SmartPointer< TElement > >::m_Elements, and throwExceptionMacro.

Referenced by FREE::GenericSetupToImageAdaptor::AdaptComponent(), FREE::ConstrainedMetricInterface::AddConstraint(), FREE::SmartCollectionBase< TElement >::AddElement(), FREE::StatisticDictionary::AddEntryDefinition(), FREE::SetupParameterTraitsGenerator::AddParameterConstraint(), FREE::ConstrainedSetupTransform::AddParameterConstraint(), FREE::StatisticDictionary::AddValueDefinition(), and FREE::GenericSetupToImageAdaptor::ExtendComponent().

template<class TElement>
SmartCollectionBase< TElement >::ElementsCountType FREE::SmartCollectionBase< TElement >::AddElement ( const ElementType element  )  [inline, virtual]

The function copies the passed element and adds the copy to its collection.

Parameters:
[in] element Reference to the element that should be copied and added.
Returns:
Index within the collection to where the element has been added.

Reimplemented in FREE::ComponentSetupCollection.

Definition at line 77 of file freSmartCollectionBase.txx.

References FREE::SmartCollectionBase< TElement >::AddElement().

Here is the call graph for this function:

FREE::SmartCollectionBase::AddElement


The documentation for this class was generated from the following files:
Generated at Sat Oct 13 18:17:27 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000