| Qore DataProvider Module Reference 3.2.2

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