| Qore DataProvider Module Reference 3.2.2

Loading...
Searching...
No Matches
DataProviderTypeCache.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
25
27 namespace DataProvider {
29 class DataProviderTypeCache : public Qore::Serializable {
30
31 public:
32 protected:
34 DataProviderTypeEntry root();
35
37 transient RWLock rwlock();
38
40 hash<string, DataProviderTypeEntry> tmap;
41
43 hash<string, DataProviderTypeEntry> trmap;
44
46 int size = 0;
47
48 public:
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
87 *DataProviderTypeEntry removeTypeEntry(string path);
88
89
91
99 *DataProviderTypeEntry removeTypeEntryEx(string path);
100
101
103
107 *AbstractDataProviderType removeType(string path);
108
109
111
117 *AbstractDataProviderType removeTypeEx(string path);
118
119
121
127 *AbstractDataProviderType lookupTypeFromId(int id);
128
129
131
137 *DataProviderTypeEntry lookupTypeEntryFromId(int id);
138
139
141
149 AbstractDataProviderType lookupTypeFromIdEx(int id);
150
151
153
161 DataProviderTypeEntry lookupTypeEntryFromIdEx(int id);
162
163
165
171 *AbstractDataProviderType lookupTypeFromPath(string path);
172
173
175
181 *DataProviderTypeEntry lookupTypeEntryFromPath(string path);
182
183
185
193 AbstractDataProviderType lookupTypeFromPathEx(string path);
194
195
197
205 DataProviderTypeEntry lookupTypeEntryFromPathEx(string path);
206
207
209 int size();
210
211
213 bool empty();
214
215
217 DataProviderTypeEntry getRoot();
218
219
221 clear();
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
273 lockAll();
274
275
277
284 *AbstractDataProviderType getType(string path);
285
286
288
297 AbstractDataProviderType getTypeEx(string path);
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
383 protected:
384 static *AbstractDataProviderType getTypeFromFields(string path, AbstractDataProviderType type, list<string> type_path, bool throw_exception);
385 public:
386
387
389
396 protected:
397 *DataProviderTypeEntry removeTypeEntryIntern(string path, *bool throw_exception);
398 public:
399
400
402
404 protected:
405 deregisterType(string path);
406 public:
407
408};
409};
DataProvider::AbstractDataProviderType
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
DataProvider::DataProviderTypeCache
Data provider type cache class.
Definition DataProviderTypeCache.qc.dox.h:29
DataProvider::DataProviderTypeCache::getRoot
DataProviderTypeEntry getRoot()
Returns the root type entry.
DataProvider::DataProviderTypeCache::getTypeInfoEx
hash< DataProviderTypeEntryInfo > getTypeInfoEx(string path, *bool rec_children_only)
Returns the given data provider type or throws an exception if not present.
DataProvider::DataProviderTypeCache::lookupTypeEntryFromId
*DataProviderTypeEntry lookupTypeEntryFromId(int id)
Returns a type from its epheremal ID.
DataProvider::DataProviderTypeCache::lookupTypeFromPath
*AbstractDataProviderType lookupTypeFromPath(string path)
Returns a type from its path.
DataProvider::DataProviderTypeCache::size
int size
The size of the cache.
Definition DataProviderTypeCache.qc.dox.h:46
DataProvider::DataProviderTypeCache::clear
clear()
Clears the type hierarchy of all non-locked types.
DataProvider::DataProviderTypeCache::listTypes
*list< string > listTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeCache::trmap
hash< string, DataProviderTypeEntry > trmap
Map of path names to types.
Definition DataProviderTypeCache.qc.dox.h:43
DataProvider::DataProviderTypeCache::lockAll
lockAll()
Locks all types.
DataProvider::DataProviderTypeCache::listParentTypes
*list< string > listParentTypes()
Returns a list of registered data provider type paths where the types are "parent" types.
DataProvider::DataProviderTypeCache::registerType
registerType(string path, AbstractDataProviderType type, bool locked=False, *bool set_rollback)
Register a new data provider type in the cache.
DataProvider::DataProviderTypeCache::lookupTypeFromIdEx
AbstractDataProviderType lookupTypeFromIdEx(int id)
Returns a type from its epheremal ID; throws an exception if the ID is unknown.
DataProvider::DataProviderTypeCache::getType
*AbstractDataProviderType getType(string path)
Returns the given data provider type or NOTHING if not present.
DataProvider::DataProviderTypeCache::registerOrReplaceType
bool registerOrReplaceType(string path, AbstractDataProviderType type, *int id, *hash< auto > info)
Register or replaces a data provider type in the cache.
DataProvider::DataProviderTypeCache::rwlock
transient RWLock rwlock()
Data provider type cache lock.
DataProvider::DataProviderTypeCache::empty
bool empty()
Returns True if the cache is empty, False if not.
DataProvider::DataProviderTypeCache::getTypeInfo
*hash< DataProviderTypeEntryInfo > getTypeInfo(string path, *bool rec_children_only)
Returns the given data provider type or NOTHING if not present.
DataProvider::DataProviderTypeCache::listRegisteredTypeEntries
*list< hash< DataProviderTypeEntryInfo > > listRegisteredTypeEntries()
Returns a list of information for all registered data provider type entries.
DataProvider::DataProviderTypeCache::getLock
RWLock getLock()
Returns the RWLock to allow for external serialization.
DataProvider::DataProviderTypeCache::lookupTypeEntryFromPath
*DataProviderTypeEntry lookupTypeEntryFromPath(string path)
Returns a type from its path.
DataProvider::DataProviderTypeCache::lookupTypeEntryFromIdEx
DataProviderTypeEntry lookupTypeEntryFromIdEx(int id)
Returns a type from its epheremal ID; throws an exception if the ID is unknown.
DataProvider::DataProviderTypeCache::size
int size()
Returns the number of types in the cache.
DataProvider::DataProviderTypeCache::deregisterType
deregisterType(string path)
Deregisters the type at the given path.
DataProvider::DataProviderTypeCache::removeTypeEntryIntern
*DataProviderTypeEntry removeTypeEntryIntern(string path, *bool throw_exception)
Removes a type from the type cache and returns the removed entry.
DataProvider::DataProviderTypeCache::removeTypeEx
*AbstractDataProviderType removeTypeEx(string path)
Removes a type from the type cache.
DataProvider::DataProviderTypeCache::lookupTypeEntryFromPathEx
DataProviderTypeEntry lookupTypeEntryFromPathEx(string path)
Returns a type from its path; throws an exception if the path is unknown.
DataProvider::DataProviderTypeCache::root
DataProviderTypeEntry root()
Data provider data type cache.
DataProvider::DataProviderTypeCache::listRegisteredTypes
*list< string > listRegisteredTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeCache::removeTypeEntry
*DataProviderTypeEntry removeTypeEntry(string path)
Removes a type from the type cache and returns the removed entry.
DataProvider::DataProviderTypeCache::removeTypeEntryEx
*DataProviderTypeEntry removeTypeEntryEx(string path)
Removes a type from the type cache and returns the removed entry.
DataProvider::DataProviderTypeCache::getTypeFromFields
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...
DataProvider::DataProviderTypeCache::lookupTypeFromId
*AbstractDataProviderType lookupTypeFromId(int id)
Returns a type from its epheremal ID.
DataProvider::DataProviderTypeCache::tmap
hash< string, DataProviderTypeEntry > tmap
Map of epheremal type IDs to types.
Definition DataProviderTypeCache.qc.dox.h:40
DataProvider::DataProviderTypeCache::removeType
*AbstractDataProviderType removeType(string path)
Removes a type from the type cache.
DataProvider::DataProviderTypeCache::getTypeInfoImpl
*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...
DataProvider::DataProviderTypeCache::getTypeEx
AbstractDataProviderType getTypeEx(string path)
Returns the given data provider type or throws an exception if not present.
DataProvider::DataProviderTypeCache::lookupTypeFromPathEx
AbstractDataProviderType lookupTypeFromPathEx(string path)
Returns a type from its path; throws an exception if the path is unknown.
DataProvider::DataProviderTypeCache::getTypeImpl
*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...
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition DataProviderTypeEntry.qc.dox.h:70
Qore::Serializable
DataProvider
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27