HeterogenousContinuousContainerMacros.h File Reference
#include <memory>
#include <type_traits>
+ Include dependency graph for HeterogenousContinuousContainerMacros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER
 
#define ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER_BASE(CommonBaseType)
 
#define ARMARX_PLACEMENT_CONSTRUCTION_HELPER
 
#define ARMARX_PLACEMENT_CONSTRUCTION_HELPER_BASE(CommonBaseType)
 

Macro Definition Documentation

◆ ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER

#define ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER
Value:
std::size_t _alignof() const override \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
return alignof(_type); \
} \
std::size_t _sizeof() const override \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
return sizeof(_type); \
} \
_typeBase* _placementCopyConstruct(void* place) const override \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
return new (place) _type(*this); \
} \
void _checkBaseType() \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
"This class has to derive the common base class"); \
}

Definition at line 44 of file HeterogenousContinuousContainerMacros.h.

◆ ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER_BASE

#define ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER_BASE (   CommonBaseType)
Value:
using _typeBase = CommonBaseType; \
virtual std::size_t _alignof() const = 0; \
virtual std::size_t _sizeof() const = 0; \
virtual _typeBase* _placementCopyConstruct(void* place) const = 0; \
std::size_t _accumulateSize(std::size_t offset = 0) const \
{ \
return offset + (_alignof() - (offset % _alignof())) % _alignof() + _sizeof(); \
}

Definition at line 28 of file HeterogenousContinuousContainerMacros.h.

◆ ARMARX_PLACEMENT_CONSTRUCTION_HELPER

#define ARMARX_PLACEMENT_CONSTRUCTION_HELPER
Value:
ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER \
void _copyTo(_typeBase* target) const override \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
_type* const castedTarget = dynamic_cast<_type*>(target); \
ARMARX_CHECK_NOT_NULL(castedTarget); \
*castedTarget = *this; \
} \
std::unique_ptr<_typeBase> _clone() const override \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
return std::unique_ptr<_typeBase>{new _type(*this)}; \
} \
_typeBase* _placementConstruct(void* place) const override \
{ \
using _type = typename std::decay<decltype(*this)>::type; \
return new (place) _type; \
}

Definition at line 67 of file HeterogenousContinuousContainerMacros.h.

◆ ARMARX_PLACEMENT_CONSTRUCTION_HELPER_BASE

#define ARMARX_PLACEMENT_CONSTRUCTION_HELPER_BASE (   CommonBaseType)
Value:
virtual void _copyTo(_typeBase* target) const = 0; \
virtual std::unique_ptr<_typeBase> _clone() const = 0; \
virtual _typeBase* _placementConstruct(void* place) const = 0;

Definition at line 38 of file HeterogenousContinuousContainerMacros.h.

boost::target
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:688
ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER_BASE
#define ARMARX_MINIMAL_PLACEMENT_CONSTRUCTION_HELPER_BASE(CommonBaseType)
Definition: HeterogenousContinuousContainerMacros.h:28
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926