Qore DataProvider Module Reference 3.0
Loading...
Searching...
No Matches
FileDataType.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
2
3/* FileDataType.qc Copyright (C) 2025 Qore Technologies s.r.o.
4
5 Permission is hereby granted, free of charge, to any person obtaining a
6 copy of this software and associated documentation files (the "Software"),
7 to deal in the Software without restriction, including without limitation
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 and/or sell copies of the Software, and to permit persons to whom the
10 Software is furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 DEALINGS IN THE SOFTWARE.
22*/
23
25namespace DataProvider {
28
31
32public:
34 const Fields = ...;
35
36
39
40
42 const SupportedOptions = ...;
43
44
46 constructor(*hash<auto> options, *hash<auto> tags, *string path) : AbstractDataProviderType(options, {
47 "qore.external_name": "file"
48 } + tags, path) {
49 }
50
52 string getName();
53
54
56
61
62
64
69
70
72 string getDesc();
73
74
76 *Type getValueType();
77
78
81
82
84 *hash<string, AbstractDataField> getFields();
85
86
88 hash<string, bool> getAcceptTypeHash(*bool simple);
89
90
92 hash<string, bool> getReturnTypeHash(*bool simple);
93
94
96
102 auto acceptsValue(auto value);
103
104
106
112 static auto staticAcceptsValue(AbstractDataProviderType type, auto value);
113
115
121
122
124 *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
125
126};
127};
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
*hash< auto > tags
type tags
Definition AbstractDataProviderType.qc.dox.h:155
hash< auto > options
type options
Definition AbstractDataProviderType.qc.dox.h:152
*string path
The type path, if any.
Definition AbstractDataProviderType.qc.dox.h:158
A type that indicates a file.
Definition FileDataType.qc.dox.h:30
string getName()
Returns the type name.
*AbstractDataProviderType getElementType()
Returns the subtype (for lists or hashes) if there is only one.
constructor(*hash< auto > options, *hash< auto > tags, *string path)
creates the field from the argument
Definition FileDataType.qc.dox.h:46
const Fields
File fields.
Definition FileDataType.qc.dox.h:34
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
string getShortDescription()
Returns the type's short description.
*Type getValueType()
Returns the base type for the type, if any.
string getDisplayName()
Returns the type's display name.
hash< string, bool > getAcceptTypeHash(*bool simple)
Returns a hash of types accepted by this type; keys are type names.
AbstractDataProviderType getOrNothingType()
Returns an "or nothing" type equivalent to the current type.
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
hash< string, bool > getReturnTypeHash(*bool simple)
Returns a hash of types returned by this type; keys are type names.
const ExampleMimeTypeList
Example MIME type list.
Definition FileDataType.qc.dox.h:38
const SupportedOptions
File option types.
Definition FileDataType.qc.dox.h:42
static auto staticAcceptsValue(AbstractDataProviderType type, auto value)
returns the value if the value can be assigned to the type
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
string getDesc()
Returns the description.
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
const FileDataType
A type that indicates a file.
Definition FileDataType.qc.dox.h:27