MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
BaseContainer.h
Go to the documentation of this file.
1
2
#ifndef _MADARA_CONTAINERS_BASE_CONTAINER_H_
3
#define _MADARA_CONTAINERS_BASE_CONTAINER_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
20
namespace
madara
21
{
22
namespace
knowledge
23
{
24
namespace
containers
25
{
27
class
Collection;
28
33
class
MADARA_Export
BaseContainer
34
{
35
public
:
37
friend
class
Collection
;
38
39
45
BaseContainer
(
const
std::string
& name =
""
,
46
const
KnowledgeUpdateSettings
& settings =
47
KnowledgeUpdateSettings
());
48
53
BaseContainer
(
const
BaseContainer
& rhs);
54
58
virtual
~
BaseContainer
();
59
64
std::string
get_name (
void
)
const
;
65
70
KnowledgeUpdateSettings
get_settings (
void
);
71
76
void
set_settings (
77
const
KnowledgeUpdateSettings
& settings);
78
84
virtual
BaseContainer
* clone (
void
)
const
= 0;
85
91
virtual
bool
modify_if_true (
BaseContainer
& conditional);
92
98
virtual
bool
modify_if_false (
BaseContainer
& conditional);
99
100
protected
:
101
106
virtual
bool
is_true_ (
void
)
const
= 0;
107
112
virtual
bool
is_false_ (
void
)
const
= 0;
113
122
virtual
void
modify_ (
void
) = 0;
123
133
virtual
std::string
get_debug_info_ (
void
) = 0;
134
136
137
141
mutable
MADARA_LOCK_TYPE
mutex_
;
142
146
ThreadSafeContext
*
context_
;
147
151
std::string
name_
;
152
156
KnowledgeUpdateSettings
settings_
;
157
};
158
}
159
}
160
}
161
162
#include "
BaseContainer.inl
"
163
164
165
#endif // _MADARA_CONTAINERS_BASE_CONTAINER_H_
madara::knowledge::containers::BaseContainer::name_
std::string name_
Prefix of variable.
Definition:
BaseContainer.h:151
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::Collection
A collection of MADARA containers that can be used for aggregate operations on all containers in the ...
Definition:
Collection.h:43
madara::knowledge::containers::BaseContainer::mutex_
MADARA_LOCK_TYPE mutex_
guard for access and changes
Definition:
BaseContainer.h:141
madara::knowledge::containers
Provides container classes for fast knowledge base access and mutation.
Definition:
Barrier.h:27
KnowledgeUpdateSettings.h
madara::knowledge::tags::string
static constexpr struct madara::knowledge::tags::string_t string
BaseContainer.inl
KnowledgeBase.h
madara::knowledge
Provides functions and classes for the distributed knowledge base.
Definition:
AggregateFilter.h:32
madara::knowledge::containers::BaseContainer::settings_
KnowledgeUpdateSettings settings_
Settings for modifications.
Definition:
BaseContainer.h:156
madara::knowledge::KnowledgeUpdateSettings
Settings for applying knowledge updates.
Definition:
KnowledgeUpdateSettings.h:23
madara::knowledge::containers::BaseContainer::context_
ThreadSafeContext * context_
Variable context that we are modifying.
Definition:
BaseContainer.h:146
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::knowledge::containers::BaseContainer
This class is an abstract base class for all containers.
Definition:
BaseContainer.h:33
include
madara
knowledge
containers
BaseContainer.h
Generated on Wed May 9 2018 18:17:14 for MADARA by
1.8.11