| Qore DataProvider Module Reference 1.2.1

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DataProvider::QoreDataField Class Reference

describes a data type based on a hashdecl More...

Inheritance diagram for DataProvider::QoreDataField:
[legend]

## Public Member Functions
| appendDescription (string separator, string new_desc)
| adds a string to the description More...
| constructor (string name, *string desc, Type type, auto default_value)
| creates the field from the arguments
| constructor (string name, *string desc, AbstractDataProviderType type, auto default_value)
| creates the field from the arguments
*string | getDescription ()
| returns the description, if any
hash< DataFieldInfo > | getInfo ()
| returns information about the field
string | getName ()
| returns the name of the field
AbstractDataField | getOrNothingType ()
| returns a field with an "or nothing" type equivalent to the current type More...
AbstractDataField | getSoftType ()
| returns a field with a "soft" type equivalent to the current type More...
AbstractDataProviderType | getType ()
| returns the type of the field
Public Member Functions inherited from DataProvider::AbstractDataField
auto | acceptsValue (auto value)
| returns the value if the value can be assigned to the type More...
auto | getDefaultValue ()
| get default value, if any
hash< DataFieldInfo > | getInfo ()
| returns information about the field
hash< DataFieldInfo > | getInputInfo ()
| returns information about the field as an input field More...
*hash< auto > | getOptions ()
| returns options set on the field's type
auto | getOptionValue (string opt)
| returns the value of the given option on the field's type
AbstractDataField | getOrNothingType ()
| returns a field with an "or nothing" type equivalent to the current type More...
AbstractDataField | getSoftType ()
| returns a field with a "soft" type equivalent to the current type More...
*hash< string, hash< DataProviderTypeOptionInfo > > | getSupportedOptions ()
| returns supported options on the field's type
string | getTypeName ()
| returns the type name
bool | hasType ()
| returns True if the field's type is not a wildcard type
bool | isAssignableFrom (AbstractDataProviderType t)
| returns True if this field's type can be assigned from values of the argument type
bool | isAssignableFrom (Type t)
| returns True if this field's type can be assigned from values of the argument type
bool | isList ()
| returns True if this field's type is a list
bool | isMandatory ()
| returns True if the field's type must have a value
| setDefaultValue (auto default_value)
| sets the default value for the field
| setOption (string opt, auto value)
| sets the given option on the field's type More...
| setOptions (hash< auto > options)
| sets the given options on the field's type More...

## Protected Member Functions
AbstractDataField | getNewFieldType (AbstractDataProviderType new_type)
| returns a field with the new type More...

## Protected Attributes
*string | desc
| description of the field
string | name
| name of the field
AbstractDataProviderType | type
| field type
Protected Attributes inherited from DataProvider::AbstractDataField
auto | default_value
| the default value for the field, if any

## Detailed Description

describes a data type based on a hashdecl

## Member Function Documentation

## ◆ appendDescription()

DataProvider::QoreDataField::appendDescription | ( | string | separator,
|  | string | new_desc
| ) |  |

adds a string to the description

Parameters

  separator | string to add first if there is already a description
  new_desc | the new string to add to the description

## ◆ getNewFieldType()

AbstractDataField DataProvider::QoreDataField::getNewFieldType | ( | AbstractDataProviderType | new_type | ) |
| protected

returns a field with the new type

Returns
  a field with the new type

## ◆ getOrNothingType()

AbstractDataField DataProvider::QoreDataField::getOrNothingType | ( |  | ) |

returns a field with an "or nothing" type equivalent to the current type

Returns
  a field with an "or nothing" type equivalent to the current type

## ◆ getSoftType()

AbstractDataField DataProvider::QoreDataField::getSoftType | ( |  | ) |

returns a field with a "soft" type equivalent to the current type

Returns
  a field with a "soft" type equivalent to the current type