100 *hash<string, hash<DataFieldInfo>>
fields;
142 static Type nothingType = Reflection::NothingType;
143 static Type anyType = Reflection::AutoType;
456thread_local hash<string, bool>
rimap;
describes a data type based on a hashdecl
Definition AbstractDataField.qc.dox.h:74
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
abstract hash< string, bool > getReturnTypeHash(*bool simple)
Returns a hash of types returned by this type; keys are type names.
bool hasType()
Returns True if the type is not a wildcard type.
setDynamicTag()
Sets the dynamic tag on the type.
int getBaseTypeCode()
Returns the base type code for the type.
static AbstractDataProviderType get(Type type, *hash< auto > options, *hash< auto > tags, auto default_value, *hash< NameDescInfo > attr)
Returns an appropriate object for the given type.
*hash< auto > tags
type tags
Definition AbstractDataProviderType.qc.dox.h:155
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
Returns supported options.
bool isAssignableFrom(AbstractDataProviderType t)
Returns True if this type can be assigned from values of the argument type.
*AbstractDataProviderType getFieldType(string field_name)
get the given field type if it exists, otherwise return nothing
hash< auto > options
type options
Definition AbstractDataProviderType.qc.dox.h:152
hash< DataTypeInfo > getInputInfo(*bool simple)
Returns a description of the type as an input type.
*hash< string, bool > getDirectTypeHash()
Returns a hash of native base type code keys where no translations are performed; keys are type codes...
clearPath()
Clears the type path for the type.
static AbstractDataProviderType get(hash< DataTypeInfo > info)
Returns an appropriate object for the given type description.
bool hasDefaultValue()
! Returns True if this type has a default value
bool isAssignableFrom(Type t)
Returns True if this type can be assigned from values of the argument type.
abstract *AbstractDataProviderType getElementType()
Returns the subtype (for lists or hashes) if there is only one.
*string getPath()
Returns the type path in the type cache, if any.
bool isMandatory()
Returns True if the type must have a value.
abstract *hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
bool isList()
Returns True if this type is a list.
string getBaseTypeName()
Returns the base type name for the type; must be a standard Qore base type name.
bool isOrNothingType()
Returns True if the type also accepts nothing.
*hash< auto > getTags()
Returns tags set on the type.
*hash< auto > getPublicOptions()
Returns options with the publish flag set on the type.
const DefaultDesc
Default description.
Definition AbstractDataProviderType.qc.dox.h:148
string getDisplayName()
Returns the type's display name.
abstract hash< string, bool > getAcceptTypeHash(*bool simple)
Returns a hash of types accepted by this type; keys are type names.
abstract auto acceptsValue(auto value)
Returns the value if the value can be assigned to the type.
static AbstractDataProviderType get(string typename, *hash< auto > options)
Returns an appropriate object for the given type.
AbstractDataProviderType getOrNothingType()
Returns an "or nothing" type equivalent to the current type.
abstract string getName()
Returns the type name.
string getShortDescription()
Returns the type's short description.
setOptionIntern(string opt, auto value)
sets the given option without any validation of the option
setOptions(hash< auto > options)
sets options on the type
*string path
The type path, if any.
Definition AbstractDataProviderType.qc.dox.h:158
abstract *Type getValueType()
Returns the base type for the type, if any.
constructor(string path)
creates the type
auto getExampleValue(*hash< string, bool > emap, *string fname)
Returns any example value for type, if any.
*hash< string, hash< DataFieldInfo > > getFieldInfo()
Returns information on fields supported.
*AbstractDataField getField(string field_name)
Returns the given field, if present, or nothing if not.
constructor(*hash< auto > options, hash< auto > tags, *string path)
creates the type and sets options
*hash< auto > getOptions()
Returns options set on the type.
setPath(string path)
Sets the type path for the type.
constructor()
creates the type
AbstractDataProviderType getSoftType()
Returns a "soft" type equivalent to the current type.
setOption(string opt, auto value)
sets the given option on the type
AbstractDataProviderType getMandatoryType()
Returns a mandatory (i.e. not "or nothing") type equivalent to the current type.
auto getOptionValue(string opt)
Returns the value of the given option.
hash< DataTypeInfo > getInfo(*bool simple)
Returns a description of the type as a hash.
auto getTag(string tag)
Returns the value of the given tag.
constructor(hash< auto > options, *hash< auto > tags, *string path)
creates the type and sets options
string getDesc()
Returns the description.
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
const DataTypeMap
Maps Qore type name constant values to data type objects.
Definition AbstractDataProviderType.qc.dox.h:45
const OptimalQoreDataTypeMap
maps Qore type name constant values from the Type namespace to optimal Qore types names
Definition AbstractDataProviderType.qc.dox.h:35
const TypeCodeMap
maps type codes to type names
Definition AbstractDataProviderType.qc.dox.h:29
const AbstractDataProviderTypeMap
Maps Qore type name constant values to AbstractDataProviderType values.
Definition AbstractDataProviderType.qc.dox.h:49
const OptimalQoreSoftDataTypeMap
maps Qore type name constant values from the Type namespace to optimal Qore types names
Definition AbstractDataProviderType.qc.dox.h:41
Private definitions.
Definition AbstractDataProviderType.qc.dox.h:454
thread_local hash< string, bool > rimap
Recursive info map: unique key -> True.
Definition AbstractDataProviderType.qc.dox.h:456
describes type options
Definition AbstractDataProviderType.qc.dox.h:53
bool publish
Flag to publish the option as a `type_option`.
Definition AbstractDataProviderType.qc.dox.h:61
string desc
the description of the option
Definition AbstractDataProviderType.qc.dox.h:58
string type
the option value type
Definition AbstractDataProviderType.qc.dox.h:55
describes a data type
Definition AbstractDataProviderType.qc.dox.h:65
*hash< auto > options
Output: current transformation option values.
Definition AbstractDataProviderType.qc.dox.h:85
*hash< auto > tags
Any tags set on the type.
Definition AbstractDataProviderType.qc.dox.h:121
string short_desc
A short description for the type, plain text formatting.
Definition AbstractDataProviderType.qc.dox.h:73
*hash< DataTypeInfo > default_field_type_info
Default type for fields not listed in fields.
Definition AbstractDataProviderType.qc.dox.h:112
*string path
The type path in the type cache, if known.
Definition AbstractDataProviderType.qc.dox.h:79
bool recursive
Recursive flag.
Definition AbstractDataProviderType.qc.dox.h:118
*hash< string, hash< DataProviderTypeOptionInfo > > supported_options
Output: transformation options supported by the type.
Definition AbstractDataProviderType.qc.dox.h:82
bool can_manage_fields
If fields can be added dynamically to the type and if the type will accept any field at runtime.
Definition AbstractDataProviderType.qc.dox.h:109
*hash< string, hash< DataFieldInfo > > fields
Any fields supported by the type; will be NOTHING when recursive is True.
Definition AbstractDataProviderType.qc.dox.h:100
bool mandatory
Output: can be null / missing?
Definition AbstractDataProviderType.qc.dox.h:91
*hash< DataTypeInfo > element_type
A type description of any element type.
Definition AbstractDataProviderType.qc.dox.h:103
list< string > types_returned
Input: list of types returned.
Definition AbstractDataProviderType.qc.dox.h:97
string display_name
The display name for the type.
Definition AbstractDataProviderType.qc.dox.h:70
string unique_key
Unique type identifier.
Definition AbstractDataProviderType.qc.dox.h:115
string desc
The description of the type.
Definition AbstractDataProviderType.qc.dox.h:76
string base_type
Output: base type.
Definition AbstractDataProviderType.qc.dox.h:88
list< string > types_accepted
Output: list of types accepted.
Definition AbstractDataProviderType.qc.dox.h:94
auto default_value
The default value for the type.
Definition AbstractDataProviderType.qc.dox.h:106
string name
The name of the type.
Definition AbstractDataProviderType.qc.dox.h:67