DART  6.7.3
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData > Class Template Reference

#include <Cloneable.hpp>

Inheritance diagram for dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >:

Public Types

using Data = DataT
 
using Owner = OwnerT
 

Public Member Functions

 ProxyCloneable ()
 Default constructor. Constructs a default version of Data. More...
 
 ProxyCloneable (OwnerT *owner)
 Constructor that ties this instance to an Owner. More...
 
template<typename... Args>
 ProxyCloneable (OwnerT *owner, Args &&... args)
 Constructor that ties this instance to an Owner and then sets its data using the remaining arguments. More...
 
template<typename... Args>
 ProxyCloneable (Args &&... args)
 Templated constructor. More...
 
 ProxyCloneable (const ProxyCloneable &other)
 Copy constructor. More...
 
 ProxyCloneable (ProxyCloneable &&other)
 Move constructor. More...
 
ProxyCloneableoperator= (const Data &data)
 Copy assignment operator that uses a Data instance. More...
 
ProxyCloneableoperator= (Data &&other)
 Move assignment operator that uses a Data instance. More...
 
ProxyCloneableoperator= (const ProxyCloneable &other)
 Copy assignment operator. More...
 
ProxyCloneableoperator= (ProxyCloneable &&other)
 Move assignment operator. More...
 
void set (const Data &data)
 Set the Data of this ProxyCloneable. More...
 
void set (Data &&data)
 Set the Data of this ProxyCloneable. More...
 
void set (const ProxyCloneable &other)
 Set the Data of this ProxyCloneable based on another. More...
 
void set (ProxyCloneable &&other)
 Set the Data of this ProxyCloneable based on another. More...
 
Data get () const
 Get the Data of this ProxyCloneable. More...
 
OwnerT * getOwner ()
 Get the Owner of this ProxyCloneable. More...
 
const OwnerT * getOwner () const
 Get the Owner of this ProxyCloneable. More...
 
std::unique_ptr< Base > clone () const override final
 
void copy (const Base &other) override final
 

Protected Attributes

OwnerT * mOwner
 The ProxyCloneable will not store any data in mData if it has an Owner. More...
 
std::unique_ptr< DatamData
 The ProxyCloneable will hold data in this field if it does not have an owner. More...
 

Member Typedef Documentation

◆ Data

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
using dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::Data = DataT

◆ Owner

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
using dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::Owner = OwnerT

Constructor & Destructor Documentation

◆ ProxyCloneable() [1/6]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::ProxyCloneable

Default constructor. Constructs a default version of Data.

◆ ProxyCloneable() [2/6]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::ProxyCloneable ( OwnerT *  owner)

Constructor that ties this instance to an Owner.

◆ ProxyCloneable() [3/6]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
template<typename... Args>
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::ProxyCloneable ( OwnerT *  owner,
Args &&...  args 
)

Constructor that ties this instance to an Owner and then sets its data using the remaining arguments.

◆ ProxyCloneable() [4/6]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
template<typename... Args>
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::ProxyCloneable ( Args &&...  args)

Templated constructor.

Uses whichever Data constructor is able to match the arguments.

◆ ProxyCloneable() [5/6]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::ProxyCloneable ( const ProxyCloneable< Base, OwnerT, DataT, setData, getData > &  other)

Copy constructor.

◆ ProxyCloneable() [6/6]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::ProxyCloneable ( ProxyCloneable< Base, OwnerT, DataT, setData, getData > &&  other)

Move constructor.

Member Function Documentation

◆ clone()

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
std::unique_ptr< Base > dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::clone
finaloverride

◆ copy()

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
void dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::copy ( const Base &  other)
finaloverride

◆ get()

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
auto dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::get

Get the Data of this ProxyCloneable.

◆ getOwner() [1/2]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
OwnerT * dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::getOwner

Get the Owner of this ProxyCloneable.

◆ getOwner() [2/2]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
const OwnerT * dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::getOwner

Get the Owner of this ProxyCloneable.

◆ operator=() [1/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
auto dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::operator= ( const Data data)

Copy assignment operator that uses a Data instance.

◆ operator=() [2/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
auto dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::operator= ( const ProxyCloneable< Base, OwnerT, DataT, setData, getData > &  other)

Copy assignment operator.

◆ operator=() [3/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
auto dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::operator= ( Data &&  other)

Move assignment operator that uses a Data instance.

◆ operator=() [4/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
auto dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::operator= ( ProxyCloneable< Base, OwnerT, DataT, setData, getData > &&  other)

Move assignment operator.

◆ set() [1/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
void dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::set ( const Data data)

Set the Data of this ProxyCloneable.

◆ set() [2/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
void dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::set ( const ProxyCloneable< Base, OwnerT, DataT, setData, getData > &  other)

Set the Data of this ProxyCloneable based on another.

◆ set() [3/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
void dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::set ( Data &&  data)

Set the Data of this ProxyCloneable.

◆ set() [4/4]

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
void dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::set ( ProxyCloneable< Base, OwnerT, DataT, setData, getData > &&  other)

Set the Data of this ProxyCloneable based on another.

Member Data Documentation

◆ mData

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
std::unique_ptr<Data> dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::mData
protected

The ProxyCloneable will hold data in this field if it does not have an owner.

◆ mOwner

template<class Base , class OwnerT , class DataT , void(*)(OwnerT *, const DataT &) setData, DataT(*)(const OwnerT *) getData>
OwnerT* dart::common::ProxyCloneable< Base, OwnerT, DataT, setData, getData >::mOwner
protected

The ProxyCloneable will not store any data in mData if it has an Owner.