2 #ifndef _MADARA_CONTAINERS_INTEGER_VECTOR2D_H_
3 #define _MADARA_CONTAINERS_INTEGER_VECTOR2D_H_
7 #include "madara/LockType.h"
66 const Dimensions& dimensions = {0, 0},
bool delete_vars =
true,
80 const Dimensions& dimensions = {0, 0},
bool delete_vars =
true,
87 IntegerVector2D(
const IntegerVector2D& rhs);
92 virtual ~IntegerVector2D();
98 void copy_to(std::vector<std::vector<type> >& target)
const;
111 void modify(
const Indices& index);
117 void operator=(
const IntegerVector2D& rhs);
125 void resize(
const Dimensions& dimensions,
bool delete_vars =
true);
132 Dimensions size(
void)
const;
141 const Dimensions& dimensions = {0, 0});
150 const Dimensions& dimensions = {0, 0});
159 const Dimensions& dimensions = {0, 0});
185 type operator[](
const Indices& index)
const;
193 bool exists(
const Indices& index)
const;
203 int set(
const Indices& index, type value);
211 int set(
const std::vector<std::vector<type> >& value);
222 int set(
const Indices& index, type value,
223 const KnowledgeUpdateSettings& settings);
232 int set(
const std::vector<std::vector<type> >& value,
233 const KnowledgeUpdateSettings& settings);
242 void set_quality(
const Indices& index, uint32_t quality,
243 const KnowledgeReferenceSettings& settings = KnowledgeReferenceSettings(
250 VariableReference get_size_ref(
void);
268 virtual BaseContainer* clone(
void)
const;
274 bool is_true(
void)
const;
280 bool is_false(
void)
const;
287 virtual bool is_true_(
void)
const;
293 virtual bool is_false_(
void)
const;
303 virtual void modify_(
void);
324 std::vector<std::vector<VariableReference> >
vector_;
This class provides a distributed knowledge base to users.
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.
Manages a 2D array of integers as a virtual overlay in the KnowledgeBase.
VariableReference size_
Reference to the size of 2D array.
KnowledgeRecord::Integer type
convenience typedef for element type
ThreadSafeContext * context_
Variable context that we are modifying.
std::vector< std::vector< VariableReference > > vector_
Values of the array.
Indices Dimensions
convenience typedef for size
std::string delimiter_
Delimiter for the prefix to subvars.
Provides container classes for fast knowledge base access and mutation.
Provides functions and classes for the distributed knowledge base.
MADARA_EXPORT bool exists(const char *originator, uint64_t clock, uint32_t update_number, OriginatorFragmentMap &map)
Checks if a fragment already exists within a fragment map.
Copyright(c) 2020 Galois.