Qore DataProvider Module Reference 3.2.2
Loading...
Searching...
No Matches
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
31namespace DataProvider {
35 string name;
36
39
41 string short_desc;
42
44 string desc;
45
47 string path;
48
50
53
55
57 bool locked = False;
58
60 *list<string> children;
61
64
66 *hash<auto> info;
67};
68
71
72public:
73protected:
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
91
93
95 bool locked = False;
96
98 bool parent = False;
99
102
104 *hash<auto> info;
105
107 static bool neg;
108
110 static Sequence seq(1);
111
112public:
113
115
118
119
121
123 constructor(string path, string name);
124
125
127 string getName();
128
129
132
133
136
137
139 string getDesc();
140
141
143 string getPath();
144
145
147 bool hasType();
148
149
151 bool isParent();
152
153
155
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
210
211
213
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
261
262
264
269
270
272
275
276
278
283
284
286
288 bool checkRemoveChild(string child);
289
290
292
296 bool checkRemoveChildEx(string child);
297
298
300
305
306
309
310
312 bool clear();
313
314
316
319
320
322
328 static setEpheremalIdStart(int n);
329
331private:
333public:
334
335
337
339private:
341public:
342
343};
344};
345
346// Private namespace
347namespace Priv {
348class DataProviderTypeEntryPrivate : public DataProviderTypeEntry {
349
350public:
352 static forceRemoveChild(DataProviderTypeEntry entry, string child);
353};
354};
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
the DataProviderTypeEntry class
Definition DataProviderTypeEntry.qc.dox.h:70
bool setType(AbstractDataProviderType type, bool locked=False)
Sets the type for the entry.
bool isParent()
Returns True if the entry is a "parent" entry, meaning that all children were added with this entry.
bool clear()
Clears the type hierarchy of all non-locked types.
*int epheremal_type_id
Epheremal ID for the type.
Definition DataProviderTypeEntry.qc.dox.h:101
constructor()
Creates the entry as a root node.
bool checkRemoveChild(string child)
Checks if the given child can be removed, if it exists.
string getPath()
Returns the path of the entry.
*AbstractDataProviderType getType()
Returns the type at the entry level, if any.
*hash< auto > info
Free-form information related to the type.
Definition DataProviderTypeEntry.qc.dox.h:104
setTypeChildren()
Sets up attributes as children.
*list< string > listParentTypes()
Returns a list of registered data provider type paths where each type listed is a "parent" type.
constructor(string path, string name)
Creates the entry as a child node.
*AbstractDataProviderType getTypeEx()
Returns the type at the entry level, if any, otherwise throws an exception.
*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
constructor(string path, string name, AbstractDataProviderType type)
Creates the entry as a child node.
*hash< string, DataProviderTypeEntry > type_children
Names of attributes that can be referenced as children.
Definition DataProviderTypeEntry.qc.dox.h:84
string getDesc()
Returns the description of the entry.
bool checkLocked(*bool throw_exception)
Returns the locked status and optionally throws an exception if locked.
static Sequence seq(1)
Sequence for epheremal IDs for types.
*int getEpheremalTypeId()
Returns the epheremal type ID.
bool hasType()
Returns True if the entry has a type.
string path
The path to this entry.
Definition DataProviderTypeEntry.qc.dox.h:75
lockAll()
Locks all types.
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition DataProviderTypeEntry.qc.dox.h:95
static bool neg
If epheremal IDs should be negative.
Definition DataProviderTypeEntry.qc.dox.h:107
hash< DataProviderTypeEntryInfo > getInfo(*bool rec_children_only)
Returns information about this entry.
*DataProviderTypeEntry getChildEx(string child)
Returns the given child, if any, otherwise throws an exception.
string getName()
Returns the name of the entry.
*hash< auto > getFreeFormInfo()
Returns free-form information related to the type, if any.
addChild(string child)
Adds a child node to the entry.
DataProviderTypeEntry removeChild(string child)
Removes the given child, if it exists.
bool isLocked()
Returns the locked status.
*list< string > listTypes()
Returns a list of registered data provider type paths.
bool lock()
Locks the entry, so it can't be removed or changed.
string getDisplayName()
Returns the display name of the entry.
static setEpheremalIdStart(int n)
Sets the start of the sequence for epheremal IDs.
*AbstractDataProviderType type
The type at this location.
Definition DataProviderTypeEntry.qc.dox.h:90
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
bool checkRemoveChildEx(string child)
Checks if the given child can be removed, if it exists.
string name
The name of this entry.
Definition DataProviderTypeEntry.qc.dox.h:78
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
*DataProviderTypeEntry getChild(string child)
Returns the given child, if any.
*hash< string, DataProviderTypeEntry > children
Children of this entry.
Definition DataProviderTypeEntry.qc.dox.h:81
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type, *int id, *hash< auto > info)
Sets or replaces the type for the entry.
string getShortDescription()
Returns the short description of the entry.
*list< string > getChildNames()
Returns a list of child entry names, if any.
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
Private definitions.
Definition AbstractDataProviderType.qc.dox.h:454
Data provider type entry info.
Definition DataProviderTypeEntry.qc.dox.h:33
*int epheremal_type_id
Epheremal ID for types.
Definition DataProviderTypeEntry.qc.dox.h:63
*list< string > children
The names of any children.
Definition DataProviderTypeEntry.qc.dox.h:60
string name
The name of the entry.
Definition DataProviderTypeEntry.qc.dox.h:35
*hash< auto > info
Free-form information related to the type.
Definition DataProviderTypeEntry.qc.dox.h:66
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition DataProviderTypeEntry.qc.dox.h:57
string display_name
The display name for the entry.
Definition DataProviderTypeEntry.qc.dox.h:38
bool has_type
True if the entry has a type
Definition DataProviderTypeEntry.qc.dox.h:52
string desc
The description of the entry.
Definition DataProviderTypeEntry.qc.dox.h:44
string path
The path to the entry including the name as the last element.
Definition DataProviderTypeEntry.qc.dox.h:47
string short_desc
A short description for the entry, plain text formatting.
Definition DataProviderTypeEntry.qc.dox.h:41