Qore DataProvider Module Reference  1.0.2
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 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 
70 
72 
74  bool locked = False;
75 
76 public:
77 
79 
81  constructor();
82 
83 
85 
87  constructor(string path, string name);
88 
89 
91  string getName();
92 
93 
95  string getPath();
96 
97 
99  bool hasType();
100 
101 
103 
109  bool lock();
110 
111 
113 
117  addChild(string child);
118 
119 
121 
129 
130 
132 
139 
140 
142 
144  hash<DataProviderTypeEntryInfo> getInfo();
145 
146 
148 
152  *list<string> listTypes();
153 
154 
156 
158  *list<string> getChildNames();
159 
160 
162 
165 
166 
168 
173 
174 
176 
178  *DataProviderTypeEntry getChild(string child);
179 
180 
182 
186  *DataProviderTypeEntry getChildEx(string child);
187 
188 
190 
192  removeChild(string child);
193 
194 
196  lockAll();
197 
198 
200  bool clear();
201 
202 
204 
207 
208 };
209 };
DataProvider::DataProviderTypeEntry::getTypeEx
*AbstractDataProviderType getTypeEx()
Returns the type at the entry level, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::path
string path
The path to this entry.
Definition: DataProviderTypeEntry.qc.dox.h:60
DataProvider::DataProviderTypeEntry::clear
bool clear()
Clears the type hierarchy of all non-locked types.
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:161
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::name
string name
The name of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:63
DataProvider::DataProviderTypeEntry::setType
bool setType(AbstractDataProviderType type, bool locked=False)
Sets the type for the entry.
DataProvider::DataProviderTypeEntry::children
*hash< string, DataProviderTypeEntry > children
Children of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:66
DataProvider::DataProviderTypeEntry::getPath
string getPath()
Returns the path of the entry.
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:32
DataProvider::DataProviderTypeEntry::lockAll
lockAll()
Locks all types.
DataProvider::DataProviderTypeEntry::getChildEx
*DataProviderTypeEntry getChildEx(string child)
Returns the given child, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:74
DataProvider::DataProviderTypeEntry::removeChild
removeChild(string child)
Removes the given child, if it exists.
DataProvider::DataProviderTypeEntry::getChild
*DataProviderTypeEntry getChild(string child)
Returns the given child, if any.
DataProvider::DataProviderTypeEntryInfo::name
string name
The name of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:35
DataProvider::DataProviderTypeEntryInfo
Data provider type entry info.
Definition: DataProviderTypeEntry.qc.dox.h:33
DataProvider::DataProviderTypeEntryInfo::children
*list< string > children
The names of any children.
Definition: DataProviderTypeEntry.qc.dox.h:51
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::getName
string getName()
Returns the name of the entry.
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:55
DataProvider::DataProviderTypeEntry::hasType
bool hasType()
Returns True if the entry has a type.
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::lock
bool lock()
Locks the entry, so it can't be removed or changed.
False
const False
DataProvider::DataProviderTypeEntry::listTypes
*list< string > listTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeEntry::setOrReplaceType
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type)
Sets or replaces the type for the entry.
DataProvider::DataProviderTypeEntry::addChild
addChild(string child)
Adds a child node to the entry.
DataProvider::DataProviderTypeEntry::getChildNames
*list< string > getChildNames()
Returns a list of child entry names, if any.
DataProvider::DataProviderTypeEntryInfo::has_type
bool has_type
True if the entry has a type
Definition: DataProviderTypeEntry.qc.dox.h:43
DataProvider::DataProviderTypeEntry::getCreateChild
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
DataProvider::DataProviderTypeEntry::getInfo
hash< DataProviderTypeEntryInfo > getInfo()
Returns information about this entry.
DataProvider::DataProviderTypeEntry::type
*AbstractDataProviderType type
The type at this location.
Definition: DataProviderTypeEntry.qc.dox.h:69