Alexandria 2.31.2
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::GridContainer::GridCellManagerTraits< std::vector< T > > Struct Template Reference

#include <GridCellManagerTraits.h>

Public Types

typedef T data_type
 The type of the data kept by the GridCellManager.
 
typedef T & reference_type
 
typedef T * pointer_type
 
typedef std::vector< T >::iterator iterator
 
typedef std::vector< T >::data_type data_type
 The type of the data kept by the GridCellManager.
 
typedef std::vector< T >::iterator iterator
 

Static Public Member Functions

static std::unique_ptr< std::vector< T > > factory (size_t size)
 Returns a vector containing "size" default constructed elements.
 
static size_t size (const std::vector< T > &vector)
 Returns the size of the vector.
 
static iterator begin (std::vector< T > &vector)
 Returns an iterator at the first element of the vector.
 
static iterator end (std::vector< T > &vector)
 Returns an iterator right after the last element of the vector.
 
static std::unique_ptr< std::vector< T > > factory (size_t size)
 
static size_t size (const std::vector< T > &cell_manager)
 
static iterator begin (std::vector< T > &cell_manager)
 
static iterator end (std::vector< T > &cell_manager)
 

Static Public Attributes

static const bool enable_boost_serialize = true
 Enables boost serialization of Grids using vectors as GridCellManagers.
 
static const bool enable_boost_serialize
 

Detailed Description

template<typename T>
struct Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >

Specialization of the GridCellManagerTraits for vector CellManagers. It uses all the default operations but it changes the serialization flag to true to declare that vector GridCellManagers can be serialized. Note that the type T of the data managed has to also be serializable.

Template Parameters
Tthe type of the data kept by the vector

Definition at line 114 of file GridCellManagerTraits.h.

Member Typedef Documentation

◆ data_type [1/2]

typedef std::vector< T >::data_type Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::data_type

The type of the data kept by the GridCellManager.

Definition at line 53 of file GridCellManagerTraits.h.

◆ data_type [2/2]

template<typename T>
typedef T Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::data_type

The type of the data kept by the GridCellManager.

Definition at line 117 of file GridCellManagerTraits.h.

◆ iterator [1/2]

typedef std::vector< T >::iterator Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::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.

◆ iterator [2/2]

template<typename T>
typedef std::vector<T>::iterator Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::iterator

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

Definition at line 123 of file GridCellManagerTraits.h.

◆ pointer_type

template<typename T>
typedef T* Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::pointer_type

Definition at line 119 of file GridCellManagerTraits.h.

◆ reference_type

template<typename T>
typedef T& Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::reference_type

Definition at line 118 of file GridCellManagerTraits.h.

Member Function Documentation

◆ begin() [1/2]

auto Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::begin ( std::vector< T > & 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

Definition at line 86 of file GridCellManagerTraits.icpp.

◆ begin() [2/2]

template<typename T>
auto Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::begin ( std::vector< T > & vector)
static

Returns an iterator at the first element of the vector.

Definition at line 59 of file GridCellManagerTraits.icpp.

References begin().

Referenced by begin().

Here is the call graph for this function:

◆ end() [1/2]

auto Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::end ( std::vector< T > & 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

Definition at line 96 of file GridCellManagerTraits.icpp.

◆ end() [2/2]

template<typename T>
auto Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::end ( std::vector< T > & vector)
static

Returns an iterator right after the last element of the vector.

Definition at line 64 of file GridCellManagerTraits.icpp.

References end().

Referenced by end().

Here is the call graph for this function:

◆ factory() [1/2]

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

Definition at line 67 of file GridCellManagerTraits.icpp.

◆ factory() [2/2]

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

Returns a vector containing "size" default constructed elements.

Definition at line 49 of file GridCellManagerTraits.icpp.

References factory(), and size().

Referenced by factory().

Here is the call graph for this function:

◆ size() [1/2]

size_t Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::size ( const std::vector< T > & 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

Definition at line 76 of file GridCellManagerTraits.icpp.

◆ size() [2/2]

template<typename T>
size_t Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::size ( const std::vector< T > & vector)
static

Returns the size of the vector.

Definition at line 54 of file GridCellManagerTraits.icpp.

References size(), and std::vector< T >::size().

Referenced by factory(), and size().

Here is the call graph for this function:

Member Data Documentation

◆ enable_boost_serialize [1/2]

const bool Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::enable_boost_serialize
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.

◆ enable_boost_serialize [2/2]

template<typename T>
const bool Euclid::GridContainer::GridCellManagerTraits< std::vector< T > >::enable_boost_serialize = true
static

Enables boost serialization of Grids using vectors as GridCellManagers.

Definition at line 138 of file GridCellManagerTraits.h.


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