Qore DataProvider Module Reference  2.1.1
HashDataType.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace DataProvider {
28 
33 class HashDataType : public QoreDataType {
34 
35 public:
36 protected:
38  string name;
39 
41  hash<string, AbstractDataField> fields;
42 
45  AbstractDataProviderType::get(AbstractDataProviderType::anyType);
46 
49 
50 public:
51 
53  constructor(string name = AutoHashType.getName(), *hash<auto> options, *hash<auto> tags)
54  ;
55 
56 
58  constructor(Type base_type, *string name, *hash<auto> options, *hash<auto> tags)
59  ;
60 
61 
63 constructor(string name = AutoHashType.getName(), hash<string, AbstractDataField> fields, *hash<auto> options, *hash<auto> tags) ;
64 
65 
68 
69 
71  string getName();
72 
73 
75 
81  auto acceptsValue(auto input_value);
82 
83 
85 
89 
90 
93 
94 
97 
98 
100  *hash<string, AbstractDataField> getFields();
101 
102 
104 
107 
108 
110  hash<DataTypeInfo> getInfo();
111 
112 
114 
117 
118 };
119 };
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:44
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:105
*hash< auto > tags
type tags
Definition: AbstractDataProviderType.qc.dox.h:118
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:115
static AbstractDataProviderType get(Type type, *hash< auto > options, *hash< auto > tags)
Returns an appropriate object for the given type.
describes a data type based on a hash
Definition: HashDataType.qc.dox.h:33
AbstractDataProviderType getOrNothingType()
Returns an "or nothing" type equivalent to the current type.
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
addField(AbstractDataField field)
adds a field to the type
constructor(string name=AutoHashType.getName(), *hash< auto > options, *hash< auto > tags)
creates the object and assigns the name as the type
bool isAssignableFrom(AbstractDataProviderType t)
Returns True if this type can be assigned from values of the argument type.
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
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.
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:48
string getName()
Returns the type name.
AbstractDataProviderType getSoftType()
Returns a "soft" type equivalent to the current type.
string name
the name of the type
Definition: HashDataType.qc.dox.h:38
*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.
hash< DataTypeInfo > getInfo()
returns a description of the type as a hash
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
describes a data type based on a Qore data type
Definition: QoreDataType.qc.dox.h:37
const False
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27