2 #ifndef _MADARA_CONTAINERS_VECTOR_H_
3 #define _MADARA_CONTAINERS_VECTOR_H_
8 #include "madara/LockType.h"
47 friend class CircularBufferT;
49 friend class CircularBufferConsumerT;
70 bool delete_vars =
true,
85 bool delete_vars =
true,
110 void modify(
size_t index);
115 void modify_size(
void);
121 void operator=(
const Vector& rhs);
136 void resize(
int size = -1,
bool delete_vars =
true);
147 Vector& other,
bool refresh_keys =
true,
bool delete_keys =
true);
153 void transfer_to(
Vector& other);
160 size_t size(
void)
const;
237 bool exists(
size_t index)
const;
262 int set_file(
size_t index,
const unsigned char* value,
size_t size);
272 int set_file(
size_t index,
const unsigned char* value,
size_t size,
282 int set_jpeg(
size_t index,
const unsigned char* value,
size_t size);
292 int set_jpeg(
size_t index,
const unsigned char* value,
size_t size,
327 int set_index(
size_t index,
size_t sub_index,
340 int set_index(
size_t index,
size_t sub_index,
353 int set(
size_t index,
366 int set(
size_t index,
378 int set(
size_t index,
const std::vector<KnowledgeRecord::Integer>& value);
389 int set(
size_t index,
const std::vector<KnowledgeRecord::Integer>& value,
400 int set(
size_t index,
double value);
422 int set_index(
size_t index,
size_t sub_index,
double value);
434 int set_index(
size_t index,
size_t sub_index,
double value,
446 int set(
size_t index,
const double* value, uint32_t size);
458 int set(
size_t index,
const double* value, uint32_t size,
469 int set(
size_t index,
const std::vector<double>& value);
480 int set(
size_t index,
const std::vector<double>& value,
534 void set_quality(
size_t index, uint32_t quality,
566 bool is_true(
void)
const;
572 bool is_false(
void)
const;
579 virtual bool is_true_(
void)
const;
585 virtual bool is_false_(
void)
const;
595 virtual void modify_(
void);
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 container stores a thread-safe, personalized consumer for CircularBuffer instances.
This container stores a thread-safe circular buffer with O(1) access times.
This class stores thread-safe queue within the knowledge base.
This class stores a vector of KaRL variables.
VariableReference size_
Reference to the size field of the vector space.
std::vector< VariableReference > vector_
Values of the array.
std::string delimiter_
Delimiter for the prefix to subvars.
ThreadSafeContext * context_
Variable context that we are modifying.
Provides container classes for fast knowledge base access and mutation.
Vector Array
provide the Array alias for the Vector class
Provides functions and classes for the distributed knowledge base.
::std::vector< KnowledgeRecord > KnowledgeVector
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.
int read_file(const std::string &filename, void *&buffer, size_t &size, bool add_zero_char)
Reads a file into a provided void pointer.
Copyright(c) 2020 Galois.