Qore Mapper Module Reference 1.6.2
Loading...
Searching...
No Matches
Mapper::SomethingDataType Class Reference

describes a data type that accepts any value except NOTHING; stores "string.max_size_chars" as a type attribute for external enforcement More...

Inheritance diagram for Mapper::SomethingDataType:
[legend]

Public Member Functions

auto acceptsValue (auto value)
 returns the value if the value can be assigned to the type
 constructor (*hash< auto > options)
 creates the object
string getName ()
 returns the type name
*Type getValueType ()
 returns the base type for the type, if any
bool isAssignableFrom (AbstractDataProviderType t)
 returns True if this type can be assigned from values of the argument type
bool isAssignableFrom (Type t)
 returns True if this type can be assigned from values of the argument type
Public Member Functions inherited from Mapper::AnythingDataType
auto acceptsValue (auto value)
 returns the value if the value can be assigned to the type
 constructor (*hash< auto > options)
 creates the object
hash< string, bool > getAcceptTypeHash (*bool simple)
 returns a hash of base types accepted by this type
string getDesc ()
 Returns the description.
*AbstractDataProviderType getElementType ()
 returns the subtype (for lists or hashes) if there is only one
*hash< string, AbstractDataField > getFields ()
 returns the fields of the data structure; if any
string getName ()
 returns the type name
hash< string, bool > getReturnTypeHash (*bool simple)
 returns a hash of base types returned by this type
*hash< string, hash< DataProviderTypeOptionInfo > > getSupportedOptions ()
 returns supported options
*Type getValueType ()
 returns the base type for the type, if any
bool isAssignableFrom (AbstractDataProviderType t)
 returns True if this type can be assigned from values of the argument type
bool isAssignableFrom (Type t)
 returns True if this type can be assigned from values of the argument type

Additional Inherited Members

Protected Attributes inherited from Mapper::AnythingDataType
const SupportedOptions = ...
 supports a max_size_chars option for strings; to be enforced externally

Detailed Description

describes a data type that accepts any value except NOTHING; stores "string.max_size_chars" as a type attribute for external enforcement

Member Function Documentation

◆ acceptsValue()

auto Mapper::SomethingDataType::acceptsValue ( auto value)

returns the value if the value can be assigned to the type

Parameters
valuethe value to assign to the type
Returns
the value to be assigned; can be converted by the type
Exceptions
RUNTIME-TYPE-ERRORvalue cannot be assigned to the type