|
Ocean
|
This class implements a base class for all accessors allowing to access temporary elements. More...
#include <Accessor.h>
Public Types | |
| using | Type = T |
| Definition of the element type of this accessor. | |
Public Member Functions | |
| virtual T | operator[] (const TKey &key) const =0 |
| Returns one element of this accessor object by a given index. | |
| virtual bool | canAccess (const TKey &key) const =0 |
| Returns whether this accessor has a specific element. | |
Public Member Functions inherited from Ocean::Accessor | |
| virtual | ~Accessor ()=default |
| Default destructor. | |
| virtual size_t | size () const =0 |
| Returns the number of accessible elements of this accessor object. | |
| bool | isEmpty () const |
| Returns whether this accessor provides no elements. | |
Protected Member Functions | |
| TemporaryAccessor ()=default | |
| Creates a new indexed-based accessor object. | |
Protected Member Functions inherited from Ocean::Accessor | |
| Accessor ()=default | |
| Protected default constructor. | |
| Accessor (const Accessor &accessor)=default | |
| Protected copy constructor. | |
| Accessor & | operator= (const Accessor &accessor)=delete |
| Deleted assign operator. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Accessor | |
| template<typename TAccessor > | |
| static std::vector< typename TAccessor::Type > | accessor2elements (const TAccessor &accessor) |
| Returns all elements of a given accessor (as a block). | |
| 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. | |
| 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). | |
This class implements a base class for all accessors allowing to access temporary elements.
| T | The data type of the elements of the accessor |
| TKey | The data type of the keys of the accessor |
| using Ocean::TemporaryAccessor< T, TKey >::Type = T |
Definition of the element type of this accessor.
|
protecteddefault |
Creates a new indexed-based accessor object.
|
pure virtual |
Returns whether this accessor has a specific element.
| key | The key of the element to be checked |
Implemented in Ocean::TemporaryIndexedAccessor< T >.
|
pure virtual |
Returns one element of this accessor object by a given index.
| key | The key of element to be accessed, must be valid |
Implemented in Ocean::TemporaryIndexedAccessor< T >.