MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
NativeIntegerVector.h
Go to the documentation of this file.
1
2
#ifndef _MADARA_NATIVE_INTEGER_VECTOR_H_
3
#define _MADARA_NATIVE_INTEGER_VECTOR_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
{
31
class
MADARA_Export
NativeIntegerVector
:
public
BaseContainer
32
{
33
public
:
35
typedef
knowledge::KnowledgeRecord::Integer
type
;
36
41
NativeIntegerVector
(
const
KnowledgeUpdateSettings
& settings =
42
KnowledgeUpdateSettings
());
43
51
NativeIntegerVector
(
const
std::string
& name,
52
KnowledgeBase
&
knowledge
,
53
int
size = -1,
54
const
KnowledgeUpdateSettings
& settings =
55
KnowledgeUpdateSettings
());
56
64
NativeIntegerVector
(
const
std::string
& name,
65
Variables
& knowledge,
66
int
size = -1,
67
const
KnowledgeUpdateSettings
& settings =
68
KnowledgeUpdateSettings
());
69
73
NativeIntegerVector
(
const
NativeIntegerVector
& rhs);
74
78
virtual
~
NativeIntegerVector
();
79
84
void
modify (
void
);
85
90
void
operator= (
const
NativeIntegerVector
& rhs);
91
97
void
push_back (type value);
98
103
void
resize (
size_t
size);
104
110
void
exchange (
NativeIntegerVector
& other);
111
116
void
transfer_to (
NativeIntegerVector
& other);
117
122
void
copy_to (
KnowledgeVector
& target)
const
;
123
128
size_t
size (
void
)
const
;
129
136
void
set_name (
const
std::string
& var_name,
137
KnowledgeBase
& knowledge,
int
size = -1);
138
145
void
set_name (
const
std::string
& var_name,
146
Variables
& knowledge,
int
size = -1);
147
154
void
set_name (
const
std::string
& var_name,
155
ThreadSafeContext
& knowledge,
int
size = -1);
156
163
type operator[] (
size_t
index)
const
;
164
173
int
set
(
size_t
index,
174
type value);
175
185
int
set
(
size_t
index,
186
type value,
187
const
KnowledgeUpdateSettings
& settings);
188
196
int
set
(
197
const
std::vector <type> & value);
198
207
int
set
(
208
const
std::vector <type> & value,
209
const
KnowledgeUpdateSettings
& settings);
210
218
void
set_quality (
size_t
index, uint32_t quality,
219
const
KnowledgeReferenceSettings
& settings =
220
KnowledgeReferenceSettings
(
false
));
221
228
knowledge::KnowledgeRecord
to_record (
size_t
index)
const
;
229
234
knowledge::KnowledgeRecord
to_record (
void
)
const
;
235
245
std::string
get_debug_info (
void
);
246
252
virtual
BaseContainer
* clone (
void
)
const
;
253
258
bool
is_true (
void
)
const
;
259
264
bool
is_false (
void
)
const
;
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
};
311
313
typedef
NativeIntegerVector
NativeIntegerArray
;
314
}
315
}
316
}
317
318
#endif // _MADARA_NATIVE_INTEGER_VECTOR_H_
madara::knowledge::KnowledgeRecord
This class encapsulates an entry in a KnowledgeBase.
Definition:
KnowledgeRecord.h:60
madara::knowledge::containers::NativeIntegerVector::type
knowledge::KnowledgeRecord::Integer type
trait that describes the value type
Definition:
NativeIntegerVector.h:35
madara::knowledge::containers::NativeIntegerVector
This class stores a vector of doubles inside of KaRL.
Definition:
NativeIntegerVector.h:31
BaseContainer.h
madara::knowledge::containers::NativeIntegerVector::context_
ThreadSafeContext * context_
Variable context that we are modifying.
Definition:
NativeIntegerVector.h:304
madara::knowledge::containers::NativeIntegerArray
NativeIntegerVector NativeIntegerArray
provide the Array alias for the NativeIntegerVector class
Definition:
NativeIntegerVector.h:313
madara::knowledge::KnowledgeRecord::Integer
int64_t Integer
Definition:
KnowledgeRecord.h:103
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::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::KnowledgeBase
This class provides a distributed knowledge base to users.
Definition:
KnowledgeBase.h:44
KnowledgeUpdateSettings.h
madara::knowledge::containers::NativeIntegerVector::vector_
VariableReference vector_
Reference to the size field of the vector space.
Definition:
NativeIntegerVector.h:309
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::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
NativeIntegerVector.h
Generated on Wed May 9 2018 18:17:15 for MADARA by
1.8.11