MADARA
3.1.8
|
Base type for Trackers. More...
#include <BaseTracker.h>
Public Member Functions | |
virtual | ~BaseTracker () |
Private Member Functions | |
BaseTracker (VariableReference ref) | |
Constructor from a VariableReference. More... | |
virtual void | force_push (KnowledgeBase &kb)=0 |
As push, but ignore any modification status tracking. More... | |
const KnowledgeRecord & | get () const |
Get record points to. No locking, so be careful! More... | |
KnowledgeRecord & | get_mut () |
Get record points to. No locking, so be careful! More... | |
virtual const char * | get_name () const =0 |
Get name of MADARA variable. More... | |
virtual const void * | get_tracked () const =0 |
Get pointer to tracked object. More... | |
void | post_set (KnowledgeBase &kb) |
Call after setting to perform any necessary after-setting logic. More... | |
void | post_set (KnowledgeBase &kb, const VariableReference &ref) |
Call after setting to perform any necessary after-setting logic. More... | |
virtual void | pull ()=0 |
Override to implement pulling logic (from ref_) More... | |
virtual void | push (KnowledgeBase &kb)=0 |
Override to implement pushing logic (into ref_) More... | |
template<typename T > | |
void | set (KnowledgeBase &kb, T &&val) |
Set record points to. No locking, so be careful! More... | |
template<typename I > | |
auto | set_index (KnowledgeBase &kb, size_t idx, I val) -> typename std::enable_if< std::is_integral< I >::value >::type |
Set index in record points to. No locking, so be careful! More... | |
template<typename I > | |
auto | set_index (KnowledgeBase &kb, size_t idx, I val) -> typename std::enable_if< std::is_floating_point< I >::value >::type |
Set index in record points to. No locking, so be careful! More... | |
Static Private Member Functions | |
static const KnowledgeRecord & | get (const VariableReference &ref) |
Get record points to. No locking, so be careful! More... | |
static KnowledgeRecord & | get_mut (const VariableReference &ref) |
Get record points to. No locking, so be careful! More... | |
template<typename T > | |
static void | set (KnowledgeBase &kb, const VariableReference &ref, T &&val) |
Set record points to. No locking, so be careful! More... | |
Private Attributes | |
VariableReference | ref_ |
Reference to tracked variable. More... | |
Friends | |
template<class , class , bool , bool , class > | |
class | PrefixTracker |
template<class , class , bool , bool , class > | |
class | Tracker |
class | Transaction |
Base type for Trackers.
Used internally by Transaction. Not visible for typical users.
Definition at line 62 of file BaseTracker.h.
|
inlinevirtual |
Definition at line 65 of file BaseTracker.h.
|
inlineprivate |
Constructor from a VariableReference.
Definition at line 72 of file BaseTracker.h.
|
privatepure virtual |
As push, but ignore any modification status tracking.
Implemented in madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_indexed_get_value< T >::value &&supports_size< T >::value &&!supports_is_all_dirty< T >::value &&!supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >, madara::knowledge::rcw::PrefixTracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, false, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value >::type >, and madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >.
|
inlineprivate |
Get record points to. No locking, so be careful!
Definition at line 86 of file BaseTracker.h.
|
inlinestaticprivate |
Get record points to. No locking, so be careful!
Definition at line 98 of file BaseTracker.h.
|
inlineprivate |
Get record points to. No locking, so be careful!
Definition at line 92 of file BaseTracker.h.
|
inlinestaticprivate |
Get record points to. No locking, so be careful!
Definition at line 104 of file BaseTracker.h.
|
privatepure virtual |
Get name of MADARA variable.
Implemented in madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_indexed_get_value< T >::value &&supports_size< T >::value &&!supports_is_all_dirty< T >::value &&!supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >, madara::knowledge::rcw::PrefixTracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, false, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value >::type >, and madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >.
|
privatepure virtual |
Get pointer to tracked object.
Implemented in madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_indexed_get_value< T >::value &&supports_size< T >::value &&!supports_is_all_dirty< T >::value &&!supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >, madara::knowledge::rcw::PrefixTracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, false, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value >::type >, and madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >.
|
inlineprivate |
Call after setting to perform any necessary after-setting logic.
Definition at line 140 of file BaseTracker.h.
|
inlineprivate |
Call after setting to perform any necessary after-setting logic.
Definition at line 146 of file BaseTracker.h.
|
privatepure virtual |
Override to implement pulling logic (from ref_)
Implemented in madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_indexed_get_value< T >::value &&supports_size< T >::value &&!supports_is_all_dirty< T >::value &&!supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, false, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value >::type >, madara::knowledge::rcw::PrefixTracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, and madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >.
|
privatepure virtual |
Override to implement pushing logic (into ref_)
Implemented in madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, RD, WR, typename std::enable_if< supports_indexed_get_value< T >::value &&supports_size< T >::value &&!supports_is_all_dirty< T >::value &&!supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_is_dirty< T >::value &&!supports_indexed_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, false, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >, madara::knowledge::rcw::Tracker< T, VariableReference, true, false, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value >::type >, madara::knowledge::rcw::PrefixTracker< T, VariableReference, RD, WR, typename std::enable_if< supports_get_value< T >::value &&supports_indexed_get_value< T >::value &&supports_size< T >::value &&supports_is_dirty< T >::value &&supports_is_all_dirty< T >::value &&supports_is_size_dirty< T >::value &&supports_indexed_is_dirty< T >::value >::type >, and madara::knowledge::rcw::Tracker< T, VariableReference, true, true, typename std::enable_if< supports_get_value< T >::value &&supports_knowledge_cast< T >::value &&supports_self_eq< T >::value &&!supports_is_dirty< T >::value >::type >.
|
inlineprivate |
Set record points to. No locking, so be careful!
Definition at line 111 of file BaseTracker.h.
|
inlinestaticprivate |
Set record points to. No locking, so be careful!
Definition at line 118 of file BaseTracker.h.
|
inlineprivate |
Set index in record points to. No locking, so be careful!
Definition at line 125 of file BaseTracker.h.
|
inlineprivate |
Set index in record points to. No locking, so be careful!
Definition at line 133 of file BaseTracker.h.
|
friend |
Definition at line 157 of file BaseTracker.h.
|
friend |
Definition at line 154 of file BaseTracker.h.
|
friend |
Definition at line 151 of file BaseTracker.h.
|
private |
Reference to tracked variable.
Definition at line 69 of file BaseTracker.h.