Qore DataProvider Module Reference 2.7.5
Loading...
Searching...
No Matches
QoreStringDataTypeBase.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
31namespace DataProvider {
33
37
38public:
39protected:
42 "string.encoding": <DataProviderTypeOptionInfo>{
43 "type": Type::String,
44 "desc": "the output encoding when writing to the type",
45 },
46 // the max_size_chars option is to be enforced externally
47 "string.max_size_chars": <DataProviderTypeOptionInfo>{
48 "type": Type::Int,
49 "desc": "the maximum length of the string in characters",
50 },
51 };
52
55 // only used with "or nothing" types
56 "string.empty_to_nothing": <DataProviderTypeOptionInfo>{
57 "type": Type::Boolean,
58 "desc": "if an empty string should be converted to no value",
59 },
60 };
61
62public:
63
65
67 constructor(Type type, *hash<auto> options, *hash<auto> tags) ;
68
69
71
77 auto acceptsValue(auto value);
78
79
81 *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
82
83
85
88
89
91protected:
92 setOptionInternal(string opt, auto value);
93public:
94
95};
96};
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:206
*hash< auto > tags
type tags
Definition: AbstractDataProviderType.qc.dox.h:222
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:219
describes a data type based on a Qore data type
Definition: QoreDataType.qc.dox.h:31
const SupportedOptions
supported options
Definition: QoreDataType.qc.dox.h:62
Type type
the Qore type
Definition: QoreDataType.qc.dox.h:36
describes a data type based on a string tyoe with a target encoding option
Definition: QoreStringDataTypeBase.qc.dox.h:36
setOptionInternal(string opt, auto value)
sets the given option without any validation of the option
const SupportedOrNothingOptions
supported "or nothing" options
Definition: QoreStringDataTypeBase.qc.dox.h:54
constructor(Type type, *hash< auto > options, *hash< auto > tags)
creates the object with the given options
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
const SupportedOptions
supported options
Definition: QoreStringDataTypeBase.qc.dox.h:41
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
describes type options
Definition: AbstractDataProviderType.qc.dox.h:144