Qore DataProvider Module Reference 2.7.3
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
42 *string desc;
43
46
47public:
48
50 constructor(string name, *string desc, Type type, auto default_value, *softlist<auto> allowed_values);
51
52
55 *softlist<auto> allowed_values) {
56 self.name = name;
57 self.desc = desc;
58 self.type = type;
59 if (exists default_value);
60
61 if (exists allowed_values);
62
63 }
64
66 string getName();
67
68
70 *string getDescription();
71
72
75
76
78
81 appendDescription(string separator, string new_desc);
82
83
85 hash<DataFieldInfo> getInfo();
86
87
89
92
93
95
98
99
101
103protected:
105public:
106
107};
108};
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
list< auto > allowed_values
for enum fields; raw allowed values
Definition: AbstractDataField.qc.dox.h:55
auto default_value
the default value for the field, if any
Definition: AbstractDataField.qc.dox.h:52
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:206
describes a data type based on a hashdecl
Definition: QoreDataField.qc.dox.h:34
hash< DataFieldInfo > getInfo()
returns information about the field
*string desc
description of the field
Definition: QoreDataField.qc.dox.h:42
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
*string getDescription()
returns the description, if any
constructor(string name, *string desc, AbstractDataProviderType type, auto default_value, *softlist< auto > allowed_values)
creates the field from the arguments
Definition: QoreDataField.qc.dox.h:54
constructor(string name, *string desc, Type type, auto default_value, *softlist< auto > allowed_values)
creates the field from the arguments
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
string name
name of the field
Definition: QoreDataField.qc.dox.h:39
appendDescription(string separator, string new_desc)
adds a string to the description
AbstractDataProviderType type
field type
Definition: QoreDataField.qc.dox.h:45
AbstractDataField getNewFieldType(AbstractDataProviderType new_type)
returns a field with the new type
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27