2 #ifndef _MADARA_CONTAINERS_LEGACY_BARRIER_H_
3 #define _MADARA_CONTAINERS_LEGACY_BARRIER_H_
7 #include "madara/LockType.h"
104 size_t get_id(
void)
const;
110 size_t get_participants(
void)
const;
125 void set(
type value);
155 int id,
int participants);
192 double to_double(
void)
const;
226 void set_quality(uint32_t quality,
235 void resize(
size_t id = 0,
size_t participants = 1);
259 bool is_true(
void)
const;
265 bool is_false(
void)
const;
272 virtual bool is_true_(
void)
const;
278 virtual bool is_false_(
void)
const;
288 virtual void modify_(
void);
304 void build_aggregate_barrier(
void);
312 #ifndef _MADARA_NO_KARL_
313 return context_->evaluate(aggregate_barrier_, no_harm).to_integer();
323 void build_var(
void);
328 void init_noharm(
void);
350 #ifndef _MADARA_NO_KARL_
const ThreadSafeContext * context_
Compiled, optimized KaRL logic.
This class provides a distributed knowledge base to users.
This class encapsulates an entry in a KnowledgeBase.
Settings for applying knowledge updates.
Settings for applying knowledge updates.
This class stores variables and their values for use by any entity needing state information in a thr...
Optimized reference to a variable within the knowledge base.
Provides an interface for external functions into the MADARA KaRL variable settings.
This class is an abstract base class for all containers.
This class stores an integer within a variable context.
ThreadSafeContext * context_
Variable context that we are modifying.
type barrier_result(void) const
Checks if current barrier is successful.
VariableReference variable_
Variable reference.
size_t id_
id of this barrier in the barrier ring
size_t participants_
the number of participants in the barrier ring
std::string variable_name_
Holder for variable name to quickly refresh modified status.
knowledge::KnowledgeRecord::Integer type
trait that describes the value type
type get_round(void) const
Returns the current barrier round.
bool operator==(const LegacyBarrier &value) const
Checks for equality.
CompiledExpression aggregate_barrier_
Expression for aggregating barrier in one atomic operation.
bool operator!=(const LegacyBarrier &value) const
Checks for inequality.
EvalSettings no_harm
Settings we'll use for all evaluations.
Provides container classes for fast knowledge base access and mutation.
Provides functions and classes for the distributed knowledge base.
Copyright(c) 2020 Galois.
Encapsulates settings for an evaluation statement.