Loading...
Searching...
No Matches
QoreStringDataTypeBase.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// assume local scope for variables, do not use "$" signs
// require type definitions everywhere
// enable all warnings
namespace DataProvider {
class QoreStringDataTypeBase : public QoreDataType {
public:
protected:
const SupportedOptions = QoreDataType::SupportedOptions + {
"string.encoding": <DataProviderTypeOptionInfo>{
"type": Type::String,
"desc": "the output encoding when writing to the type",
},
// the max_size_chars option is to be enforced externally
"string.max_size_chars": <DataProviderTypeOptionInfo>{
"type": Type::Int,
"desc": "the maximum length of the string in characters",
},
};
const SupportedOrNothingOptions = {
// only used with "or nothing" types
"string.empty_to_nothing": <DataProviderTypeOptionInfo>{
"type": Type::Boolean,
"desc": "if an empty string should be converted to no value",
},
};
public:
constructor(Type type, *hash<auto> options, *hash<auto> tags) ;
auto acceptsValue(auto value);
*hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
AbstractDataProviderType getSoftType();
protected:
setOptionInternal(string opt, auto value);
public:
};
};
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:206
DataProvider::AbstractDataProviderType::tags
*hash< auto > tags
type tags
Definition: AbstractDataProviderType.qc.dox.h:222
DataProvider::AbstractDataProviderType::options
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:219
DataProvider::QoreDataType
describes a data type based on a Qore data type
Definition: QoreDataType.qc.dox.h:31
DataProvider::QoreDataType::SupportedOptions
const SupportedOptions
supported options
Definition: QoreDataType.qc.dox.h:62
DataProvider::QoreDataType::type
Type type
the Qore type
Definition: QoreDataType.qc.dox.h:36
DataProvider::QoreStringDataTypeBase
describes a data type based on a string tyoe with a target encoding option
Definition: QoreStringDataTypeBase.qc.dox.h:36
DataProvider::QoreStringDataTypeBase::setOptionInternal
setOptionInternal(string opt, auto value)
sets the given option without any validation of the option
DataProvider::QoreStringDataTypeBase::SupportedOrNothingOptions
const SupportedOrNothingOptions
supported "or nothing" options
Definition: QoreStringDataTypeBase.qc.dox.h:54
DataProvider::QoreStringDataTypeBase::constructor
constructor(Type type, *hash< auto > options, *hash< auto > tags)
creates the object with the given options
DataProvider::QoreStringDataTypeBase::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider::QoreStringDataTypeBase::SupportedOptions
const SupportedOptions
supported options
Definition: QoreStringDataTypeBase.qc.dox.h:41
DataProvider::QoreStringDataTypeBase::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
DataProvider::QoreStringDataTypeBase::getSoftType
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::DataProviderTypeOptionInfo
describes type options
Definition: AbstractDataProviderType.qc.dox.h:144