Qore DataProvider Module Reference  1.0
AbstractDataField.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
25 // assume local scope for variables, do not use "$" signs
26 // require type definitions everywhere
28 // enable all warnings
29 
30 
32 namespace DataProvider {
34 public struct DataFieldInfo {
36  string name;
37 
39  *string desc;
40 
43 
45  hash<DataTypeInfo> type;
46 };
47 
50 
51 public:
52 protected:
55 
56 public:
57 
60 
61 
63  bool isAssignableFrom(Type t);
64 
65 
67  bool isList();
68 
69 
71  bool isMandatory();
72 
73 
75  auto getOptionValue(string opt);
76 
77 
79  *hash<auto> getOptions();
80 
81 
83  *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
84 
85 
87 
92  setOption(string opt, auto value);
93 
94 
96 
100  setOptions(hash<auto> options);
101 
102 
104  string getTypeName();
105 
106 
109 
110 
112  auto getDefaultValue();
113 
114 
116  bool hasType();
117 
118 
120 
124  auto acceptsValue(auto value);
125 
126 
128 
130  hash<DataFieldInfo> getInputInfo();
131 
132 
134  hash<DataFieldInfo> getInfo();
135 
136 
138 
144 
145 
147  abstract string getName();
148 
150  abstract *string getDescription();
151 
154 };
155 };
auto getDefaultValue()
get default value, if any
bool isAssignableFrom(AbstractDataProviderType t)
returns True if this field's type can be assigned from values of the argument type
auto default_value
the default value for the field, if any
Definition: AbstractDataField.qc.dox.h:54
bool isMandatory()
returns True if the field's type must have a value
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
auto getOptionValue(string opt)
returns the value of the given option on the field's type
abstract AbstractDataProviderType getType()
returns the type of the field
bool isList()
returns True if this field's type is a list
setOptions(hash< auto > options)
sets the given options on the field's type
*hash< auto > getOptions()
returns options set on the field's type
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
hash< DataFieldInfo > getInfo()
returns information about the field
*string desc
the description of the field, if available
Definition: AbstractDataField.qc.dox.h:39
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:161
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:49
auto default_value
the default value for the field
Definition: AbstractDataField.qc.dox.h:42
hash< DataTypeInfo > type
type info
Definition: AbstractDataField.qc.dox.h:45
hash< DataFieldInfo > getInputInfo()
returns information about the field as an input field
abstract *string getDescription()
returns the description, if any
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:32
describes a data type
Definition: AbstractDataField.qc.dox.h:34
setOption(string opt, auto value)
sets the given option on the field's type
bool hasType()
returns True if the field's type is not a wildcard type
string getTypeName()
returns the type name
setDefaultValue(auto default_value)
sets the default value for the field
string name
the name of the field
Definition: AbstractDataField.qc.dox.h:36
abstract string getName()
returns the name of the field
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options on the field's type