Loading...
Searching...
No Matches
FileDataType.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* FileDataType.qc Copyright (C) 2025 Qore Technologies s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
namespace DataProvider {
const FileDataType = new FileDataType();
class FileDataType : public AbstractDataProviderType {
public:
const Fields = ...;
const ExampleMimeTypeList = ...;
const SupportedOptions = ...;
constructor(*hash<auto> options, *hash<auto> tags, *string path) : AbstractDataProviderType(options, {
"qore.external_name": "file"
} + tags, path) {
}
string getName();
string getDisplayName();
string getShortDescription();
string getDesc();
*Type getValueType();
*AbstractDataProviderType getElementType();
*hash<string, AbstractDataField> getFields();
hash<string, bool> getAcceptTypeHash(*bool simple);
hash<string, bool> getReturnTypeHash(*bool simple);
auto acceptsValue(auto value);
static auto staticAcceptsValue(AbstractDataProviderType type, auto value);
AbstractDataProviderType getOrNothingType();
*hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
};
};
DataProvider::AbstractDataProviderType
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
DataProvider::AbstractDataProviderType::tags
*hash< auto > tags
type tags
Definition AbstractDataProviderType.qc.dox.h:155
DataProvider::AbstractDataProviderType::options
hash< auto > options
type options
Definition AbstractDataProviderType.qc.dox.h:152
DataProvider::AbstractDataProviderType::path
*string path
The type path, if any.
Definition AbstractDataProviderType.qc.dox.h:158
DataProvider::FileDataType
A type that indicates a file.
Definition FileDataType.qc.dox.h:30
DataProvider::FileDataType::getName
string getName()
Returns the type name.
DataProvider::FileDataType::getElementType
*AbstractDataProviderType getElementType()
Returns the subtype (for lists or hashes) if there is only one.
DataProvider::FileDataType::constructor
constructor(*hash< auto > options, *hash< auto > tags, *string path)
creates the field from the argument
Definition FileDataType.qc.dox.h:46
DataProvider::FileDataType::Fields
const Fields
File fields.
Definition FileDataType.qc.dox.h:34
DataProvider::FileDataType::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
DataProvider::FileDataType::getShortDescription
string getShortDescription()
Returns the type's short description.
DataProvider::FileDataType::getValueType
*Type getValueType()
Returns the base type for the type, if any.
DataProvider::FileDataType::getDisplayName
string getDisplayName()
Returns the type's display name.
DataProvider::FileDataType::getAcceptTypeHash
hash< string, bool > getAcceptTypeHash(*bool simple)
Returns a hash of types accepted by this type; keys are type names.
DataProvider::FileDataType::getOrNothingType
AbstractDataProviderType getOrNothingType()
Returns an "or nothing" type equivalent to the current type.
DataProvider::FileDataType::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider::FileDataType::getReturnTypeHash
hash< string, bool > getReturnTypeHash(*bool simple)
Returns a hash of types returned by this type; keys are type names.
DataProvider::FileDataType::ExampleMimeTypeList
const ExampleMimeTypeList
Example MIME type list.
Definition FileDataType.qc.dox.h:38
DataProvider::FileDataType::SupportedOptions
const SupportedOptions
File option types.
Definition FileDataType.qc.dox.h:42
DataProvider::FileDataType::staticAcceptsValue
static auto staticAcceptsValue(AbstractDataProviderType type, auto value)
returns the value if the value can be assigned to the type
DataProvider::FileDataType::getFields
*hash< string, AbstractDataField > getFields()
Returns the fields of the data structure; if any.
DataProvider::FileDataType::getDesc
string getDesc()
Returns the description.
DataProvider
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
DataProvider::FileDataType
const FileDataType
A type that indicates a file.
Definition FileDataType.qc.dox.h:27