| Qore DataProvider Module Reference 1.2.1

AbstractDataField.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
26 namespace DataProvider {
29 public struct DataFieldInfo {
31 string name;
32
34 *string desc;
35
37 auto default_value;
38
40 hash<DataTypeInfo> type;
41 };
42
44 class AbstractDataField : public Serializable {
45
46 public:
47 protected:
49 auto default_value;
50
51 public:
52
54 bool isAssignableFrom(AbstractDataProviderType t);
55
56
58 bool isAssignableFrom(Type t);
59
60
62 bool isList();
63
64
66 bool isMandatory();
67
68
70 auto getOptionValue(string opt);
71
72
74 *hash<auto> getOptions();
75
76
78 *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
79
80
82
87 setOption(string opt, auto value);
88
89
91
95 setOptions(hash<auto> options);
96
97
99 string getTypeName();
100
101
103 setDefaultValue(auto default_value);
104
105
107 auto getDefaultValue();
108
109
111 bool hasType();
112
113
115
119 auto acceptsValue(auto value);
120
121
123
125 hash<DataFieldInfo> getInputInfo();
126
127
129 hash<DataFieldInfo> getInfo();
130
131
133
138 AbstractDataField getSoftType();
139
140
142
147 AbstractDataField getOrNothingType();
148
149
151 abstract string getName();
152
154 abstract *string getDescription();
155
157 abstract AbstractDataProviderType getType();
158 };
159 };
DataProvider::AbstractDataField::getDefaultValue
auto getDefaultValue()
get default value, if any
DataProvider::AbstractDataField::isAssignableFrom
bool isAssignableFrom(AbstractDataProviderType t)
returns True if this field&#39;s type can be assigned from values of the argument type ...
DataProvider::AbstractDataField::default_value
auto default_value
the default value for the field, if any
Definition: AbstractDataField.qc.dox.h:49
DataProvider::AbstractDataField::isMandatory
bool isMandatory()
returns True if the field&#39;s type must have a value
DataProvider::AbstractDataField::getSoftType
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
DataProvider::AbstractDataField::getOptionValue
auto getOptionValue(string opt)
returns the value of the given option on the field&#39;s type
DataProvider::AbstractDataField::getType
abstract AbstractDataProviderType getType()
returns the type of the field
DataProvider::AbstractDataField::isList
bool isList()
returns True if this field&#39;s type is a list
DataProvider::AbstractDataField::setOptions
setOptions(hash< auto > options)
sets the given options on the field&#39;s type
DataProvider::AbstractDataField::getOptions
*hash< auto > getOptions()
returns options set on the field&#39;s type
DataProvider::AbstractDataField::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider::AbstractDataField::getInfo
hash< DataFieldInfo > getInfo()
returns information about the field
DataProvider::DataFieldInfo::desc
*string desc
the description of the field, if available
Definition: AbstractDataField.qc.dox.h:34
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:88
DataProvider::AbstractDataField
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:44
DataProvider::DataFieldInfo::default_value
auto default_value
the default value for the field
Definition: AbstractDataField.qc.dox.h:37
DataProvider::DataFieldInfo::type
hash< DataTypeInfo > type
type info
Definition: AbstractDataField.qc.dox.h:40
DataProvider::AbstractDataField::getInputInfo
hash< DataFieldInfo > getInputInfo()
returns information about the field as an input field
DataProvider::AbstractDataField::getDescription
abstract *string getDescription()
returns the description, if any
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::DataFieldInfo
describes a data type
Definition: AbstractDataField.qc.dox.h:29
DataProvider::AbstractDataField::setOption
setOption(string opt, auto value)
sets the given option on the field&#39;s type
DataProvider::AbstractDataField::hasType
bool hasType()
returns True if the field&#39;s type is not a wildcard type
DataProvider::AbstractDataField::getTypeName
string getTypeName()
returns the type name
DataProvider::AbstractDataField::setDefaultValue
setDefaultValue(auto default_value)
sets the default value for the field
DataProvider::DataFieldInfo::name
string name
the name of the field
Definition: AbstractDataField.qc.dox.h:31
DataProvider::AbstractDataField::getName
abstract string getName()
returns the name of the field
DataProvider::AbstractDataField::getOrNothingType
AbstractDataField getOrNothingType()
returns a field with an "or nothing" type equivalent to the current type
DataProvider::AbstractDataField::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options on the field&#39;s type