Qore DataProvider Module Reference  2.1.2
HashDataType.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
25 namespace DataProvider {
28 
36 class HashDataType : public QoreDataType {
37 
38 public:
39 protected:
41  string name;
42 
44  hash<string, AbstractDataField> fields;
45 
48  AbstractDataProviderType::get(AbstractDataProviderType::anyType);
49 
52 
55 
56 public:
57 
59  constructor(string name = AutoHashType.getName(), *hash<auto> options, *hash<auto> tags)
60  ;
61 
62 
64  constructor(Type base_type, *string name, *hash<auto> options, *hash<auto> tags)
65  ;
66 
67 
69 constructor(string name = AutoHashType.getName(), hash<string, AbstractDataField> fields, *hash<auto> options, *hash<auto> tags) ;
70 
71 
74 
75 
77  string getName();
78 
79 
81 
87  auto acceptsValue(auto input_value);
88 
89 
91 
95 
96 
99 
100 
103 
104 
106  *hash<string, AbstractDataField> getFields();
107 
108 
110 
113 
114 
116  hash<DataTypeInfo> getInfo();
117 
118 
120 
123 
124 };
125 };
bool isAssignableFrom(AbstractDataProviderType t)
Returns True if this type can be assigned from values of the argument type.
bool manual_default_other_field_type
default other field type set mamnually?
Definition: HashDataType.qc.dox.h:51
string getName()
Returns the type name.
addField(AbstractDataField field)
adds a field to the type
const False
*hash< auto > tags
type tags
Definition: AbstractDataProviderType.qc.dox.h:118
string name
the name of the type
Definition: HashDataType.qc.dox.h:41
hash< DataTypeInfo > getInfo()
returns a description of the type as a hash
AbstractDataProviderType getSoftType()
Returns a "soft" type equivalent to the current type.
AbstractDataProviderType getOrNothingType()
Returns an "or nothing" type equivalent to the current type.
auto acceptsValue(auto input_value)
Returns the value if the value can be assigned to the type.
static AbstractDataProviderType get(Type type, *hash< auto > options, *hash< auto > tags)
Returns an appropriate object for the given type.
hash< auto > options
type options
Definition: AbstractDataProviderType.qc.dox.h:115
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:105
*AbstractDataProviderType default_other_field_type
allow other fields
Definition: HashDataType.qc.dox.h:47
describes a data type based on a hash
Definition: HashDataType.qc.dox.h:36
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
setDefaultOtherFieldType(*AbstractDataProviderType default_other_field_type)
Sets the default field type for unlisted fields.
hash< string, AbstractDataField > fields
fields
Definition: HashDataType.qc.dox.h:44
bool has_default_other_field_type
if the type requires validation
Definition: HashDataType.qc.dox.h:54
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
*AbstractDataField getField(string name)
Returns the given field, if present, or NOTHING if not.
describes a data type based on a Qore data type
Definition: QoreDataType.qc.dox.h:37