Qore DataProvider Module Reference 3.1
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};
65
67class DataProviderTypeEntry : public Qore::Serializable {
68
69public:
70protected:
72 string path;
73
75 string name;
76
78 *hash<string, DataProviderTypeEntry> children;
79
81 *hash<string, DataProviderTypeEntry> type_children;
82
84 *hash<string, DataProviderTypeEntry> rec_children;
85
88
90
92 bool locked = False;
93
95 bool parent = False;
96
99
101 static bool neg;
102
104 static Sequence seq(1);
105
106public:
107
109
112
113
115
117 constructor(string path, string name);
118
119
121 string getName();
122
123
126
127
130
131
133 string getDesc();
134
135
137 string getPath();
138
139
141 bool hasType();
142
143
145 bool isParent();
146
147
149
152
153
155
157 bool isLocked();
158
159
161
167 bool lock();
168
169
171
175 addChild(string child);
176
177
179
187
188
190
198
199
201
205 hash<DataProviderTypeEntryInfo> getInfo(*bool rec_children_only);
206
207
209
213 *list<string> listTypes();
214
215
217
222 *list<string> listParentTypes();
223
224
226
228 *list<string> getChildNames();
229
230
232
235
236
238
243
244
246
249
250
252
257
258
260
262 removeChild(string child);
263
264
267
268
270 bool clear();
271
272
274
277
278
280
286 static setEpheremalIdStart(int n);
287
289private:
291public:
292
293
295
297private:
299public:
300
301};
302};
303
304// Private namespace
305namespace Priv {
306class DataProviderTypeEntryPrivate : public DataProviderTypeEntry {
307
308public:
310 static forceRemoveChild(DataProviderTypeEntry entry, string child);
311};
312};
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
the DataProviderTypeEntry class
Definition DataProviderTypeEntry.qc.dox.h:67
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:98
constructor()
Creates the entry as a root node.
string getPath()
Returns the path of the entry.
*AbstractDataProviderType getType()
Returns the type at the entry level, if any.
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:84
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:81
string getDesc()
Returns the description of the entry.
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type, *int id)
Sets or replaces the type for the entry.
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:72
lockAll()
Locks all types.
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition DataProviderTypeEntry.qc.dox.h:92
static bool neg
If epheremal IDs should be negative.
Definition DataProviderTypeEntry.qc.dox.h:101
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.
addChild(string child)
Adds a child node to the entry.
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:87
bool parent
True if this entry is a "parent" type; if the children were added atomically with this entry
Definition DataProviderTypeEntry.qc.dox.h:95
string name
The name of this entry.
Definition DataProviderTypeEntry.qc.dox.h:75
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:78
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
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