Qore DataProvider Module Reference  2.7
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 {
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 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 
79 
81 
83  bool locked = False;
84 
86  bool parent = False;
87 
88 public:
89 
91 
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 
149 
150 
152 
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 
196 
197 
199 
204 
205 
207 
210 
211 
213 
218 
219 
221 
223  removeChild(string child);
224 
225 
228 
229 
231  bool clear();
232 
233 
235 
238 
239 
241 private:
243 public:
244 
245 
247 
249 private:
251 public:
252 
253 };
254 };
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:187
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:58
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.
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.
constructor(string path, string name)
Creates the entry as a child node.
*list< string > listTypes()
Returns a list of registered data provider type paths.
*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:75
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:72
string getDesc()
Returns the description of the entry.
bool hasType()
Returns True if the entry has a type.
string path
The path to this entry.
Definition: DataProviderTypeEntry.qc.dox.h:63
lockAll()
Locks all types.
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:83
*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.
*list< string > getChildNames()
Returns a list of child entry names, if any.
removeChild(string child)
Removes the given child, if it exists.
hash< DataProviderTypeEntryInfo > getInfo(*bool rec_children_only)
Returns information about this entry.
bool lock()
Locks the entry, so it can't be removed or changed.
*AbstractDataProviderType type
The type at this location.
Definition: DataProviderTypeEntry.qc.dox.h:78
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
*list< string > listParentTypes()
Returns a list of registered data provider type paths where each type listed is a "parent" type.
string name
The name of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:66
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type)
Sets or replaces the type for the entry.
*DataProviderTypeEntry getChild(string child)
Returns the given child, if any.
*hash< string, DataProviderTypeEntry > children
Children of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:69
const False
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
Data provider type entry info.
Definition: DataProviderTypeEntry.qc.dox.h:33
*list< string > children
The names of any children.
Definition: DataProviderTypeEntry.qc.dox.h:54
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:51
bool has_type
True if the entry has a type
Definition: DataProviderTypeEntry.qc.dox.h:46
string desc
The description of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:38
string path
The path to the entry including the name as the last element.
Definition: DataProviderTypeEntry.qc.dox.h:41