| Qore DataProvider Module Reference 3.2.2

Loading...
Searching...
No Matches
QoreDataType.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
26 namespace DataProvider {
28 public struct NameDescInfo {
30 string name;
31
33 string display_name;
34
36 string short_desc;
37
39 string desc;
40};
41
43
46 class QoreDataType : public AbstractDataProviderType {
47
48 public:
49 protected:
51 Type type;
52
54 string name;
55
57 string display_name;
58
60 string short_desc;
61
63 string desc;
64
66 bool soft_type;
67
69 bool or_nothing_type;
70
72 auto default_value;
73
75
80 hash<string, bool> base_type_hash;
81
83 *hash<string, bool> accept_type_hash;
84
86 *hash<string, bool> return_type_hash;
87
89 *hash<string, bool> accept_type_hash_simple;
90
92 *hash<string, bool> return_type_hash_simple;
93
95 hash<string, bool> blacklist_type_hash;
96
98 const SupportedOptions = ...;
99
100
102 const SoftTypeMap = ...;
103
104
105 public:
106
108 constructor(Type type, *hash<auto> options, *hash<auto> tags, auto default_value, *hash<NameDescInfo> attr, *string path) ;
109
110
112 string getName();
113
114
116
120 string getDisplayName();
121
122
124
128 string getShortDescription();
129
130
132 string getDesc();
133
134
136 *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
137
138
140 *Type getValueType();
141
142
144 *hash<string, bool> getDirectTypeHash();
145
146
148
157 bool hasDefaultValue();
158
159
161
170 auto getDefaultValue();
171
172
174 *AbstractDataProviderType getElementType();
175
176
178
184 auto acceptsValue(auto value);
185
186
188 *hash<string, AbstractDataField> getFields();
189
190
192 hash<string, bool> getAcceptTypeHash(*bool simple);
193
194
196 hash<string, bool> getReturnTypeHash(*bool simple);
197
198
200 hash<DataTypeInfo> getInfo(*bool simple);
201
202
204
206 AbstractDataProviderType getSoftType();
207
208
210
212 AbstractDataProviderType getOrNothingType();
213
214
216
221 AbstractDataProviderType getMandatoryType();
222
223
224 // assigs the object's members after deserialization
225 private:
226 deserializeMembers(hash<auto> members);
227 public:
228
229};
230};
DataProvider::AbstractDataProviderType
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
DataProvider::AbstractDataProviderType::tags
*hash< auto > tags
type tags
Definition AbstractDataProviderType.qc.dox.h:155
DataProvider::AbstractDataProviderType::options
hash< auto > options
type options
Definition AbstractDataProviderType.qc.dox.h:152
DataProvider::AbstractDataProviderType::path
*string path
The type path, if any.
Definition AbstractDataProviderType.qc.dox.h:158
DataProvider::QoreDataType
describes a data type based on a Qore data type
Definition QoreDataType.qc.dox.h:46
DataProvider::QoreDataType::or_nothing_type
bool or_nothing_type
flag for "or nothing" types
Definition QoreDataType.qc.dox.h:69
DataProvider::QoreDataType::SupportedOptions
const SupportedOptions
supported options
Definition QoreDataType.qc.dox.h:98
DataProvider::QoreDataType::default_value
auto default_value
Default value for type.
Definition QoreDataType.qc.dox.h:72
DataProvider::QoreDataType::getAcceptTypeHash
hash< string, bool > getAcceptTypeHash(*bool simple)
returns a hash of base types accepted by this type; keys are type names
DataProvider::QoreDataType::getReturnTypeHash
hash< string, bool > getReturnTypeHash(*bool simple)
returns a hash of base types returned by this type; keys are type names
DataProvider::QoreDataType::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
DataProvider::QoreDataType::hasDefaultValue
bool hasDefaultValue()
! Returns True if this type has a default value
DataProvider::QoreDataType::accept_type_hash_simple
*hash< string, bool > accept_type_hash_simple
hash of base types accepted by this type; keys are simple type names
Definition QoreDataType.qc.dox.h:89
DataProvider::QoreDataType::getOrNothingType
AbstractDataProviderType getOrNothingType()
returns an "or nothing" type equivalent to the current type
DataProvider::QoreDataType::name
string name
The name of the type; if not set then the name of "type" is used instead.
Definition QoreDataType.qc.dox.h:54
DataProvider::QoreDataType::getElementType
*AbstractDataProviderType getElementType()
returns the subtype (for lists or hashes) if there is only one
DataProvider::QoreDataType::getMandatoryType
AbstractDataProviderType getMandatoryType()
Returns a mandatory (i.e. not "or nothing") type equivalent to the current type.
DataProvider::QoreDataType::getDisplayName
string getDisplayName()
Returns the type's display name.
DataProvider::QoreDataType::accept_type_hash
*hash< string, bool > accept_type_hash
hash of base types accepted by this type; keys are type names
Definition QoreDataType.qc.dox.h:83
DataProvider::QoreDataType::display_name
string display_name
The display name for the type.
Definition QoreDataType.qc.dox.h:57
DataProvider::QoreDataType::base_type_hash
hash< string, bool > base_type_hash
hash of base types where no translations are performed; keys are type codes, not names
Definition QoreDataType.qc.dox.h:80
DataProvider::QoreDataType::return_type_hash
*hash< string, bool > return_type_hash
hash of base types returned by this type; keys are type names
Definition QoreDataType.qc.dox.h:86
DataProvider::QoreDataType::type
Type type
the Qore type
Definition QoreDataType.qc.dox.h:51
DataProvider::QoreDataType::getDirectTypeHash
*hash< string, bool > getDirectTypeHash()
returns a hash of native base type code where no translations are performed; keys are type codes,...
DataProvider::QoreDataType::soft_type
bool soft_type
flag for soft types
Definition QoreDataType.qc.dox.h:66
DataProvider::QoreDataType::short_desc
string short_desc
The short plain-text description for the type.
Definition QoreDataType.qc.dox.h:60
DataProvider::QoreDataType::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider::QoreDataType::getDefaultValue
auto getDefaultValue()
DataProvider::QoreDataType::SoftTypeMap
const SoftTypeMap
map from normal types to soft types
Definition QoreDataType.qc.dox.h:102
DataProvider::QoreDataType::getInfo
hash< DataTypeInfo > getInfo(*bool simple)
returns a description of the type as a hash
DataProvider::QoreDataType::getValueType
*Type getValueType()
returns the base type for the type, if any
DataProvider::QoreDataType::getSoftType
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
DataProvider::QoreDataType::desc
string desc
The long description for the type in markdown.
Definition QoreDataType.qc.dox.h:63
DataProvider::QoreDataType::return_type_hash_simple
*hash< string, bool > return_type_hash_simple
hash of base types returned by this type; keys are simple type names
Definition QoreDataType.qc.dox.h:92
DataProvider::QoreDataType::getName
string getName()
returns the type name
DataProvider::QoreDataType::blacklist_type_hash
hash< string, bool > blacklist_type_hash
hash of type codes accepted by the base type but not accepted by this type: code -> True
Definition QoreDataType.qc.dox.h:95
DataProvider::QoreDataType::getDesc
string getDesc()
Returns the description.
DataProvider::QoreDataType::getShortDescription
string getShortDescription()
Returns the type's short description.
DataProvider::QoreDataType::constructor
constructor(Type type, *hash< auto > options, *hash< auto > tags, auto default_value, *hash< NameDescInfo > attr, *string path)
creates the type
DataProvider::QoreDataType::getFields
*hash< string, AbstractDataField > getFields()
returns the fields of the data structure; if any
DataProvider
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
DataProvider::NameDescInfo
Name and description info.
Definition QoreDataType.qc.dox.h:28
DataProvider::NameDescInfo::display_name
string display_name
The display name for the type.
Definition QoreDataType.qc.dox.h:33
DataProvider::NameDescInfo::short_desc
string short_desc
The short plain-text description for the type.
Definition QoreDataType.qc.dox.h:36
DataProvider::NameDescInfo::name
string name
The name of the type.
Definition QoreDataType.qc.dox.h:30
DataProvider::NameDescInfo::desc
string desc
The markdown description for the type.
Definition QoreDataType.qc.dox.h:39