Drive Engine  1.0.0
Plateforme de reconstruction 3D
DriveEngine::DefaultParameterList Class Reference

Default implementation of the parameters list. More...

#include <DefaultParameterList.h>

Inheritance diagram for DriveEngine::DefaultParameterList:
DriveEngine::IParameterList DriveEngine::IList DriveEngine::ICollection IExportable

Public Member Functions

 CONSTRUCTOR_H (IParameterList, DefaultParameterList)
 
 DESTRUCTOR_H (DefaultParameterList)
 
virtual Size GetSize () const
 Gets the size, that is the number of elements contained in the collection. More...
 
virtual bool IsEmpty () const
 Verify if the collection is empty. More...
 
virtual IEnumeratorGetEnumerator () const
 Gets an enumerator. More...
 
virtual IConstEnumeratorGetConstEnumerator () const
 Gets a constant enumerator. More...
 
virtual void Clear ()
 Remove every element contained in the collection. More...
 
virtual IExportableGetElement (Index index) const
 Gets an element. More...
 
virtual const IExportableGetConstElement (Index index) const
 Gets a constant element. More...
 
virtual void Add (IExportable &item)
 Adds an element. More...
 
virtual void Remove (IExportable &item)
 Removes an element. More...
 
virtual void AddList (const IList &list)
 Adds every element of a list. More...
 
virtual void RemoveList (const IList &list)
 Remove every element of a list. More...
 
virtual IParameterGetParameter (const char *name) const
 Gets a parameter. More...
 
virtual void Add (IParameter &parameter)
 Adds a parameter. More...
 
virtual void Remove (IParameter &parameter)
 Removes a parameter. More...
 
- Public Member Functions inherited from IExportable
virtual void Delete () const =0
 Deletes the current object. Needed for memory management. More...
 

Detailed Description

Default implementation of the parameters list.

See also
IParameterList

Member Function Documentation

void DefaultParameterList::Add ( IExportable element)
virtual

Adds an element.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
elementThe element to add. The element must not be null.

Implements DriveEngine::IList.

void DefaultParameterList::Add ( IParameter parameter)
virtual

Adds a parameter.

Do nothing if the parameter is null. If the parameter already exist, replace it.

Parameters
parameterThe parameter to add. It must not be null.

Implements DriveEngine::IParameterList.

void DefaultParameterList::AddList ( const IList list)
virtual

Adds every element of a list.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
listThe list of elements to add. The list must not be null.

Implements DriveEngine::IList.

void DefaultParameterList::Clear ( )
virtual

Remove every element contained in the collection.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Implements DriveEngine::ICollection.

const IExportable * DefaultParameterList::GetConstElement ( Index  index) const
virtual

Gets a constant element.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
indexThe index of the element. The index must be positive an should not exceed the size of the list. Otherwise, a precondition exception is thrown.
Returns
The constant element. On error, returns nullptr.

Implements DriveEngine::IList.

IConstEnumerator * DefaultParameterList::GetConstEnumerator ( ) const
virtual

Gets a constant enumerator.

Exception safety : No-throw guarantee. This member function never throws exceptions. Is the responsability of developper to free the memory occupied by enumerator after it use. Otherwise a memory leak is created.

Returns
A constant enumerator.

Implements DriveEngine::ICollection.

IExportable * DefaultParameterList::GetElement ( Index  index) const
virtual

Gets an element.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
indexThe index of the element. The index must be positive an should not exceed the size of the list. Otherwise, a precondition exception is thrown.
Returns
The element. On error, returns nullptr.

Implements DriveEngine::IList.

IEnumerator * DefaultParameterList::GetEnumerator ( ) const
virtual

Gets an enumerator.

Exception safety : No-throw guarantee. This member function never throws exceptions. Is the responsability of developper to free the memory occupied by enumerator after it use. Otherwise a memory leak is created.

Returns
An enumerator.

Implements DriveEngine::ICollection.

IParameter * DefaultParameterList::GetParameter ( const char *  name) const
virtual

Gets a parameter.

Parameters
nameThe parameter name.
Returns
Return the parameter. If the parameter doesn't exist, return a null pointer.

Implements DriveEngine::IParameterList.

long long DefaultParameterList::GetSize ( ) const
virtual

Gets the size, that is the number of elements contained in the collection.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The size.

Implements DriveEngine::ICollection.

bool DefaultParameterList::IsEmpty ( ) const
virtual

Verify if the collection is empty.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
True if empty, false if not.

Implements DriveEngine::ICollection.

void DefaultParameterList::Remove ( IExportable element)
virtual

Removes an element.

If the element is not found, do nothing.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
elementThe element to remove. The element must not be null.

Implements DriveEngine::IList.

void DefaultParameterList::Remove ( IParameter parameter)
virtual

Removes a parameter.

Do nothing if the parameter is null. Ignore it if it is not contained in the list.

Parameters
parameterThe parameter to remove. It must not be null.

Implements DriveEngine::IParameterList.

void DefaultParameterList::RemoveList ( const IList list)
virtual

Remove every element of a list.

Ignore element that are not contained in the list.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
listThe list of elements to remove. The list must not be null.

Implements DriveEngine::IList.


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