Loading...
Searching...
No Matches
HashDataType.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace DataProvider {
class HashDataType : public QoreDataType {
public:
protected:
string name;
hash<string, AbstractDataField> fields;
*AbstractDataProviderType default_other_field_type =
AbstractDataProviderType::get(AbstractDataProviderType::anyType);
bool manual_default_other_field_type = False;
bool has_default_other_field_type = False;
public:
constructor(string name = AutoHashType.getName(), *hash<auto> options, *hash<auto> tags)
;
constructor(Type base_type, *string name, *hash<auto> options, *hash<auto> tags)
;
constructor(string name = AutoHashType.getName(), hash<string, AbstractDataField> fields, *hash<auto> options,
*hash<auto> tags) ;
setDefaultOtherFieldType(*AbstractDataProviderType default_other_field_type);
bool hasDefaultOtherFieldType();
*AbstractDataProviderType getDefaultOtherFieldType();
string getName();
auto acceptsValue(auto input_value);
bool isAssignableFrom(AbstractDataProviderType t);
HashDataType addField(AbstractDataField field);
*AbstractDataField getField(string name);
*hash<string, AbstractDataField> getFields();
AbstractDataProviderType getSoftType();
hash<DataTypeInfo> getInfo();
AbstractDataProviderType getOrNothingType();
};
};
DataProvider::AbstractDataField
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:187
DataProvider::AbstractDataProviderType::tags
*hash< auto > tags
type tags
Definition: AbstractDataProviderType.qc.dox.h:203
DataProvider::AbstractDataProviderType::options
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:200
DataProvider::AbstractDataProviderType::get
static AbstractDataProviderType get(Type type, *hash< auto > options, *hash< auto > tags)
Returns an appropriate object for the given type.
DataProvider::HashDataType
describes a data type based on a hash
Definition: HashDataType.qc.dox.h:36
DataProvider::HashDataType::getOrNothingType
AbstractDataProviderType getOrNothingType()
Returns an "or nothing" type equivalent to the current type.
DataProvider::HashDataType::manual_default_other_field_type
bool manual_default_other_field_type
default other field type set mamnually?
Definition: HashDataType.qc.dox.h:51
DataProvider::HashDataType::constructor
constructor(string name=AutoHashType.getName(), hash< string, AbstractDataField > fields, *hash< auto > options, *hash< auto > tags)
creates the object from the given record description and assigns the name as the type
DataProvider::HashDataType::getDefaultOtherFieldType
*AbstractDataProviderType getDefaultOtherFieldType()
Returns the default field type for undeclared fields, if any.
DataProvider::HashDataType::constructor
constructor(string name=AutoHashType.getName(), *hash< auto > options, *hash< auto > tags)
creates the object and assigns the name as the type
DataProvider::HashDataType::isAssignableFrom
bool isAssignableFrom(AbstractDataProviderType t)
Returns True if this type can be assigned from values of the argument type.
DataProvider::HashDataType::fields
hash< string, AbstractDataField > fields
fields
Definition: HashDataType.qc.dox.h:44
DataProvider::HashDataType::getField
*AbstractDataField getField(string name)
Returns the given field, if present, or NOTHING if not.
DataProvider::HashDataType::addField
HashDataType addField(AbstractDataField field)
adds a field to the type
DataProvider::HashDataType::setDefaultOtherFieldType
setDefaultOtherFieldType(*AbstractDataProviderType default_other_field_type)
Sets the default field type for unlisted fields.
DataProvider::HashDataType::has_default_other_field_type
bool has_default_other_field_type
if the type requires validation
Definition: HashDataType.qc.dox.h:54
DataProvider::HashDataType::getName
string getName()
Returns the type name.
DataProvider::HashDataType::getInfo
hash< DataTypeInfo > getInfo()
returns a description of the type as a hash
DataProvider::HashDataType::getFields
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
DataProvider::HashDataType::getSoftType
AbstractDataProviderType getSoftType()
Returns a "soft" type equivalent to the current type.
DataProvider::HashDataType::name
string name
the name of the type
Definition: HashDataType.qc.dox.h:41
DataProvider::HashDataType::default_other_field_type
*AbstractDataProviderType default_other_field_type
allow other fields
Definition: HashDataType.qc.dox.h:47
DataProvider::HashDataType::acceptsValue
auto acceptsValue(auto input_value)
Returns the value if the value can be assigned to the type.
DataProvider::HashDataType::hasDefaultOtherFieldType
bool hasDefaultOtherFieldType()
Returns True if the type has a default field type for undeclared fields.
DataProvider::HashDataType::constructor
constructor(Type base_type, *string name, *hash< auto > options, *hash< auto > tags)
creates the object and assigns the name as the given name or the base type's name
DataProvider::QoreDataType
describes a data type based on a Qore data type
Definition: QoreDataType.qc.dox.h:31
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27