Qore DataProvider Module Reference  1.0.4
DataProviderTypeCache.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace DataProvider {
29 class DataProviderTypeCache : public Serializable {
30 
31 public:
32 protected:
35 
37  transient RWLock rwlock();
38 
40  int size = 0;
41 
42 public:
43 
45 
54  registerType(string path, AbstractDataProviderType type, bool locked = False);
55 
56 
58 
69 
70 
72 
79 
80 
82  int size();
83 
84 
86  bool empty();
87 
88 
91 
92 
94  clear();
95 
96 
98 
102  *list<string> listTypes();
103 
104 
107 
108 
110 
118 
119 
121 
131 
132 
134 
142  *hash<DataProviderTypeEntryInfo> getTypeInfo(string path, *bool rec_children_only);
143 
144 
146 
156  hash<DataProviderTypeEntryInfo> getTypeInfoEx(string path, *bool rec_children_only);
157 
158 
160 
175  *AbstractDataProviderType getTypeImpl(string path, bool throw_exception, *code type_loader);
176 
177 
179 
193  *hash<DataProviderTypeEntryInfo> getTypeInfoImpl(string path, bool throw_exception, *bool rec_children_only);
194 
195 
197  RWLock getLock();
198 
199 
201 
216 protected:
217  static *AbstractDataProviderType getTypeFromFields(string path, AbstractDataProviderType type, list<string> type_path, bool throw_exception);
218 public:
219 
220 };
221 };
DataProvider::DataProviderTypeCache::removeType
*AbstractDataProviderType removeType(string path)
Removes a type from the type cache.
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:93
DataProvider::DataProviderTypeCache::getRoot
DataProviderTypeEntry getRoot()
Returns the root type entry.
type
string type(auto arg)
DataProvider::DataProviderTypeCache::getType
*AbstractDataProviderType getType(string path)
Returns the given data provider type or NOTHING if not present.
DataProvider::DataProviderTypeCache::size
int size
The size of the cache.
Definition: DataProviderTypeCache.qc.dox.h:40
DataProvider::DataProviderTypeCache::empty
bool empty()
Returns True if the cache is empty, False if not.
DataProvider::DataProviderTypeCache::registerOrReplaceType
bool registerOrReplaceType(string path, AbstractDataProviderType type)
Register or replaces a data provider type in the 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
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:32
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::DataProviderTypeCache::lockAll
lockAll()
Locks all types.
DataProvider::DataProviderTypeCache::registerType
registerType(string path, AbstractDataProviderType type, bool locked=False)
Register a new data provider type in the cache.
DataProvider::DataProviderTypeCache::listTypes
*list< string > listTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeCache::clear
clear()
Clears the type hierarchy of all non-locked types.
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::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:55
DataProvider::DataProviderTypeCache::rwlock
transient RWLock rwlock()
Data provider type cache lock.
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
Data provider type cache class.
Definition: DataProviderTypeCache.qc.dox.h:29
DataProvider::DataProviderTypeCache::getLock
RWLock getLock()
Returns the RWLock to allow for external serialization.
False
const False
DataProvider::DataProviderTypeCache::getTypeEx
AbstractDataProviderType getTypeEx(string path)
Returns the given data provider type or throws an exception if not present.
DataProvider::DataProviderTypeCache::root
DataProviderTypeEntry root()
Data provider data type cache.
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::size
int size()
Returns the number of types in the cache.