Qore DataProvider Module Reference  1.0.2
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) ;
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 };
DataProvider::QoreStringDataTypeBase::SupportedOrNothingOptions
const SupportedOrNothingOptions
supported "or nothing" options
Definition: QoreStringDataTypeBase.qc.dox.h:54
DataProvider::QoreDataType::SupportedOptions
const SupportedOptions
supported options
Definition: QoreDataType.qc.dox.h:68
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:161
DataProvider::QoreStringDataTypeBase
describes a data type based on a string tyoe with a target encoding option
Definition: QoreStringDataTypeBase.qc.dox.h:36
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:32
DataProvider::QoreStringDataTypeBase::SupportedOptions
const SupportedOptions
supported options
Definition: QoreStringDataTypeBase.qc.dox.h:41
DataProvider::DataProviderTypeOptionInfo
describes type options
Definition: AbstractDataProviderType.qc.dox.h:122
String
const String
DataProvider::QoreStringDataTypeBase::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
DataProvider::QoreStringDataTypeBase::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider::AbstractDataProviderType::options
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:169
DataProvider::QoreStringDataTypeBase::getSoftType
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
DataProvider::QoreStringDataTypeBase::setOptionInternal
setOptionInternal(string opt, auto value)
sets the given option without any validation of the option
DataProvider::AbstractDataProviderType::constructor
constructor()
creates the type
DataProvider::QoreDataType::type
Type type
the Qore type
Definition: QoreDataType.qc.dox.h:42
DataProvider::QoreDataType
describes a data type based on a Qore data type
Definition: QoreDataType.qc.dox.h:37
Int
const Int
Boolean
const Boolean