$darkmode

| Qore DataProvider Module Reference 2.7.1

DataProviderTypeEntry.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
25// assume local scope for variables, do not use "$" signs
26// require type definitions everywhere
27// strict argument handling
28// enable all warnings
29
31 namespace DataProvider {
33 public struct DataProviderTypeEntryInfo {
35 string name;
36
38 string desc;
39
41 string path;
42
44
46 bool has_type;
47
49
51 bool locked = False;
52
54 *list<string> children;
55};
56
58 class DataProviderTypeEntry : public Qore::Serializable {
59
60 public:
61 protected:
63 string path;
64
66 string name;
67
69 *hash<string, DataProviderTypeEntry> children;
70
72 *hash<string, DataProviderTypeEntry> type_children;
73
75 *hash<string, DataProviderTypeEntry> rec_children;
76
78 *AbstractDataProviderType type;
79
81
83 bool locked = False;
84
86 bool parent = False;
87
88 public:
89
91
93 constructor();
94
95
97
99 constructor(string path, string name);
100
101
103 string getName();
104
105
107 string getDesc();
108
109
111 string getPath();
112
113
115 bool hasType();
116
117
119 bool isParent();
120
121
123
129 bool lock();
130
131
133
137 addChild(string child);
138
139
141
148 bool setType(AbstractDataProviderType type, bool locked = False);
149
150
152
158 *AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type);
159
160
162
166 hash<DataProviderTypeEntryInfo> getInfo(*bool rec_children_only);
167
168
170
174 *list<string> listTypes();
175
176
178
183 *list<string> listParentTypes();
184
185
187
189 *list<string> getChildNames();
190
191
193
195 *AbstractDataProviderType getType();
196
197
199
203 *AbstractDataProviderType getTypeEx();
204
205
207
209 *DataProviderTypeEntry getChild(string child);
210
211
213
217 *DataProviderTypeEntry getChildEx(string child);
218
219
221
223 removeChild(string child);
224
225
227 lockAll();
228
229
231 bool clear();
232
233
235
237 DataProviderTypeEntry getCreateChild(string child);
238
239
241 private:
242 setTypeChildren();
243 public:
244
245
247
249 private:
250 constructor(string path, string name, AbstractDataProviderType type);
251 public:
252
253};
254};
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:187
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:58
DataProvider::DataProviderTypeEntry::setType
bool setType(AbstractDataProviderType type, bool locked=False)
Sets the type for the entry.
DataProvider::DataProviderTypeEntry::isParent
bool isParent()
Returns True if the entry is a "parent" entry, meaning that all children were added with this entry.
DataProvider::DataProviderTypeEntry::clear
bool clear()
Clears the type hierarchy of all non-locked types.
DataProvider::DataProviderTypeEntry::constructor
constructor()
Creates the entry as a root node.
DataProvider::DataProviderTypeEntry::getPath
string getPath()
Returns the path of the entry.
DataProvider::DataProviderTypeEntry::getType
*AbstractDataProviderType getType()
Returns the type at the entry level, if any.
DataProvider::DataProviderTypeEntry::setTypeChildren
setTypeChildren()
Sets up attributes as children.
DataProvider::DataProviderTypeEntry::listParentTypes
*list< string > listParentTypes()
Returns a list of registered data provider type paths where each type listed is a "parent" type.
DataProvider::DataProviderTypeEntry::constructor
constructor(string path, string name)
Creates the entry as a child node.
DataProvider::DataProviderTypeEntry::getTypeEx
*AbstractDataProviderType getTypeEx()
Returns the type at the entry level, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::rec_children
*hash< string, DataProviderTypeEntry > rec_children
Names of attributes that can be referenced as children that have their own fields.
Definition: DataProviderTypeEntry.qc.dox.h:75
DataProvider::DataProviderTypeEntry::constructor
constructor(string path, string name, AbstractDataProviderType type)
Creates the entry as a child node.
DataProvider::DataProviderTypeEntry::type_children
*hash< string, DataProviderTypeEntry > type_children
Names of attributes that can be referenced as children.
Definition: DataProviderTypeEntry.qc.dox.h:72
DataProvider::DataProviderTypeEntry::getDesc
string getDesc()
Returns the description of the entry.
DataProvider::DataProviderTypeEntry::hasType
bool hasType()
Returns True if the entry has a type.
DataProvider::DataProviderTypeEntry::path
string path
The path to this entry.
Definition: DataProviderTypeEntry.qc.dox.h:63
DataProvider::DataProviderTypeEntry::lockAll
lockAll()
Locks all types.
DataProvider::DataProviderTypeEntry::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:83
DataProvider::DataProviderTypeEntry::getInfo
hash< DataProviderTypeEntryInfo > getInfo(*bool rec_children_only)
Returns information about this entry.
DataProvider::DataProviderTypeEntry::getChildEx
*DataProviderTypeEntry getChildEx(string child)
Returns the given child, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::getName
string getName()
Returns the name of the entry.
DataProvider::DataProviderTypeEntry::addChild
addChild(string child)
Adds a child node to the entry.
DataProvider::DataProviderTypeEntry::removeChild
removeChild(string child)
Removes the given child, if it exists.
DataProvider::DataProviderTypeEntry::listTypes
*list< string > listTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeEntry::lock
bool lock()
Locks the entry, so it can't be removed or changed.
DataProvider::DataProviderTypeEntry::type
*AbstractDataProviderType type
The type at this location.
Definition: DataProviderTypeEntry.qc.dox.h:78
DataProvider::DataProviderTypeEntry::parent
bool parent
True if this entry is a "parent" type; if the children were added atomically with this entry
Definition: DataProviderTypeEntry.qc.dox.h:86
DataProvider::DataProviderTypeEntry::name
string name
The name of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:66
DataProvider::DataProviderTypeEntry::getCreateChild
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
DataProvider::DataProviderTypeEntry::setOrReplaceType
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type)
Sets or replaces the type for the entry.
DataProvider::DataProviderTypeEntry::getChild
*DataProviderTypeEntry getChild(string child)
Returns the given child, if any.
DataProvider::DataProviderTypeEntry::children
*hash< string, DataProviderTypeEntry > children
Children of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:69
DataProvider::DataProviderTypeEntry::getChildNames
*list< string > getChildNames()
Returns a list of child entry names, if any.
Qore::Serializable
False
const False
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::DataProviderTypeEntryInfo
Data provider type entry info.
Definition: DataProviderTypeEntry.qc.dox.h:33
DataProvider::DataProviderTypeEntryInfo::children
*list< string > children
The names of any children.
Definition: DataProviderTypeEntry.qc.dox.h:54
DataProvider::DataProviderTypeEntryInfo::name
string name
The name of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:35
DataProvider::DataProviderTypeEntryInfo::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:51
DataProvider::DataProviderTypeEntryInfo::has_type
bool has_type
True if the entry has a type
Definition: DataProviderTypeEntry.qc.dox.h:46
DataProvider::DataProviderTypeEntryInfo::desc
string desc
The description of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:38
DataProvider::DataProviderTypeEntryInfo::path
string path
The path to the entry including the name as the last element.
Definition: DataProviderTypeEntry.qc.dox.h:41