Qore DataProvider Module Reference 3.0
Loading...
Searching...
No Matches
FileOrNothingDataType.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
2
3/* FileOrNothingDataType.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 constructor(*hash<auto> options, *hash<auto> tags, *string path) : AbstractDataProviderType(options, {
35 // this is the name without the leading asterisk - equivalent to the base type name
36 "qore.external_name": "file"
37 } + tags, path) {
38 }
39
41 string getName();
42
43
45
50
51
53
58
59
61 string getDesc();
62
63
65 *Type getValueType();
66
67
70
71
73 *hash<string, AbstractDataField> getFields();
74
75
77 hash<string, bool> getAcceptTypeHash(*bool simple);
78
79
81 hash<string, bool> getReturnTypeHash(*bool simple);
82
83
85
91 auto acceptsValue(auto value);
92
93
95
101
102
104 *hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
105
106};
107};
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 FileOrNothingDataType.qc.dox.h:30
*Type getValueType()
Returns the base type for the type, if any.
AbstractDataProviderType getMandatoryType()
Returns a mandatory (i.e. not "or nothing") type equivalent to the current type.
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
constructor(*hash< auto > options, *hash< auto > tags, *string path)
creates the field from the argument
Definition FileOrNothingDataType.qc.dox.h:34
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
string getDisplayName()
Returns the type's display name.
string getDesc()
Returns the description.
string getShortDescription()
Returns the type's short description.
hash< string, bool > getAcceptTypeHash(*bool simple)
Returns a hash of types accepted by this type; keys are type names.
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
string getName()
Returns the type name.
hash< string, bool > getReturnTypeHash(*bool simple)
Returns a hash of types returned by this type; keys are type names.
*AbstractDataProviderType getElementType()
Returns the subtype (for lists or hashes) if there is only one.
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
const FileOrNothingDataType
A type that indicates a file.
Definition FileOrNothingDataType.qc.dox.h:27