Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
Euclid::GridContainer::GridCellManagerTraits< GridCellManager > Class Template Reference

Class used by the GridContainer to access the different CellManagers. More...

#include <GridCellManagerTraits.h>

Public Types

typedef GridCellManager::data_type data_type
 The type of the data kept by the GridCellManager.
 
typedef GridCellManager::iterator iterator
 

Static Public Member Functions

static std::unique_ptr< GridCellManager > factory (size_t size)
 
static size_t size (const GridCellManager &cell_manager)
 
static iterator begin (GridCellManager &cell_manager)
 
static iterator end (GridCellManager &cell_manager)
 

Static Public Attributes

static const bool enable_boost_serialize = false
 

Detailed Description

template<typename GridCellManager>
class Euclid::GridContainer::GridCellManagerTraits< GridCellManager >

Class used by the GridContainer to access the different CellManagers.

To reduce the requirements of the different GridCellManager which are used by the GridContainer to store the data, the GridContainer class does not directly access the GridCellManager instances, but it uses this trait to redirect all the operations. The default implementation of the trait simply redirects the operations, but, if the API of a manager does not fit the trait, this default behavior can be overridden by declaring a specialization of the trait.

Template Parameters
GridCellManagerthe manager which keeps the GridContainer data

Definition at line 50 of file GridCellManagerTraits.h.

Member Typedef Documentation

◆ data_type

template<typename GridCellManager >
typedef GridCellManager::data_type Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::data_type

The type of the data kept by the GridCellManager.

Definition at line 53 of file GridCellManagerTraits.h.

◆ iterator

template<typename GridCellManager >
typedef GridCellManager::iterator Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::iterator

The iterator type which is used to iterate through the data kept in the cell manager

Definition at line 57 of file GridCellManagerTraits.h.

Member Function Documentation

◆ begin()

template<typename GridCellManager >
static iterator Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::begin ( GridCellManager &  cell_manager)
static

Returns an iterator pointing to the first element managed by the GridCellManager. Defaults on calling the begin() method of the GridCellManager instance.

Parameters
cell_managerthe cell manager
Returns
An iterator at the first element

◆ end()

template<typename GridCellManager >
static iterator Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::end ( GridCellManager &  cell_manager)
static

Returns an iterator pointing right after the last element managed by the GridCellManager. Defaults on calling the end() method of the GridCellManager instance.

Parameters
cell_managerthe GridCellManager
Returns
An iterator right after the last element

◆ factory()

template<typename GridCellManager >
static std::unique_ptr< GridCellManager > Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::factory ( size_t  size)
static

Factory which creates a GridCellManager instance with the given number of managed data, which all are set to a default value. The default implementation will try to use a constructor with the size as parameter.

Parameters
sizeThe number of data the manager will contain
Returns
A unique_ptr to the newly constructed GridCellManager

◆ size()

template<typename GridCellManager >
static size_t Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::size ( const GridCellManager &  cell_manager)
static

Returns the number of data managed by the given GridCellManager. Defaults on calling the constant version of method size() on the GridCellManager instance.

Parameters
cell_managerThe GridCellManager to get the size of
Returns
The number of data managed by the GridCellManager

Referenced by Euclid::GridContainer::GridCellManagerTraits< GridCellManagerVectorOfVectors< T > >::factory().

Member Data Documentation

◆ enable_boost_serialize

template<typename GridCellManager >
const bool Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::enable_boost_serialize = false
static

Flag which indicates if the GridCellManager is boost serializable. By default it is set to false. Note that Grids which use CellManagers which have this flag set to false cannot be serialized.

Definition at line 101 of file GridCellManagerTraits.h.


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