MemoryContainerBase< _ContainerT, _DerivedT > Class Template Reference

Provides default implmentations of MemoryContainer, as well as iterators (which requires a template). More...

#include <RobotAPI/libraries/armem/core/base/detail/MemoryContainerBase.h>

+ Inheritance diagram for MemoryContainerBase< _ContainerT, _DerivedT >:

Public Types

using ContainerT = _ContainerT
 
using DerivedT = _DerivedT
 

Public Member Functions

ContainerT::iterator begin ()
 
ContainerT::const_iterator begin () const
 
void clear ()
 
bool empty () const
 
ContainerT::iterator end ()
 
ContainerT::const_iterator end () const
 
template<class ChildFunctionT >
bool forEachChild (ChildFunctionT &&func)
 
template<class ChildFunctionT >
bool forEachChild (ChildFunctionT &&func) const
 
 MemoryContainerBase ()
 
 MemoryContainerBase (const MemoryContainerBase &other)=default
 
 MemoryContainerBase (const MemoryID &id)
 
 MemoryContainerBase (MemoryContainerBase &&other)=default
 
MemoryContainerBaseoperator= (const MemoryContainerBase &other)=default
 
MemoryContainerBaseoperator= (MemoryContainerBase &&other)=default
 
std::size_t size () const
 
- Public Member Functions inherited from MemoryItem
MemoryIDid ()
 
const MemoryIDid () const
 
 MemoryItem ()
 
 MemoryItem (const MemoryID &id)
 
 MemoryItem (const MemoryItem &other)=default
 
 MemoryItem (MemoryItem &&other)=default
 
MemoryItemoperator= (const MemoryItem &other)=default
 
MemoryItemoperator= (MemoryItem &&other)=default
 

Protected Member Functions

template<class ChildT , class KeyT , class ... ChildArgs>
ChildT & _addChild (const KeyT &key, ChildArgs... childArgs)
 
void _checkContainerName (const std::string &gottenName, const std::string &actualName, bool emptyOk=true) const
 
DerivedT_derived ()
 
const DerivedT_derived () const
 
ContainerTcontainer ()
 
const ContainerTcontainer () const
 
- Protected Member Functions inherited from MemoryItem
 ~MemoryItem ()
 

Protected Attributes

ContainerT _container
 
- Protected Attributes inherited from MemoryItem
MemoryID _id
 

Detailed Description

template<class _ContainerT, class _DerivedT>
class armarx::armem::base::detail::MemoryContainerBase< _ContainerT, _DerivedT >

Provides default implmentations of MemoryContainer, as well as iterators (which requires a template).

Definition at line 16 of file MemoryContainerBase.h.

Member Typedef Documentation

◆ ContainerT

using ContainerT = _ContainerT

Definition at line 24 of file MemoryContainerBase.h.

◆ DerivedT

using DerivedT = _DerivedT

Definition at line 23 of file MemoryContainerBase.h.

Constructor & Destructor Documentation

◆ MemoryContainerBase() [1/4]

MemoryContainerBase ( )
inline

Definition at line 29 of file MemoryContainerBase.h.

◆ MemoryContainerBase() [2/4]

MemoryContainerBase ( const MemoryID id)
inlineexplicit

Definition at line 31 of file MemoryContainerBase.h.

◆ MemoryContainerBase() [3/4]

MemoryContainerBase ( const MemoryContainerBase< _ContainerT, _DerivedT > &  other)
default

◆ MemoryContainerBase() [4/4]

MemoryContainerBase ( MemoryContainerBase< _ContainerT, _DerivedT > &&  other)
default

Member Function Documentation

◆ _addChild()

ChildT& _addChild ( const KeyT &  key,
ChildArgs...  childArgs 
)
inlineprotected

Definition at line 136 of file MemoryContainerBase.h.

◆ _checkContainerName()

void _checkContainerName ( const std::string &  gottenName,
const std::string &  actualName,
bool  emptyOk = true 
) const
inlineprotected
Exceptions
<tt>armem::error::ContainerNameMismatch</tt>if gottenName does not match actualName.

Definition at line 124 of file MemoryContainerBase.h.

◆ _derived() [1/2]

DerivedT& _derived ( )
inlineprotected

Definition at line 111 of file MemoryContainerBase.h.

+ Here is the caller graph for this function:

◆ _derived() [2/2]

const DerivedT& _derived ( ) const
inlineprotected

Definition at line 115 of file MemoryContainerBase.h.

◆ begin() [1/2]

ContainerT::iterator begin ( )
inline

Definition at line 84 of file MemoryContainerBase.h.

◆ begin() [2/2]

ContainerT::const_iterator begin ( ) const
inline

Definition at line 79 of file MemoryContainerBase.h.

◆ clear()

void clear ( )
inline

Definition at line 52 of file MemoryContainerBase.h.

+ Here is the caller graph for this function:

◆ container() [1/2]

ContainerT& container ( )
inlineprotected

Definition at line 106 of file MemoryContainerBase.h.

◆ container() [2/2]

const ContainerT& container ( ) const
inlineprotected

Definition at line 102 of file MemoryContainerBase.h.

◆ empty()

bool empty ( ) const
inline

Definition at line 44 of file MemoryContainerBase.h.

+ Here is the caller graph for this function:

◆ end() [1/2]

ContainerT::iterator end ( )
inline

Definition at line 94 of file MemoryContainerBase.h.

◆ end() [2/2]

ContainerT::const_iterator end ( ) const
inline

Definition at line 89 of file MemoryContainerBase.h.

◆ forEachChild() [1/2]

bool forEachChild ( ChildFunctionT &&  func)
inline
Parameters
funcFunction like: bool process(ChildT& provSeg)

Definition at line 64 of file MemoryContainerBase.h.

+ Here is the caller graph for this function:

◆ forEachChild() [2/2]

bool forEachChild ( ChildFunctionT &&  func) const
inline
Parameters
funcFunction like: bool process(const ChildT& provSeg)

Definition at line 72 of file MemoryContainerBase.h.

◆ operator=() [1/2]

MemoryContainerBase& operator= ( const MemoryContainerBase< _ContainerT, _DerivedT > &  other)
default

◆ operator=() [2/2]

MemoryContainerBase& operator= ( MemoryContainerBase< _ContainerT, _DerivedT > &&  other)
default

◆ size()

std::size_t size ( ) const
inline

Definition at line 48 of file MemoryContainerBase.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _container

ContainerT _container
mutableprotected

Definition at line 150 of file MemoryContainerBase.h.


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