MADARA  3.2.3
madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init > Class Template Reference

Builder object returned by build() More...

#include <Transaction.h>

Inheritance diagram for madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >:
madara::knowledge::rcw::Transaction::InitHandler< Builder< T, K, Const, RD, WR, Prefix, Init >, Builder< T, K, Const, RD, WR, Prefix, true >, T >

Public Member Functions

void add () const
 Finish configuring this Builder, and add the new mapping. More...
 
init_type init () const
 If used, the mapping will push the current value of the variable into the knowledge base, immediately. More...
 
template<class V >
init_type init (V &&val) const
 As init(), but first set the variable to . More...
 
prefix_type prefix () const
 If used, the name given in build() will be used as a prefix, as apropriate for the variable type. More...
 
ro_type readonly () const
 The mapping will only read from the knowledge base, not write back Synonym for. More...
 
ro_type ro () const
 The mapping will only read from the knowledge base, not write back. More...
 
wo_type wo () const
 The mapping will only write to the knowledge base. More...
 
wo_type writeonly () const
 The mapping will only write to the knowledge base. More...
 

Private Types

typedef Builder< T, K, Const, RD, WR, Prefix, true > init_type
 
typedef Builder< T, K, Const, RD, WR, true, Init > prefix_type
 
typedef Builder< T, K, Const, true, false, Prefix, Init > ro_type
 
typedef std::conditional< Const, const Transaction *, Transaction * >::type trans_type
 
typedef Builder< T, K, Const, false, true, Prefix, Init > wo_type
 

Private Member Functions

 Builder (trans_ref_type trans, K key, T &val)
 
template<bool R, bool W, bool P, bool I>
 Builder (const Builder< T, K, Const, R, W, P, I > &o)
 

Private Attributes

const K key_
 
T *const tracked_
 
const trans_type trans_
 
decltype(*(trans_type) nullptr) typede trans_ref_type )
 

Static Private Attributes

static const bool init_ = Init
 
static const bool prefix_ = Prefix
 
static const bool rd_ = RD
 
static const bool wr_ = WR
 

Friends

class InitHandler< Builder, init_type, T >
 
class Transaction
 

Detailed Description

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
class madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >

Builder object returned by build()

Builder type which will be returned from the build*() methods No need to construct directly; just use those methods.

Definition at line 52 of file Transaction.h.

Member Typedef Documentation

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
typedef Builder<T, K, Const, RD, WR, Prefix, true> madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::init_type
private

Definition at line 143 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
typedef Builder<T, K, Const, RD, WR, true, Init> madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::prefix_type
private

Definition at line 144 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
typedef Builder<T, K, Const, true, false, Prefix, Init> madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::ro_type
private

Definition at line 145 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
typedef std::conditional<Const, const Transaction *, Transaction *>::type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::trans_type
private

Definition at line 126 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
typedef Builder<T, K, Const, false, true, Prefix, Init> madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::wo_type
private

Definition at line 146 of file Transaction.h.

Constructor & Destructor Documentation

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::Builder ( trans_ref_type  trans,
key,
T &  val 
)
inlineprivate

Definition at line 136 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
template<bool R, bool W, bool P, bool I>
madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::Builder ( const Builder< T, K, Const, R, W, P, I > &  o)
inlineprivate

Definition at line 140 of file Transaction.h.

Member Function Documentation

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
void madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::add ( ) const
inline

Finish configuring this Builder, and add the new mapping.

Definition at line 190 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
init_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::init ( ) const
inline

If used, the mapping will push the current value of the variable into the knowledge base, immediately.

Definition at line 151 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
template<class V >
init_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::init ( V &&  val) const
inline

As init(), but first set the variable to .

Parameters
valthe value to set

Definition at line 180 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
prefix_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::prefix ( ) const
inline

If used, the name given in build() will be used as a prefix, as apropriate for the variable type.

Definition at line 159 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
ro_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::readonly ( ) const
inline

The mapping will only read from the knowledge base, not write back Synonym for.

See also
ro

Definition at line 166 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
ro_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::ro ( ) const
inline

The mapping will only read from the knowledge base, not write back.

Definition at line 162 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
wo_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::wo ( ) const
inline

The mapping will only write to the knowledge base.

On pull(), the variable will be reset to its default value.

Definition at line 170 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
wo_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::writeonly ( ) const
inline

The mapping will only write to the knowledge base.

On pull(), the variable will be reset to its default value. Synonym for

See also
wo

Definition at line 175 of file Transaction.h.

Friends And Related Function Documentation

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
friend class InitHandler< Builder, init_type, T >
friend

Definition at line 187 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
friend class Transaction
friend

Definition at line 195 of file Transaction.h.

Member Data Documentation

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
const bool madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::init_ = Init
staticprivate

Definition at line 134 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
const K madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::key_
private

Definition at line 129 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
const bool madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::prefix_ = Prefix
staticprivate

Definition at line 133 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
const bool madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::rd_ = RD
staticprivate

Definition at line 131 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
T* const madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::tracked_
private

Definition at line 130 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
const trans_type madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::trans_
private

Definition at line 128 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
decltype(*(trans_type)nullptr) typede madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::trans_ref_type)
private

Definition at line 127 of file Transaction.h.

template<class T, class K, bool Const, bool RD, bool WR, bool Prefix, bool Init>
const bool madara::knowledge::rcw::Transaction::Builder< T, K, Const, RD, WR, Prefix, Init >::wr_ = WR
staticprivate

Definition at line 132 of file Transaction.h.


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