31 #if defined(Alias_RECURSES)
32 #error Recursive header files inclusion detected in Alias.h
35 #define Alias_RECURSES
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CountedPtr.h"
46 #include "DGtal/base/CowPtr.h"
181 template <
typename T>
276 inline operator T&()
const
281 return *(
const_cast< T*
>(
static_cast< const T*
>(
myPtr ) ) );
282 default: ASSERT(
false &&
"[Alias::operator T&() const] Invalid cast for given type. Consider passing a left-value reference or a pointer as a parameter." );
283 return *(
const_cast< T*
>(
static_cast< const T*
>(
myPtr ) ) );
298 return const_cast< T*
>(
static_cast< const T*
>(
myPtr ) );
299 default: ASSERT(
false &&
"[T* Alias::operator&() const] Invalid address operator for given type. Consider passing a left-value reference or a pointer as a parameter." );
300 return const_cast< T*
>(
static_cast< const T*
>(
myPtr ) );
323 default: ASSERT(
false &&
"[Alias::operator CountedPtrOrPtr<T>() const] Invalid cast for given type. Consider passing a reference, a pointer or a CountedPtr as a parameter." );
360 #undef Alias_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Alias(const CowPtr< T > &)=delete
Alias(const Alias &other)=default
const Parameter myParam
Characterizes the type of the input parameter at clone instanciation.
Parameter
Internal class that allows to distinguish the different types of parameters.
@ COUNTED_CONST_PTR_OR_CONST_PTR
Alias(const CountedPtrOrPtr< T > &t)
const void *const myPtr
Stores the address of the input parameter for further use.
Alias & operator=(const Alias &other)
Alias(const CountedPtr< T > &t)
Aim: Smart or simple pointer on T. It can be a smart pointer based on reference counts or a simple po...
Aim: Smart pointer based on reference counts.
Aim: Copy on write shared pointer.
DGtal is the top-level namespace which contains all DGtal functions and types.