MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
NativeDoubleVectorStaged.h
Go to the documentation of this file.
1
2
#ifndef _MADARA_NATIVE_DOUBLE_VECTOR_STAGED_H_
3
#define _MADARA_NATIVE_DOUBLE_VECTOR_STAGED_H_
4
5
#include <vector>
6
#include <string>
7
#include "madara/LockType.h"
8
#include "
madara/knowledge/KnowledgeBase.h
"
9
#include "
madara/knowledge/ThreadSafeContext.h
"
10
#include "
madara/knowledge/KnowledgeUpdateSettings.h
"
11
#include "
BaseContainer.h
"
12
21
namespace
madara
22
{
23
namespace
knowledge
24
{
25
namespace
containers
26
{
38
class
MADARA_Export
NativeDoubleVectorStaged
:
public
BaseContainer
39
{
40
public
:
42
typedef
double
type
;
43
48
NativeDoubleVectorStaged
(
const
KnowledgeUpdateSettings
& settings =
49
KnowledgeUpdateSettings
());
50
58
NativeDoubleVectorStaged
(
const
std::string
& name,
59
KnowledgeBase
&
knowledge
,
60
int
size = -1,
61
const
KnowledgeUpdateSettings
& settings =
62
KnowledgeUpdateSettings
());
63
71
NativeDoubleVectorStaged
(
const
std::string
& name,
72
Variables
& knowledge,
73
int
size = -1,
74
const
KnowledgeUpdateSettings
& settings =
75
KnowledgeUpdateSettings
());
76
80
NativeDoubleVectorStaged
(
const
NativeDoubleVectorStaged
& rhs);
81
85
virtual
~
NativeDoubleVectorStaged
();
86
91
void
modify (
void
);
92
97
void
operator= (
const
NativeDoubleVectorStaged
& rhs);
98
103
void
operator= (
const
std::vector <type> & rhs);
104
110
void
push_back (type value);
111
116
void
resize (
size_t
size);
117
123
void
exchange (
NativeDoubleVectorStaged
& other);
124
129
void
transfer_to (
NativeDoubleVectorStaged
& other);
130
135
void
copy_to (
KnowledgeVector
& target)
const
;
136
141
size_t
size (
void
)
const
;
142
150
void
set_name (
const
std::string
& var_name,
151
KnowledgeBase
& knowledge,
int
size = -1,
152
bool
sync =
true
);
153
161
void
set_name (
const
std::string
& var_name,
162
Variables
& knowledge,
int
size = -1,
163
bool
sync =
true
);
164
172
void
set_name (
const
std::string
& var_name,
173
ThreadSafeContext
& knowledge,
int
size = -1,
174
bool
sync =
true
);
175
182
type operator[] (
size_t
index)
const
;
183
190
void
set
(
size_t
index,
191
type value);
192
198
void
set
(
199
const
std::vector <type> & value);
200
208
void
set_quality (
size_t
index, uint32_t quality,
209
const
KnowledgeReferenceSettings
& settings =
210
KnowledgeReferenceSettings
(
false
));
211
218
knowledge::KnowledgeRecord
to_record (
size_t
index)
const
;
219
224
knowledge::KnowledgeRecord
to_record (
void
)
const
;
225
235
std::string
get_debug_info (
void
);
236
242
virtual
BaseContainer
* clone (
void
)
const
;
243
248
bool
is_true (
void
)
const
;
249
254
bool
is_false (
void
)
const
;
255
259
void
read (
void
);
260
264
void
write (
void
);
265
266
private
:
267
272
virtual
bool
is_true_ (
void
)
const
;
273
278
virtual
bool
is_false_ (
void
)
const
;
279
288
virtual
void
modify_ (
void
);
289
299
virtual
std::string
get_debug_info_ (
void
);
300
304
ThreadSafeContext
*
context_
;
305
309
VariableReference
vector_
;
310
314
KnowledgeRecord
value_
;
315
319
bool
has_changed_
;
320
};
321
323
typedef
NativeDoubleVectorStaged
NativeDoubleArrayStaged
;
324
}
325
}
326
}
327
328
#include "
NativeDoubleVectorStaged.inl
"
329
330
#endif // _MADARA_NATIVE_DOUBLE_VECTOR_STAGED_H_
madara::knowledge::KnowledgeRecord
This class encapsulates an entry in a KnowledgeBase.
Definition:
KnowledgeRecord.h:60
madara::knowledge::containers::NativeDoubleVectorStaged::has_changed_
bool has_changed_
Tracks if value_ has changed since last read.
Definition:
NativeDoubleVectorStaged.h:319
BaseContainer.h
madara::knowledge::containers::NativeDoubleVectorStaged
This class stores a vector of doubles inside of KaRL.
Definition:
NativeDoubleVectorStaged.h:38
madara::knowledge::containers::NativeDoubleVectorStaged::vector_
VariableReference vector_
Reference to the size field of the vector space.
Definition:
NativeDoubleVectorStaged.h:309
ThreadSafeContext.h
madara::knowledge::ThreadSafeContext
This class stores variables and their values for use by any entity needing state information in a thr...
Definition:
ThreadSafeContext.h:82
madara::knowledge::containers::NativeDoubleVectorStaged::type
double type
trait that describes the value type
Definition:
NativeDoubleVectorStaged.h:42
madara::knowledge::VariableReference
Optimized reference to a variable within the knowledge base.
Definition:
VariableReference.h:35
madara::knowledge::containers
Provides container classes for fast knowledge base access and mutation.
Definition:
Barrier.h:27
madara::knowledge::KnowledgeVector
::std::vector< KnowledgeRecord > KnowledgeVector
Definition:
KnowledgeRecord.h:1458
madara::knowledge::containers::NativeDoubleVectorStaged::value_
KnowledgeRecord value_
The staged value of the vector.
Definition:
NativeDoubleVectorStaged.h:314
madara::knowledge::containers::NativeDoubleVectorStaged::context_
ThreadSafeContext * context_
Variable context that we are modifying.
Definition:
NativeDoubleVectorStaged.h:304
NativeDoubleVectorStaged.inl
madara::knowledge::KnowledgeBase
This class provides a distributed knowledge base to users.
Definition:
KnowledgeBase.h:44
KnowledgeUpdateSettings.h
madara::knowledge::tags::string
static constexpr struct madara::knowledge::tags::string_t string
KnowledgeBase.h
madara::knowledge
Provides functions and classes for the distributed knowledge base.
Definition:
AggregateFilter.h:32
madara::knowledge::containers::NativeDoubleArrayStaged
NativeDoubleVectorStaged NativeDoubleArrayStaged
provide the Array alias for the NativeDoubleVectorStaged class
Definition:
NativeDoubleVectorStaged.h:323
madara::knowledge::KnowledgeUpdateSettings
Settings for applying knowledge updates.
Definition:
KnowledgeUpdateSettings.h:23
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::knowledge::KnowledgeReferenceSettings
Settings for applying knowledge updates.
Definition:
KnowledgeReferenceSettings.h:22
madara::knowledge::Variables
Provides an interface for external functions into the MADARA KaRL variable settings.
Definition:
ExternFunctionVariables.h:51
madara::knowledge::containers::BaseContainer
This class is an abstract base class for all containers.
Definition:
BaseContainer.h:33
include
madara
knowledge
containers
NativeDoubleVectorStaged.h
Generated on Wed May 9 2018 18:17:15 for MADARA by
1.8.11