Loading...
Searching...
No Matches
QoreDataType.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace DataProvider {
public struct NameDescInfo {
string name;
string display_name;
string short_desc;
string desc;
};
class QoreDataType : public AbstractDataProviderType {
public:
protected:
Type type;
string name;
string display_name;
string short_desc;
string desc;
bool soft_type;
bool or_nothing_type;
auto default_value;
hash<string, bool> base_type_hash;
*hash<string, bool> accept_type_hash;
*hash<string, bool> return_type_hash;
*hash<string, bool> accept_type_hash_simple;
*hash<string, bool> return_type_hash_simple;
hash<string, bool> blacklist_type_hash;
const SupportedOptions = ...;
const SoftTypeMap = ...;
public:
constructor(Type type, *hash<auto> options, *hash<auto> tags, auto default_value, *hash<NameDescInfo> attr, *string path) ;
string getName();
string getDisplayName();
string getShortDescription();
string getDesc();
*hash<string, hash<DataProviderTypeOptionInfo>> getSupportedOptions();
*Type getValueType();
*hash<string, bool> getDirectTypeHash();
bool hasDefaultValue();
auto getDefaultValue();
*AbstractDataProviderType getElementType();
auto acceptsValue(auto value);
*hash<string, AbstractDataField> getFields();
hash<string, bool> getAcceptTypeHash(*bool simple);
hash<string, bool> getReturnTypeHash(*bool simple);
hash<DataTypeInfo> getInfo(*bool simple);
AbstractDataProviderType getSoftType();
AbstractDataProviderType getOrNothingType();
AbstractDataProviderType getMandatoryType();
// assigs the object's members after deserialization
private:
deserializeMembers(hash<auto> members);
public:
};
};
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::QoreDataType
describes a data type based on a Qore data type
Definition QoreDataType.qc.dox.h:46
DataProvider::QoreDataType::or_nothing_type
bool or_nothing_type
flag for "or nothing" types
Definition QoreDataType.qc.dox.h:69
DataProvider::QoreDataType::SupportedOptions
const SupportedOptions
supported options
Definition QoreDataType.qc.dox.h:98
DataProvider::QoreDataType::default_value
auto default_value
Default value for type.
Definition QoreDataType.qc.dox.h:72
DataProvider::QoreDataType::getAcceptTypeHash
hash< string, bool > getAcceptTypeHash(*bool simple)
returns a hash of base types accepted by this type; keys are type names
DataProvider::QoreDataType::getReturnTypeHash
hash< string, bool > getReturnTypeHash(*bool simple)
returns a hash of base types returned by this type; keys are type names
DataProvider::QoreDataType::getSupportedOptions
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions()
returns supported options
DataProvider::QoreDataType::hasDefaultValue
bool hasDefaultValue()
! Returns True if this type has a default value
DataProvider::QoreDataType::accept_type_hash_simple
*hash< string, bool > accept_type_hash_simple
hash of base types accepted by this type; keys are simple type names
Definition QoreDataType.qc.dox.h:89
DataProvider::QoreDataType::getOrNothingType
AbstractDataProviderType getOrNothingType()
returns an "or nothing" type equivalent to the current type
DataProvider::QoreDataType::name
string name
The name of the type; if not set then the name of "type" is used instead.
Definition QoreDataType.qc.dox.h:54
DataProvider::QoreDataType::getElementType
*AbstractDataProviderType getElementType()
returns the subtype (for lists or hashes) if there is only one
DataProvider::QoreDataType::getMandatoryType
AbstractDataProviderType getMandatoryType()
Returns a mandatory (i.e. not "or nothing") type equivalent to the current type.
DataProvider::QoreDataType::getDisplayName
string getDisplayName()
Returns the type's display name.
DataProvider::QoreDataType::accept_type_hash
*hash< string, bool > accept_type_hash
hash of base types accepted by this type; keys are type names
Definition QoreDataType.qc.dox.h:83
DataProvider::QoreDataType::display_name
string display_name
The display name for the type.
Definition QoreDataType.qc.dox.h:57
DataProvider::QoreDataType::base_type_hash
hash< string, bool > base_type_hash
hash of base types where no translations are performed; keys are type codes, not names
Definition QoreDataType.qc.dox.h:80
DataProvider::QoreDataType::return_type_hash
*hash< string, bool > return_type_hash
hash of base types returned by this type; keys are type names
Definition QoreDataType.qc.dox.h:86
DataProvider::QoreDataType::type
Type type
the Qore type
Definition QoreDataType.qc.dox.h:51
DataProvider::QoreDataType::getDirectTypeHash
*hash< string, bool > getDirectTypeHash()
returns a hash of native base type code where no translations are performed; keys are type codes,...
DataProvider::QoreDataType::soft_type
bool soft_type
flag for soft types
Definition QoreDataType.qc.dox.h:66
DataProvider::QoreDataType::short_desc
string short_desc
The short plain-text description for the type.
Definition QoreDataType.qc.dox.h:60
DataProvider::QoreDataType::acceptsValue
auto acceptsValue(auto value)
returns the value if the value can be assigned to the type
DataProvider::QoreDataType::getDefaultValue
auto getDefaultValue()
DataProvider::QoreDataType::SoftTypeMap
const SoftTypeMap
map from normal types to soft types
Definition QoreDataType.qc.dox.h:102
DataProvider::QoreDataType::getInfo
hash< DataTypeInfo > getInfo(*bool simple)
returns a description of the type as a hash
DataProvider::QoreDataType::getValueType
*Type getValueType()
returns the base type for the type, if any
DataProvider::QoreDataType::getSoftType
AbstractDataProviderType getSoftType()
returns a "soft" type equivalent to the current type
DataProvider::QoreDataType::desc
string desc
The long description for the type in markdown.
Definition QoreDataType.qc.dox.h:63
DataProvider::QoreDataType::return_type_hash_simple
*hash< string, bool > return_type_hash_simple
hash of base types returned by this type; keys are simple type names
Definition QoreDataType.qc.dox.h:92
DataProvider::QoreDataType::getName
string getName()
returns the type name
DataProvider::QoreDataType::blacklist_type_hash
hash< string, bool > blacklist_type_hash
hash of type codes accepted by the base type but not accepted by this type: code -> True
Definition QoreDataType.qc.dox.h:95
DataProvider::QoreDataType::getDesc
string getDesc()
Returns the description.
DataProvider::QoreDataType::getShortDescription
string getShortDescription()
Returns the type's short description.
DataProvider::QoreDataType::constructor
constructor(Type type, *hash< auto > options, *hash< auto > tags, auto default_value, *hash< NameDescInfo > attr, *string path)
creates the type
DataProvider::QoreDataType::getFields
*hash< string, AbstractDataField > getFields()
returns the fields of the data structure; if any
DataProvider
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
DataProvider::NameDescInfo
Name and description info.
Definition QoreDataType.qc.dox.h:28
DataProvider::NameDescInfo::display_name
string display_name
The display name for the type.
Definition QoreDataType.qc.dox.h:33
DataProvider::NameDescInfo::short_desc
string short_desc
The short plain-text description for the type.
Definition QoreDataType.qc.dox.h:36
DataProvider::NameDescInfo::name
string name
The name of the type.
Definition QoreDataType.qc.dox.h:30
DataProvider::NameDescInfo::desc
string desc
The markdown description for the type.
Definition QoreDataType.qc.dox.h:39