MADARA
3.4.1
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
44
BaseContainer
(
const
std::string
& name =
""
,
45
const
KnowledgeUpdateSettings
& settings =
KnowledgeUpdateSettings
());
46
51
BaseContainer
(
const
BaseContainer
& rhs);
52
56
virtual
~
BaseContainer
();
57
62
std::string
get_name(
void
)
const
;
63
68
KnowledgeUpdateSettings
get_settings(
void
);
69
74
void
set_settings(
const
KnowledgeUpdateSettings
& settings);
75
81
virtual
BaseContainer
*
clone
(
void
)
const
= 0;
82
88
virtual
bool
modify_if_true(
BaseContainer
& conditional);
89
95
virtual
bool
modify_if_false(
BaseContainer
& conditional);
96
97
protected
:
102
virtual
bool
is_true_
(
void
)
const
= 0;
103
108
virtual
bool
is_false_
(
void
)
const
= 0;
109
118
virtual
void
modify_
(
void
) = 0;
119
129
virtual
std::string
get_debug_info_
(
void
) = 0;
130
132
136
mutable
MADARA_LOCK_TYPE
mutex_
;
137
141
ThreadSafeContext
*
context_
;
142
146
std::string
name_
;
147
151
KnowledgeUpdateSettings
settings_
;
152
};
153
}
154
}
155
}
156
157
#include "
BaseContainer.inl
"
158
159
#endif
// _MADARA_CONTAINERS_BASE_CONTAINER_H_
BaseContainer.inl
KnowledgeBase.h
KnowledgeUpdateSettings.h
ThreadSafeContext.h
madara::knowledge::KnowledgeUpdateSettings
Settings for applying knowledge updates.
Definition:
KnowledgeUpdateSettings.h:24
madara::knowledge::ThreadSafeContext
This class stores variables and their values for use by any entity needing state information in a thr...
Definition:
ThreadSafeContext.h:76
madara::knowledge::containers::BaseContainer
This class is an abstract base class for all containers.
Definition:
BaseContainer.h:34
madara::knowledge::containers::BaseContainer::context_
ThreadSafeContext * context_
Variable context that we are modifying.
Definition:
BaseContainer.h:141
madara::knowledge::containers::BaseContainer::settings_
KnowledgeUpdateSettings settings_
Settings for modifications.
Definition:
BaseContainer.h:151
madara::knowledge::containers::BaseContainer::name_
std::string name_
Prefix of variable.
Definition:
BaseContainer.h:146
madara::knowledge::containers::BaseContainer::is_false_
virtual bool is_false_(void) const =0
Polymorphic is false method which can be used to determine if all values in a container are false.
madara::knowledge::containers::BaseContainer::get_debug_info_
virtual std::string get_debug_info_(void)=0
Returns the type of the container along with name and any other useful information.
madara::knowledge::containers::BaseContainer::clone
virtual BaseContainer * clone(void) const =0
Clones this container.
madara::knowledge::containers::BaseContainer::is_true_
virtual bool is_true_(void) const =0
Polymorphic is true method which can be used to determine if all values in a container are true.
madara::knowledge::containers::BaseContainer::mutex_
MADARA_LOCK_TYPE mutex_
guard for access and changes
Definition:
BaseContainer.h:136
madara::knowledge::containers::BaseContainer::modify_
virtual void modify_(void)=0
Polymorphic modify method used by collection containers.
madara::knowledge::containers::Collection
A collection of MADARA containers that can be used for aggregate operations on all containers in the ...
Definition:
Collection.h:44
madara::knowledge::containers
Provides container classes for fast knowledge base access and mutation.
Definition:
Barrier.h:27
madara::knowledge::tags::string
constexpr string_t string
Definition:
KnowledgeRecord.h:56
madara::knowledge
Provides functions and classes for the distributed knowledge base.
Definition:
AggregateFilter.h:33
madara
Copyright(c) 2020 Galois.
Definition:
AggregateFilter.h:31
include
madara
knowledge
containers
BaseContainer.h
Generated on Sat Jan 20 2024 00:40:26 for MADARA by
1.9.1