Qore DataProvider Module Reference 3.0
Loading...
Searching...
No Matches
QoreDataType.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace DataProvider {
28public struct NameDescInfo {
30 string name;
31
34
36 string short_desc;
37
39 string desc;
40};
41
43
47
48public:
49protected:
51 Type type;
52
54 string name;
55
58
60 string short_desc;
61
63 string desc;
64
67
70
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
105public:
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
121
122
124
129
130
132 string getDesc();
133
134
136 *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
137
138
141
142
144 *hash<string, bool> getDirectTypeHash();
145
146
148
158
159
161
171
172
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
207
208
210
213
214
216
222
223
224 // assigs the object's members after deserialization
225private:
226 deserializeMembers(hash<auto> members);
227public:
228
229};
230};
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
*hash< auto > tags
type tags
Definition AbstractDataProviderType.qc.dox.h:155
hash< auto > options
type options
Definition AbstractDataProviderType.qc.dox.h:152
*string path
The type path, if any.
Definition AbstractDataProviderType.qc.dox.h:158
describes a data type based on a Qore data type
Definition QoreDataType.qc.dox.h:46
bool or_nothing_type
flag for "or nothing" types
Definition QoreDataType.qc.dox.h:69
const SupportedOptions
supported options
Definition QoreDataType.qc.dox.h:98
auto default_value
Default value for type.
Definition QoreDataType.qc.dox.h:72
hash< string, bool > getAcceptTypeHash(*bool simple)
returns a hash of base types accepted by this type; keys are type names
hash< string, bool > getReturnTypeHash(*bool simple)
returns a hash of base types returned by this type; keys are type names
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
bool hasDefaultValue()
! Returns True if this type has a default value
*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
AbstractDataProviderType getOrNothingType()
returns an "or nothing" type equivalent to the current type
string name
The name of the type; if not set then the name of "type" is used instead.
Definition QoreDataType.qc.dox.h:54
*AbstractDataProviderType getElementType()
returns the subtype (for lists or hashes) if there is only one
AbstractDataProviderType getMandatoryType()
Returns a mandatory (i.e. not "or nothing") type equivalent to the current type.
string getDisplayName()
Returns the type's display name.
*hash< string, bool > accept_type_hash
hash of base types accepted by this type; keys are type names
Definition QoreDataType.qc.dox.h:83
string display_name
The display name for the type.
Definition QoreDataType.qc.dox.h:57
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
*hash< string, bool > return_type_hash
hash of base types returned by this type; keys are type names
Definition QoreDataType.qc.dox.h:86
Type type
the Qore type
Definition QoreDataType.qc.dox.h:51
*hash< string, bool > getDirectTypeHash()
returns a hash of native base type code where no translations are performed; keys are type codes,...
bool soft_type
flag for soft types
Definition QoreDataType.qc.dox.h:66
string short_desc
The short plain-text description for the type.
Definition QoreDataType.qc.dox.h:60
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
const SoftTypeMap
map from normal types to soft types
Definition QoreDataType.qc.dox.h:102
hash< DataTypeInfo > getInfo(*bool simple)
returns a description of the type as a hash
*Type getValueType()
returns the base type for the type, if any
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
string desc
The long description for the type in markdown.
Definition QoreDataType.qc.dox.h:63
*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
string getName()
returns the type name
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
string getDesc()
Returns the description.
string getShortDescription()
Returns the type's short description.
constructor(Type type, *hash< auto > options, *hash< auto > tags, auto default_value, *hash< NameDescInfo > attr, *string path)
creates the type
*hash< string, AbstractDataField > getFields()
returns the fields of the data structure; if any
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
Name and description info.
Definition QoreDataType.qc.dox.h:28
string display_name
The display name for the type.
Definition QoreDataType.qc.dox.h:33
string short_desc
The short plain-text description for the type.
Definition QoreDataType.qc.dox.h:36
string name
The name of the type.
Definition QoreDataType.qc.dox.h:30
string desc
The markdown description for the type.
Definition QoreDataType.qc.dox.h:39