Qore DataProvider Module Reference 3.2.2
Loading...
Searching...
No Matches
DataProviderTypeCache.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
27namespace DataProvider {
30
31public:
32protected:
35
37 transient RWLock rwlock();
38
40 hash<string, DataProviderTypeEntry> tmap;
41
43 hash<string, DataProviderTypeEntry> trmap;
44
46 int size = 0;
47
48public:
49
51
62 registerType(string path, AbstractDataProviderType type, bool locked = False, *bool set_rollback);
63
64
66
79 bool registerOrReplaceType(string path, AbstractDataProviderType type, *int id, *hash<auto> info);
80
81
83
88
89
91
100
101
103
108
109
111
118
119
121
128
129
131
138
139
141
150
151
153
162
163
165
172
173
175
182
183
185
194
195
197
206
207
209 int size();
210
211
213 bool empty();
214
215
218
219
222
223
225
233 *list<hash<DataProviderTypeEntryInfo>> listRegisteredTypeEntries();
234
235
237
246 *list<string> listRegisteredTypes();
247
248
250
260 *list<string> listTypes();
261
262
264
269 *list<string> listParentTypes();
270
271
274
275
277
285
286
288
298
299
301
309 *hash<DataProviderTypeEntryInfo> getTypeInfo(string path, *bool rec_children_only);
310
311
313
323 hash<DataProviderTypeEntryInfo> getTypeInfoEx(string path, *bool rec_children_only);
324
325
327
342 *AbstractDataProviderType getTypeImpl(string path, bool throw_exception, *code type_loader);
343
344
346
360 *hash<DataProviderTypeEntryInfo> getTypeInfoImpl(string path, bool throw_exception, *bool rec_children_only);
361
362
364 RWLock getLock();
365
366
368
383protected:
384 static *AbstractDataProviderType getTypeFromFields(string path, AbstractDataProviderType type, list<string> type_path, bool throw_exception);
385public:
386
387
389
396protected:
397 *DataProviderTypeEntry removeTypeEntryIntern(string path, *bool throw_exception);
398public:
399
400
402
404protected:
405 deregisterType(string path);
406public:
407
408};
409};
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
Data provider type cache class.
Definition DataProviderTypeCache.qc.dox.h:29
DataProviderTypeEntry getRoot()
Returns the root type entry.
hash< DataProviderTypeEntryInfo > getTypeInfoEx(string path, *bool rec_children_only)
Returns the given data provider type or throws an exception if not present.
*DataProviderTypeEntry lookupTypeEntryFromId(int id)
Returns a type from its epheremal ID.
*AbstractDataProviderType lookupTypeFromPath(string path)
Returns a type from its path.
int size
The size of the cache.
Definition DataProviderTypeCache.qc.dox.h:46
clear()
Clears the type hierarchy of all non-locked types.
*list< string > listTypes()
Returns a list of registered data provider type paths.
hash< string, DataProviderTypeEntry > trmap
Map of path names to types.
Definition DataProviderTypeCache.qc.dox.h:43
*list< string > listParentTypes()
Returns a list of registered data provider type paths where the types are "parent" types.
registerType(string path, AbstractDataProviderType type, bool locked=False, *bool set_rollback)
Register a new data provider type in the cache.
AbstractDataProviderType lookupTypeFromIdEx(int id)
Returns a type from its epheremal ID; throws an exception if the ID is unknown.
*AbstractDataProviderType getType(string path)
Returns the given data provider type or NOTHING if not present.
bool registerOrReplaceType(string path, AbstractDataProviderType type, *int id, *hash< auto > info)
Register or replaces a data provider type in the cache.
transient RWLock rwlock()
Data provider type cache lock.
bool empty()
Returns True if the cache is empty, False if not.
*hash< DataProviderTypeEntryInfo > getTypeInfo(string path, *bool rec_children_only)
Returns the given data provider type or NOTHING if not present.
*list< hash< DataProviderTypeEntryInfo > > listRegisteredTypeEntries()
Returns a list of information for all registered data provider type entries.
RWLock getLock()
Returns the RWLock to allow for external serialization.
*DataProviderTypeEntry lookupTypeEntryFromPath(string path)
Returns a type from its path.
DataProviderTypeEntry lookupTypeEntryFromIdEx(int id)
Returns a type from its epheremal ID; throws an exception if the ID is unknown.
int size()
Returns the number of types in the cache.
deregisterType(string path)
Deregisters the type at the given path.
*DataProviderTypeEntry removeTypeEntryIntern(string path, *bool throw_exception)
Removes a type from the type cache and returns the removed entry.
*AbstractDataProviderType removeTypeEx(string path)
Removes a type from the type cache.
DataProviderTypeEntry lookupTypeEntryFromPathEx(string path)
Returns a type from its path; throws an exception if the path is unknown.
DataProviderTypeEntry root()
Data provider data type cache.
*list< string > listRegisteredTypes()
Returns a list of registered data provider type paths.
*DataProviderTypeEntry removeTypeEntry(string path)
Removes a type from the type cache and returns the removed entry.
*DataProviderTypeEntry removeTypeEntryEx(string path)
Removes a type from the type cache and returns the removed entry.
static *AbstractDataProviderType getTypeFromFields(string path, AbstractDataProviderType type, list< string > type_path, bool throw_exception)
Returns the given data provider type and either throws an exception if not present or returns NOTHING...
*AbstractDataProviderType lookupTypeFromId(int id)
Returns a type from its epheremal ID.
hash< string, DataProviderTypeEntry > tmap
Map of epheremal type IDs to types.
Definition DataProviderTypeCache.qc.dox.h:40
*AbstractDataProviderType removeType(string path)
Removes a type from the type cache.
*hash< DataProviderTypeEntryInfo > getTypeInfoImpl(string path, bool throw_exception, *bool rec_children_only)
Returns information for the given data provider type and either throws an exception if not present or...
AbstractDataProviderType getTypeEx(string path)
Returns the given data provider type or throws an exception if not present.
AbstractDataProviderType lookupTypeFromPathEx(string path)
Returns a type from its path; throws an exception if the path is unknown.
*AbstractDataProviderType getTypeImpl(string path, bool throw_exception, *code type_loader)
Returns the given data provider type and either throws an exception if not present or returns NOTHING...
the DataProviderTypeEntry class
Definition DataProviderTypeEntry.qc.dox.h:70
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27