| Qore DataProvider Module Reference 1.2.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 path;
39
41
43 bool has_type;
44
46
48 bool locked = False;
49
51 *list<string> children;
52 };
53
55 class DataProviderTypeEntry : public Serializable {
56
57 public:
58 protected:
60 string path;
61
63 string name;
64
66 *hash<string, DataProviderTypeEntry> children;
67
69 *hash<string, DataProviderTypeEntry> type_children;
70
72 *hash<string, DataProviderTypeEntry> rec_children;
73
75 *AbstractDataProviderType type;
76
78
80 bool locked = False;
81
82 public:
83
85
87 constructor();
88
89
91
93 constructor(string path, string name);
94
95
97 string getName();
98
99
101 string getPath();
102
103
105 bool hasType();
106
107
109
115 bool lock();
116
117
119
123 addChild(string child);
124
125
127
134 bool setType(AbstractDataProviderType type, bool locked = False);
135
136
138
144 *AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type);
145
146
148
152 hash<DataProviderTypeEntryInfo> getInfo(*bool rec_children_only);
153
154
156
160 *list<string> listTypes();
161
162
164
166 *list<string> getChildNames();
167
168
170
172 *AbstractDataProviderType getType();
173
174
176
180 *AbstractDataProviderType getTypeEx();
181
182
184
186 *DataProviderTypeEntry getChild(string child);
187
188
190
194 *DataProviderTypeEntry getChildEx(string child);
195
196
198
200 removeChild(string child);
201
202
204 lockAll();
205
206
208 bool clear();
209
210
212
214 DataProviderTypeEntry getCreateChild(string child);
215
216
218 private:
219 setTypeChildren();
220 public:
221
222
224
226 private:
227 constructor(string path, string name, AbstractDataProviderType type);
228 public:
229
230 };
231 };
DataProvider::DataProviderTypeEntry::lock
bool lock()
Locks the entry, so it can&#39;t be removed or changed.
DataProvider::DataProviderTypeEntry::setType
bool setType(AbstractDataProviderType type, bool locked=False)
Sets the type for the entry.
DataProvider::DataProviderTypeEntry::name
string name
The name of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:63
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:55
DataProvider::DataProviderTypeEntry::setOrReplaceType
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type)
Sets or replaces the type for the entry.
DataProvider::DataProviderTypeEntry::constructor
constructor()
Creates the entry as a root node.
DataProvider::DataProviderTypeEntry::getType
*AbstractDataProviderType getType()
Returns the type at the entry level, if any.
DataProvider::DataProviderTypeEntry::children
*hash< string, DataProviderTypeEntry > children
Children of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:66
DataProvider::DataProviderTypeEntry::getChild
*DataProviderTypeEntry getChild(string child)
Returns the given child, if any.
DataProvider::DataProviderTypeEntry::getTypeEx
*AbstractDataProviderType getTypeEx()
Returns the type at the entry level, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::setTypeChildren
setTypeChildren()
Sets up attributes as children.
False
const False
DataProvider::DataProviderTypeEntryInfo::name
string name
The name of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:35
DataProvider::DataProviderTypeEntryInfo::path
string path
The path to the entry including the name as the last element.
Definition: DataProviderTypeEntry.qc.dox.h:38
DataProvider::DataProviderTypeEntry::clear
bool clear()
Clears the type hierarchy of all non-locked types.
DataProvider::DataProviderTypeEntry::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:80
DataProvider::DataProviderTypeEntry::lockAll
lockAll()
Locks all types.
DataProvider::DataProviderTypeEntry::getName
string getName()
Returns the name of the entry.
DataProvider::DataProviderTypeEntry::hasType
bool hasType()
Returns True if the entry has a type.
DataProvider::DataProviderTypeEntry::type_children
*hash< string, DataProviderTypeEntry > type_children
Names of attributes that can be referenced as children.
Definition: DataProviderTypeEntry.qc.dox.h:69
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:72
DataProvider::DataProviderTypeEntryInfo::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:48
DataProvider::DataProviderTypeEntry::removeChild
removeChild(string child)
Removes the given child, if it exists.
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:88
DataProvider::DataProviderTypeEntry::getPath
string getPath()
Returns the path of the entry.
DataProvider::DataProviderTypeEntry::getChildEx
*DataProviderTypeEntry getChildEx(string child)
Returns the given child, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::path
string path
The path to this entry.
Definition: DataProviderTypeEntry.qc.dox.h:60
DataProvider::DataProviderTypeEntry::getChildNames
*list< string > getChildNames()
Returns a list of child entry names, if any.
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::DataProviderTypeEntry::getCreateChild
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
DataProvider::DataProviderTypeEntryInfo
Data provider type entry info.
Definition: DataProviderTypeEntry.qc.dox.h:33
DataProvider::DataProviderTypeEntry::type
*AbstractDataProviderType type
The type at this location.
Definition: DataProviderTypeEntry.qc.dox.h:75
DataProvider::DataProviderTypeEntry::getInfo
hash< DataProviderTypeEntryInfo > getInfo(*bool rec_children_only)
Returns information about this entry.
DataProvider::DataProviderTypeEntry::listTypes
*list< string > listTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeEntryInfo::children
*list< string > children
The names of any children.
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:43
DataProvider::DataProviderTypeEntry::addChild
addChild(string child)
Adds a child node to the entry.