Qore DataProvider Module Reference  2.7
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 
31 namespace DataProvider {
33 
37 
38 public:
39 protected:
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 
62 public:
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 
91 protected:
92  setOptionInternal(string opt, auto value);
93 public:
94 
95 };
96 };
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:187
*hash< auto > tags
type tags
Definition: AbstractDataProviderType.qc.dox.h:203
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:200
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
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
const String
const Boolean
const Int
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
describes type options
Definition: AbstractDataProviderType.qc.dox.h:125