Qore DataProvider Module Reference 3.1
Loading...
Searching...
No Matches
QoreDataField.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
32namespace DataProvider {
35
36public:
37protected:
39 string name;
40
43
45 *string short_desc;
46
48 *string desc;
49
52
55
56public:
57
59 constructor(hash<auto> h);
60
61
63 constructor(Qore::Reflection::TypedHashMember mem);
64
65
67 constructor(string name, *string desc, Type type, auto default_value, *softlist<auto> allowed_values, *bool multiselect, *bool allowed_values_creatable);
68
69
72
73
75 string getName();
76
77
80
81
84
85
87 *string getDescription();
88
89
92
93
95
98 appendDescription(string separator, string new_desc);
99
100
102
105
106
108
111
112
114
122
123
126
127
129
137 auto getExampleValue(*hash<string, bool> emap, *string fname);
138
139
141 hash<DataFieldInfo> getConfigInfo();
142
143
145
147protected:
149public:
150
151
153protected:
154 static checkString(bool required, hash<auto> h, ...);
155public:
156
157
159protected:
160 static checkHash(bool required, hash<auto> h, ...);
161public:
162
163};
164};
describes a data type based on a hashdecl
Definition AbstractDataField.qc.dox.h:74
bool multiselect
Are allowed values elements of the list's element type that indicate what values the list can have?
Definition AbstractDataField.qc.dox.h:82
*bool allowed_values_creatable
Does the field accept values not defined in allowed_values too?
Definition AbstractDataField.qc.dox.h:88
auto default_value
the default value for the field, if any
Definition AbstractDataField.qc.dox.h:79
list< hash< AllowedValueInfo > > allowed_values
for enum fields; raw allowed values
Definition AbstractDataField.qc.dox.h:85
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
describes a data type based on a hashdecl
Definition QoreDataField.qc.dox.h:34
*string short_desc
Short description of the field.
Definition QoreDataField.qc.dox.h:45
auto example_value
Example value for the field.
Definition QoreDataField.qc.dox.h:54
string display_name
Display name of the field.
Definition QoreDataField.qc.dox.h:42
constructor(hash< auto > h)
creates the field from the argument
*string desc
description of the field
Definition QoreDataField.qc.dox.h:48
AbstractDataProviderType getType()
returns the type of the field
AbstractDataField getOrNothingType()
returns a field with an "or nothing" type equivalent to the current type
string getName()
returns the name of the field
AbstractDataField updateFieldType(AbstractDataProviderType type)
Updates the field type.
static checkString(bool required, hash< auto > h,...)
Checks for string values in a hash.
constructor(Qore::Reflection::TypedHashMember mem)
creates the field from the argument
*string getDescription()
returns the description, if any
string getDisplayName()
Returns the display name of the field.
static checkHash(bool required, hash< auto > h,...)
Checks for hash values in a hash.
*string getShortDescription()
Returns the short description, if any.
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
constructor(string name, *string desc, Type type, auto default_value, *softlist< auto > allowed_values, *bool multiselect, *bool allowed_values_creatable)
creates the field from the arguments
constructor(string name, *string desc, AbstractDataProviderType type, auto default_value, *softlist< auto > allowed_values, *bool multiselect, *bool allowed_values_creatable)
creates the field from the arguments
string name
Name of the field.
Definition QoreDataField.qc.dox.h:39
auto getExampleValue(*hash< string, bool > emap, *string fname)
Returns any example value for the field, if present.
appendDescription(string separator, string new_desc)
adds a string to the description
AbstractDataField getMandatoryType()
Returns a mandatory (i.e. not "or nothing") field equivalent to the current field.
AbstractDataProviderType type
field type
Definition QoreDataField.qc.dox.h:51
AbstractDataField getNewFieldType(AbstractDataProviderType new_type)
returns a field with the new type
hash< DataFieldInfo > getConfigInfo()
returns information about the field
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27