AbstractDataField.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 {
public struct DataFieldInfo {
string name;
*string desc;
auto default_value;
hash<DataTypeInfo> type;
};
class AbstractDataField : public Serializable {
public:
protected:
auto default_value;
public:
bool isAssignableFrom(AbstractDataProviderType t);
bool isAssignableFrom(Type t);
bool isList();
bool isMandatory();
auto getOptionValue(string opt);
*hash<auto> getOptions();
*hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
setOption(string opt, auto value);
setOptions(hash<auto> options);
string getTypeName();
setDefaultValue(auto default_value);
auto getDefaultValue();
bool hasType();
auto acceptsValue(auto value);
hash<DataFieldInfo> getInputInfo();
hash<DataFieldInfo> getInfo();
AbstractDataField getSoftType();
AbstractDataField getOrNothingType();
abstract string getName();
abstract *string getDescription();
abstract AbstractDataProviderType getType();
};
};
DataProvider::AbstractDataField::isAssignableFrom
bool isAssignableFrom(Type t)
returns True if this field's type can be assigned from values of the argument type
DataProvider::AbstractDataField::setOption
setOption(string opt, auto value)
sets the given option on the field's type
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:161
DataProvider::AbstractDataField::hasType
bool hasType()
returns True if the field's type is not a wildcard type
DataProvider::AbstractDataField::setDefaultValue
setDefaultValue(auto default_value)
sets the default value for the field
DataProvider::AbstractDataField::getDefaultValue
auto getDefaultValue()
get default value, if any
DataProvider::AbstractDataField
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:49
DataProvider::AbstractDataField::getOptionValue
auto getOptionValue(string opt)
returns the value of the given option on the field's type
DataProvider::AbstractDataField::isAssignableFrom
bool isAssignableFrom(AbstractDataProviderType t)
returns True if this field's type can be assigned from values of the argument type
DataProvider::AbstractDataField::getSoftType
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
DataProvider::AbstractDataField::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:32
DataProvider::DataFieldInfo::desc
*string desc
the description of the field, if available
Definition: AbstractDataField.qc.dox.h:39
DataProvider::AbstractDataField::getInfo
hash< DataFieldInfo > getInfo()
returns information about the field
DataProvider::AbstractDataField::isMandatory
bool isMandatory()
returns True if the field's type must have a value
DataProvider::AbstractDataField::isList
bool isList()
returns True if this field's type is a list
DataProvider::AbstractDataField::getDescription
abstract *string getDescription()
returns the description, if any
DataProvider::AbstractDataField::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options on the field's type
DataProvider::DataFieldInfo::default_value
auto default_value
the default value for the field
Definition: AbstractDataField.qc.dox.h:42
DataProvider::AbstractDataField::getInputInfo
hash< DataFieldInfo > getInputInfo()
returns information about the field as an input field
DataProvider::DataFieldInfo
describes a data type
Definition: AbstractDataField.qc.dox.h:34
DataProvider::AbstractDataField::getTypeName
string getTypeName()
returns the type name
DataProvider::DataFieldInfo::name
string name
the name of the field
Definition: AbstractDataField.qc.dox.h:36
DataProvider::DataFieldInfo::type
hash< DataTypeInfo > type
type info
Definition: AbstractDataField.qc.dox.h:45
DataProvider::AbstractDataField::setOptions
setOptions(hash< auto > options)
sets the given options on the field's type
DataProvider::AbstractDataField::getOrNothingType
AbstractDataField getOrNothingType()
returns a field with an "or nothing" type equivalent to the current type
DataProvider::AbstractDataField::default_value
auto default_value
the default value for the field, if any
Definition: AbstractDataField.qc.dox.h:54
DataProvider::AbstractDataField::getType
abstract AbstractDataProviderType getType()
returns the type of the field
DataProvider::AbstractDataField::getOptions
*hash< auto > getOptions()
returns options set on the field's type
DataProvider::AbstractDataField::getName
abstract string getName()
returns the name of the field