Ocean
Ocean::Accessor Class Referenceabstract

This class implements a base class for all accessors. More...

Inheritance diagram for Ocean::Accessor:

Public Member Functions

virtual ~Accessor ()=default
 Default destructor. More...
 
virtual size_t size () const =0
 Returns the number of accessible elements of this accessor object. More...
 
bool isEmpty () const
 Returns whether this accessor provides no elements. More...
 

Static Public Member Functions

template<typename TAccessor >
static std::vector< typename TAccessor::Type > accessor2elements (const TAccessor &accessor)
 Returns all elements of a given accessor (as a block). More...
 
template<typename TAccessor >
static std::unordered_map< typename TAccessor::KeyType, typename TAccessor::Type > accessor2map (const TAccessor &accessor)
 Returns all elements of a given accessor as a map with key and elements. More...
 
template<typename TAccessor , typename TIndex >
static std::vector< typename TAccessor::Type > accessor2subsetElements (const TAccessor &accessor, const std::vector< TIndex > &subset)
 Returns a subset of all elements of a given accessor (as a block). More...
 

Protected Member Functions

 Accessor ()=default
 Protected default constructor. More...
 
 Accessor (const Accessor &accessor)=default
 Protected copy constructor. More...
 
Accessoroperator= (const Accessor &accessor)=delete
 Deleted assign operator. More...
 

Detailed Description

This class implements a base class for all accessors.

Accessors provide access to any kind of data elements which are stored in any kind of data structure by any kind of access method.

Constructor & Destructor Documentation

◆ ~Accessor()

virtual Ocean::Accessor::~Accessor ( )
virtualdefault

Default destructor.

◆ Accessor() [1/2]

Ocean::Accessor::Accessor ( )
protecteddefault

Protected default constructor.

◆ Accessor() [2/2]

Ocean::Accessor::Accessor ( const Accessor accessor)
protecteddefault

Protected copy constructor.

Parameters
accessorAccessor to copy

Member Function Documentation

◆ accessor2elements()

template<typename TAccessor >
std::vector< typename TAccessor::Type > Ocean::Accessor::accessor2elements ( const TAccessor &  accessor)
static

Returns all elements of a given accessor (as a block).

Parameters
accessorThe accessor from which all elements are extracted
Returns
The elements as a block

◆ accessor2map()

template<typename TAccessor >
std::unordered_map< typename TAccessor::KeyType, typename TAccessor::Type > Ocean::Accessor::accessor2map ( const TAccessor &  accessor)
static

Returns all elements of a given accessor as a map with key and elements.

Parameters
accessorThe accessor from which all elements are extracted
Returns
The elements as a map

◆ accessor2subsetElements()

template<typename TAccessor , typename TIndex >
std::vector< typename TAccessor::Type > Ocean::Accessor::accessor2subsetElements ( const TAccessor &  accessor,
const std::vector< TIndex > &  subset 
)
static

Returns a subset of all elements of a given accessor (as a block).

Parameters
accessorThe accessor from which all sub elements are extracted.
subsetThe individual indices of the subset's elements
Returns
Subset elements as a block

◆ isEmpty()

bool Ocean::Accessor::isEmpty ( ) const
inline

Returns whether this accessor provides no elements.

Returns
True, if so

◆ operator=()

Accessor& Ocean::Accessor::operator= ( const Accessor accessor)
protecteddelete

Deleted assign operator.

Parameters
accessorAccessor which would be assigned
Returns
Reference to this object

◆ size()


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