| Qore DataProvider Module Reference 3.2.2

Loading...
Searching...
No Matches
DataProviderTypeEntry.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
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 display_name;
39
41 string short_desc;
42
44 string desc;
45
47 string path;
48
50
52 bool has_type;
53
55
57 bool locked = False;
58
60 *list<string> children;
61
63 *int epheremal_type_id;
64
66 *hash<auto> info;
67};
68
70 class DataProviderTypeEntry : public Qore::Serializable {
71
72 public:
73 protected:
75 string path;
76
78 string name;
79
81 *hash<string, DataProviderTypeEntry> children;
82
84 *hash<string, DataProviderTypeEntry> type_children;
85
87 *hash<string, DataProviderTypeEntry> rec_children;
88
90 *AbstractDataProviderType type;
91
93
95 bool locked = False;
96
98 bool parent = False;
99
101 *int epheremal_type_id;
102
104 *hash<auto> info;
105
107 static bool neg;
108
110 static Sequence seq(1);
111
112 public:
113
115
117 constructor();
118
119
121
123 constructor(string path, string name);
124
125
127 string getName();
128
129
131 string getDisplayName();
132
133
135 string getShortDescription();
136
137
139 string getDesc();
140
141
143 string getPath();
144
145
147 bool hasType();
148
149
151 bool isParent();
152
153
155
157 *int getEpheremalTypeId();
158
159
161
165 *hash<auto> getFreeFormInfo();
166
167
169
171 bool isLocked();
172
173
175
179 bool checkLocked(*bool throw_exception);
180
181
182
184
190 bool lock();
191
192
194
198 addChild(string child);
199
200
202
209 bool setType(AbstractDataProviderType type, bool locked = False);
210
211
213
221 *AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type, *int id, *hash<auto> info);
222
223
225
231 hash<DataProviderTypeEntryInfo> getInfo(*bool rec_children_only);
232
233
235
239 *list<string> listTypes();
240
241
243
248 *list<string> listParentTypes();
249
250
252
254 *list<string> getChildNames();
255
256
258
260 *AbstractDataProviderType getType();
261
262
264
268 *AbstractDataProviderType getTypeEx();
269
270
272
274 *DataProviderTypeEntry getChild(string child);
275
276
278
282 *DataProviderTypeEntry getChildEx(string child);
283
284
286
288 bool checkRemoveChild(string child);
289
290
292
296 bool checkRemoveChildEx(string child);
297
298
300
304 DataProviderTypeEntry removeChild(string child);
305
306
308 lockAll();
309
310
312 bool clear();
313
314
316
318 DataProviderTypeEntry getCreateChild(string child);
319
320
322
328 static setEpheremalIdStart(int n);
329
331 private:
332 setTypeChildren();
333 public:
334
335
337
339 private:
340 constructor(string path, string name, AbstractDataProviderType type);
341 public:
342
343};
344};
345
346// Private namespace
347 namespace Priv {
348 class DataProviderTypeEntryPrivate : public DataProviderTypeEntry {
349
350 public:
352 static forceRemoveChild(DataProviderTypeEntry entry, string child);
353};
354};
DataProvider::AbstractDataProviderType
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition DataProviderTypeEntry.qc.dox.h:70
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::epheremal_type_id
*int epheremal_type_id
Epheremal ID for the type.
Definition DataProviderTypeEntry.qc.dox.h:101
DataProvider::DataProviderTypeEntry::constructor
constructor()
Creates the entry as a root node.
DataProvider::DataProviderTypeEntry::checkRemoveChild
bool checkRemoveChild(string child)
Checks if the given child can be removed, if it exists.
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::info
*hash< auto > info
Free-form information related to the type.
Definition DataProviderTypeEntry.qc.dox.h:104
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:87
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:84
DataProvider::DataProviderTypeEntry::getDesc
string getDesc()
Returns the description of the entry.
DataProvider::DataProviderTypeEntry::checkLocked
bool checkLocked(*bool throw_exception)
Returns the locked status and optionally throws an exception if locked.
DataProvider::DataProviderTypeEntry::seq
static Sequence seq(1)
Sequence for epheremal IDs for types.
DataProvider::DataProviderTypeEntry::getEpheremalTypeId
*int getEpheremalTypeId()
Returns the epheremal type ID.
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:75
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:95
DataProvider::DataProviderTypeEntry::neg
static bool neg
If epheremal IDs should be negative.
Definition DataProviderTypeEntry.qc.dox.h:107
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::getFreeFormInfo
*hash< auto > getFreeFormInfo()
Returns free-form information related to the type, if any.
DataProvider::DataProviderTypeEntry::addChild
addChild(string child)
Adds a child node to the entry.
DataProvider::DataProviderTypeEntry::removeChild
DataProviderTypeEntry removeChild(string child)
Removes the given child, if it exists.
DataProvider::DataProviderTypeEntry::isLocked
bool isLocked()
Returns the locked status.
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::getDisplayName
string getDisplayName()
Returns the display name of the entry.
DataProvider::DataProviderTypeEntry::setEpheremalIdStart
static setEpheremalIdStart(int n)
Sets the start of the sequence for epheremal IDs.
DataProvider::DataProviderTypeEntry::type
*AbstractDataProviderType type
The type at this location.
Definition DataProviderTypeEntry.qc.dox.h:90
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:98
DataProvider::DataProviderTypeEntry::checkRemoveChildEx
bool checkRemoveChildEx(string child)
Checks if the given child can be removed, if it exists.
DataProvider::DataProviderTypeEntry::name
string name
The name of this entry.
Definition DataProviderTypeEntry.qc.dox.h:78
DataProvider::DataProviderTypeEntry::getCreateChild
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
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:81
DataProvider::DataProviderTypeEntry::setOrReplaceType
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type, *int id, *hash< auto > info)
Sets or replaces the type for the entry.
DataProvider::DataProviderTypeEntry::getShortDescription
string getShortDescription()
Returns the short description of the entry.
DataProvider::DataProviderTypeEntry::getChildNames
*list< string > getChildNames()
Returns a list of child entry names, if any.
Qore::Serializable
DataProvider
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
Priv
Private definitions.
Definition AbstractDataProviderType.qc.dox.h:454
DataProvider::DataProviderTypeEntryInfo
Data provider type entry info.
Definition DataProviderTypeEntry.qc.dox.h:33
DataProvider::DataProviderTypeEntryInfo::epheremal_type_id
*int epheremal_type_id
Epheremal ID for types.
Definition DataProviderTypeEntry.qc.dox.h:63
DataProvider::DataProviderTypeEntryInfo::children
*list< string > children
The names of any children.
Definition DataProviderTypeEntry.qc.dox.h:60
DataProvider::DataProviderTypeEntryInfo::name
string name
The name of the entry.
Definition DataProviderTypeEntry.qc.dox.h:35
DataProvider::DataProviderTypeEntryInfo::info
*hash< auto > info
Free-form information related to the type.
Definition DataProviderTypeEntry.qc.dox.h:66
DataProvider::DataProviderTypeEntryInfo::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition DataProviderTypeEntry.qc.dox.h:57
DataProvider::DataProviderTypeEntryInfo::display_name
string display_name
The display name for the entry.
Definition DataProviderTypeEntry.qc.dox.h:38
DataProvider::DataProviderTypeEntryInfo::has_type
bool has_type
True if the entry has a type
Definition DataProviderTypeEntry.qc.dox.h:52
DataProvider::DataProviderTypeEntryInfo::desc
string desc
The description of the entry.
Definition DataProviderTypeEntry.qc.dox.h:44
DataProvider::DataProviderTypeEntryInfo::path
string path
The path to the entry including the name as the last element.
Definition DataProviderTypeEntry.qc.dox.h:47
DataProvider::DataProviderTypeEntryInfo::short_desc
string short_desc
A short description for the entry, plain text formatting.
Definition DataProviderTypeEntry.qc.dox.h:41