describes a data type based on a hashdecl
Definition AbstractDataField.qc.dox.h:74
bool multiselect
Are allowed values elements of the list's element type that indicate what values the list can have?
Definition AbstractDataField.qc.dox.h:82
AbstractDataField getOrNothingType()
returns a field with an "or nothing" type equivalent to the current type
auto getOptionValue(string opt)
returns the value of the given option on the field's type
*bool allowed_values_creatable
Does the field accept values not defined in allowed_values too?
Definition AbstractDataField.qc.dox.h:88
static string getNameFromDisplayName(string display_name)
Converts a display name into a technical name.
hash< DataFieldInfo > getConfigInfo()
returns information about the field
AbstractDataField setAllowedValues(list< auto > allowed_values, *bool allowed_values_creatable)
Sets allowed values for enum types.
auto getDefaultValue()
get default value, if any
bool getAllowedValuesCreatable()
Get the "allowed values creatable" flag.
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options on the field's type
string getTypeName()
returns the type name
auto default_value
the default value for the field, if any
Definition AbstractDataField.qc.dox.h:79
bool isMandatory()
returns True if the field's type must have a value
AbstractDataField getMandatoryType()
Returns a mandatory (i.e. not "or nothing") field equivalent to the current field.
bool isAssignableFrom(AbstractDataProviderType t)
returns True if this field's type can be assigned from values of the argument type
hash< auto > attr
User-defined custom attributes set on the field.
Definition AbstractDataField.qc.dox.h:107
AbstractDataField setDefaultValue(auto default_value)
sets the default value for the field
abstract *string getDescription()
returns the description, if any
AbstractDataField setAttributes(hash< auto > attr)
Sets custom attributes.
*bool element_allowed_values_creatable
Do elements of the field for list types accept values not defined in element_allowed_values too?
Definition AbstractDataField.qc.dox.h:94
abstract string getName()
returns the name of the field
list< hash< AllowedValueInfo > > allowed_values
for enum fields; raw allowed values
Definition AbstractDataField.qc.dox.h:85
static string getDisplayName(string name)
Converts a technical name into a display name.
bool getElementAllowedValuesCreatable()
Get the "element allowed values creatable" flag.
*hash< auto > getOptions()
returns options set on the field's type
*list< hash< AllowedValueInfo > > getElementAllowedValues()
Get element allowed values.
AbstractDataField setElementAllowedValues(list< auto > element_allowed_values, *bool element_allowed_values_creatable)
Sets allowed values for enum types.
bool isList()
returns True if this field's type is a list
*hash< string, bool > getElementAllowedValueMap()
Get allowed values.
replaceAttributes(*hash< auto > attr)
Replaces all custom attributes.
auto getExampleValue(*hash< string, bool > emap, *string fname)
Returns any example value for the field, otherwise return example data from the type.
hash< DataFieldInfo > getLocalInfo()
Returns information about the field without calling AbstractDataProviderType::getInfo() on the type.
string getDisplayName()
Returns the display name of the field.
AbstractDataField getSoftType()
returns a field with a "soft" type equivalent to the current type
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
hash< string, bool > allowed_values_map
for enum fields; allowed values
Definition AbstractDataField.qc.dox.h:99
static *string getShortDescription(*string desc, *int maxlen)
Converts a long description into a short description.
AbstractDataField setOptions(hash< auto > options)
sets the given options on the field's type
*list< hash< AllowedValueInfo > > element_allowed_values
for enum fields; allowed values for elements for list types
Definition AbstractDataField.qc.dox.h:91
hash< string, bool > element_allowed_values_map
for enum fields; allowed values for elements for list types
Definition AbstractDataField.qc.dox.h:104
bool isMultiselect()
Returns True if the type is a list and the allowed values are allowed values of the list's type.
AbstractDataField setOption(string opt, auto value)
sets the given option on the field's type
hash< DataFieldInfo > getInputInfo()
returns information about the field as an input field
bool isAssignableFrom(Type t)
returns True if this field's type can be assigned from values of the argument type
hash< DataFieldInfo > getInfo()
returns information about the field
*hash< auto > getAttributes()
Returns custom attributes set on the field.
bool hasType()
returns True if the field's type is not a wildcard type
*list< hash< AllowedValueInfo > > getAllowedValues()
Get allowed values.
abstract AbstractDataProviderType getType()
returns the type of the field
*hash< string, bool > getAllowedValueMap()
Get allowed values.
*string getShortDescription()
Returns the short description, if any.
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
describes a data type
Definition AbstractDataField.qc.dox.h:29
*bool allowed_values_creatable
Does the field accept values not defined in allowed_values too?
Definition AbstractDataField.qc.dox.h:55
auto example_value
Any example value for the field.
Definition AbstractDataField.qc.dox.h:46
string name
the name of the field
Definition AbstractDataField.qc.dox.h:31
auto default_value
the default value for the field
Definition AbstractDataField.qc.dox.h:43
bool multiselect
Are allowed values elements of the list's element type that indicate what values the list can have?
Definition AbstractDataField.qc.dox.h:49
hash< DataTypeInfo > type
Type info.
Definition AbstractDataField.qc.dox.h:64
string display_name
The display name of the field.
Definition AbstractDataField.qc.dox.h:34
*list< hash< AllowedValueInfo > > element_allowed_values
for enum fields; allowed values for elements for list types
Definition AbstractDataField.qc.dox.h:58
string unique_key
Unique field identifier.
Definition AbstractDataField.qc.dox.h:67
*hash< auto > attr
User-defined attributes set on the field.
Definition AbstractDataField.qc.dox.h:70
*string desc
the description of the field, if available, with markdown formatting
Definition AbstractDataField.qc.dox.h:40
*string short_desc
The short description of the field in plain text.
Definition AbstractDataField.qc.dox.h:37
*list< hash< AllowedValueInfo > > allowed_values
for enum fields; allowed values
Definition AbstractDataField.qc.dox.h:52
*bool element_allowed_values_creatable
Do elements of the field for list types accept values not defined in element_allowed_values too?
Definition AbstractDataField.qc.dox.h:61