| Qore DataProvider Module Reference 2.7.1

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
32 namespace DataProvider {
34 class QoreDataField : public AbstractDataField {
35
36 public:
37 protected:
39 string name;
40
42 *string desc;
43
45 AbstractDataProviderType type;
46
47 public:
48
50 constructor(string name, *string desc, Type type, auto default_value, *softlist<auto> allowed_values);
51
52
54 constructor(string name, *string desc, AbstractDataProviderType type, auto default_value,
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
74 AbstractDataProviderType getType();
75
76
78
81 appendDescription(string separator, string new_desc);
82
83
85 hash<DataFieldInfo> getInfo();
86
87
89
91 AbstractDataField getSoftType();
92
93
95
97 AbstractDataField getOrNothingType();
98
99
101
103 protected:
104 AbstractDataField getNewFieldType(AbstractDataProviderType new_type);
105 public:
106
107 };
108 };
DataProvider::AbstractDataField
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
DataProvider::AbstractDataField::allowed_values
list< auto > allowed_values
for enum fields; raw allowed values
Definition: AbstractDataField.qc.dox.h:55
DataProvider::AbstractDataField::default_value
auto default_value
the default value for the field, if any
Definition: AbstractDataField.qc.dox.h:52
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:187
DataProvider::QoreDataField
describes a data type based on a hashdecl
Definition: QoreDataField.qc.dox.h:34
DataProvider::QoreDataField::desc
*string desc
description of the field
Definition: QoreDataField.qc.dox.h:42
DataProvider::QoreDataField::getType
AbstractDataProviderType getType()
returns the type of the field
DataProvider::QoreDataField::getInfo
hash< DataFieldInfo > getInfo()
returns information about 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::getDescription
*string getDescription()
returns the description, if any
DataProvider::QoreDataField::constructor
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
DataProvider::QoreDataField::constructor
constructor(string name, *string desc, Type type, auto default_value, *softlist< auto > allowed_values)
creates the field from the arguments
DataProvider::QoreDataField::getSoftType
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
DataProvider::QoreDataField::name
string name
name of the field
Definition: QoreDataField.qc.dox.h:39
DataProvider::QoreDataField::appendDescription
appendDescription(string separator, string new_desc)
adds a string to the description
DataProvider::QoreDataField::type
AbstractDataProviderType type
field type
Definition: QoreDataField.qc.dox.h:45
DataProvider::QoreDataField::getNewFieldType
AbstractDataField getNewFieldType(AbstractDataProviderType new_type)
returns a field with the new type
exists
bool exists(...)
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27