41 hash<string, AbstractDataField>
fields;
describes a data type based on a hashdecl
Definition AbstractDataField.qc.dox.h:74
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
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< auto > options
type options
Definition AbstractDataProviderType.qc.dox.h:152
describes a data type based on a hash
Definition HashDataType.qc.dox.h:36
constructor(string name=AutoHashType.getName(), *hash< auto > options, *hash< auto > tags, *hash< auto > default_value, *hash< NameDescInfo > attr)
creates the object and assigns the name as the type
HashDataType replaceField(AbstractDataField field)
Replaces an existing field with a new definition.
postProcessAddedField(AbstractDataField field)
Post process added fields.
bool manual_default_other_field_type
default other field type set mamnually?
Definition HashDataType.qc.dox.h:48
AbstractDataProviderType getDeepOrNothingType()
Returns an "or nothing" type equivalent to the current type as well as all fields.
HashDataType copyWithFields(hash< string, AbstractDataField > fields)
Copy and set new fields in the copy.
*AbstractDataProviderType getDefaultOtherFieldType()
Returns the default field type for undeclared fields, if any.
bool isAssignableFrom(AbstractDataProviderType t)
Returns True if this type can be assigned from values of the argument type.
hash< string, AbstractDataField > fields
Fields.
Definition HashDataType.qc.dox.h:41
*AbstractDataField getField(string name)
Returns the given field, if present, or NOTHING if not.
HashDataType addField(AbstractDataField field)
Adds a field to the type.
checkConvertOrNothing()
Convert to an "or-nothing" type if all fields are optional.
setDefaultOtherFieldType(*AbstractDataProviderType default_other_field_type)
Sets the default field type for unlisted fields.
bool has_default_other_field_type
if the type requires validation
Definition HashDataType.qc.dox.h:51
addFieldIntern(Qore::Reflection::TypedHashMember mem)
adds a field to the type from a typed hash member
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
constructor(Type base_type, *string name, *hash< auto > options, *hash< auto > tags, *hash< auto > default_value, *hash< NameDescInfo > attr)
creates the object and assigns the name as the given name or the base type's name
addFieldIntern(AbstractDataField field)
adds a field to the type
bool default_value_needs_check
if the default value should be validated
Definition HashDataType.qc.dox.h:54
constructor(Qore::Reflection::TypedHash t, *hash< auto > options, *hash< auto > tags, *hash< auto > default_value, *hash< NameDescInfo > attr)
creates the object from the given TypedHash
AbstractDataProviderType getSoftType()
Returns a "soft" type equivalent to the current type.
HashDataType addOrReplaceField(AbstractDataField field)
Adds or replaces a field with a new definition.
*hash< auto > getDefaultValue()
HashDataType addField(Qore::Reflection::TypedHashMember mem)
Adds a field to the type from a typed hash member.
HashDataType addQoreFields(hash< auto > new_fields)
Adds a set of fields from a hash.
*AbstractDataProviderType default_other_field_type
allow other fields
Definition HashDataType.qc.dox.h:44
auto acceptsValue(auto input_value)
Returns the value if the value can be assigned to the type.
constructor(string name=AutoHashType.getName(), hash< string, AbstractDataField > fields, *hash< auto > options, *hash< auto > tags, *hash< auto > default_value, *hash< NameDescInfo > attr)
creates the object from the given record description and assigns the name as the type
constructor(Type base_type, *string name, hash< string, AbstractDataField > fields, *hash< auto > options, *hash< auto > tags, *hash< auto > default_value, *hash< NameDescInfo > attr)
creates the object and assigns the name as the given name or the base type's name
hash< DataTypeInfo > getInfo(*bool simple)
returns a description of the type as a hash
bool hasDefaultOtherFieldType()
Returns True if the type has a default field type for undeclared fields.
describes a data type based on a Qore data type
Definition QoreDataType.qc.dox.h:46
auto default_value
Default value for type.
Definition QoreDataType.qc.dox.h:72
string name
The name of the type; if not set then the name of "type" is used instead.
Definition QoreDataType.qc.dox.h:54
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27