Qore Programming Language  1.12.2
QoreReflection.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QoreExternalConstant
 external wrapper class for constants More...
 
class  QoreExternalMemberBase
 external wrapper base class for class and hashdecl members More...
 
class  QoreExternalMemberVarBase
 external wrapper base class for class members More...
 
class  QoreExternalMethodVariant
 external wrapper class for method variants More...
 
class  QoreExternalNormalMember
 external wrapper base class for class normal members More...
 
class  QoreExternalProgramLocation
 external wrapper class for source code location information More...
 
class  QoreExternalStaticMember
 external wrapper base class for class static members More...
 
class  QoreExternalVariant
 external wrapper class for function and call variants More...
 

Functions

DLLEXPORT QoreValue qore_type_assign_value (const QoreTypeInfo *t, const QoreValue value, ExceptionSink *xsink)
 processes the given value by the given type and returns the result; a Qore-language exception is thrown if the value is not assignable to the type More...
 
DLLEXPORT bool qore_type_can_convert_to_scalar (const QoreTypeInfo *ti)
 returns true if the type's value can be converted to a scalar; the argument may be nullptr meaning no type restrictions
 
DLLEXPORT bool qore_type_equal (const QoreTypeInfo *ti1, const QoreTypeInfo *ti2)
 returns true if the types are equal; either argument may be nullptr meaning no type restrictions
 
DLLEXPORT QoreHashNodeqore_type_get_accept_types (const QoreTypeInfo *t)
 returns a hash of base types accepted by the type More...
 
DLLEXPORT qore_type_t qore_type_get_base_type (const QoreTypeInfo *t)
 returns the base type code for the type or NT_ALL for those that don't have types More...
 
DLLEXPORT QoreValue qore_type_get_default_value (const QoreTypeInfo *ti)
 returns the default value of the type (if any); the caller owns any reference returned; the argument may be nullptr meaning no type restrictions
 
DLLEXPORT const char * qore_type_get_name (const QoreTypeInfo *ti)
 returns the name of the type; the argument may be nullptr meaning no type restrictions
 
DLLEXPORT const char * qore_type_get_path (const QoreTypeInfo *ti)
 returns the full namespace path of the type; the argument may be nullptr meaning no type restrictions More...
 
DLLEXPORT QoreHashNodeqore_type_get_return_types (const QoreTypeInfo *t)
 returns a hash of base types returned by the type More...
 
DLLEXPORT bool qore_type_has_default_value (const QoreTypeInfo *ti)
 returns true if the type has a default value; the argument may be nullptr meaning no type restrictions
 
DLLEXPORT int qore_type_is_assignable_from (const QoreTypeInfo *t, QoreValue value)
 returns true if the given type can be assigned from the given value More...
 
DLLEXPORT bool qore_type_is_assignable_from (const QoreTypeInfo *ti1, const QoreTypeInfo *ti2)
 returns true if ti2's return type is compatible with ti1 input (i.e. ti1 is assignable from ti2) More...
 
DLLEXPORT bool qore_type_is_assignable_from (const QoreTypeInfo *ti1, const QoreTypeInfo *ti2, bool &may_not_match)
 returns true if ti2's return type is compatible with ti1 input (i.e. ti1 is assignable from ti2) More...
 
DLLEXPORT bool qore_type_is_input_output_compatible (const QoreTypeInfo *ti1, const QoreTypeInfo *ti2)
 returns true if the types are compatible with inputs and outputs
 
DLLEXPORT bool qore_type_is_output_compatible (const QoreTypeInfo *ti1, const QoreTypeInfo *ti2)
 returns true if ti2's return type is compatible with ti1's; either argument may be nullptr meaning no type restrictions
 

Detailed Description

external reflection API definitions

Function Documentation

◆ qore_type_assign_value()

DLLEXPORT QoreValue qore_type_assign_value ( const QoreTypeInfo *  t,
const QoreValue  value,
ExceptionSink xsink 
)

processes the given value by the given type and returns the result; a Qore-language exception is thrown if the value is not assignable to the type

Since
Qore 0.9.4

◆ qore_type_get_accept_types()

DLLEXPORT QoreHashNode* qore_type_get_accept_types ( const QoreTypeInfo *  t)

returns a hash of base types accepted by the type

Since
Qore 0.9.4

◆ qore_type_get_base_type()

DLLEXPORT qore_type_t qore_type_get_base_type ( const QoreTypeInfo *  t)

returns the base type code for the type or NT_ALL for those that don't have types

Since
Qore 0.9.4

◆ qore_type_get_path()

DLLEXPORT const char* qore_type_get_path ( const QoreTypeInfo *  ti)

returns the full namespace path of the type; the argument may be nullptr meaning no type restrictions

Since
Qore 1.0

◆ qore_type_get_return_types()

DLLEXPORT QoreHashNode* qore_type_get_return_types ( const QoreTypeInfo *  t)

returns a hash of base types returned by the type

Since
Qore 0.9.4

◆ qore_type_is_assignable_from() [1/3]

DLLEXPORT int qore_type_is_assignable_from ( const QoreTypeInfo *  t,
QoreValue  value 
)

returns true if the given type can be assigned from the given value

Parameters
tthe type to check assignability to
valuethe value to check if it can be assigned to t
Returns
a type match code for the assignability

The type argument t may be nullptr meaning no type restrictions

Since
Qore 0.9.4

◆ qore_type_is_assignable_from() [2/3]

DLLEXPORT bool qore_type_is_assignable_from ( const QoreTypeInfo *  ti1,
const QoreTypeInfo *  ti2 
)

returns true if ti2's return type is compatible with ti1 input (i.e. ti1 is assignable from ti2)

Parameters
ti1the type to check assignability to
ti2the type to see if it can be assigned to ti1
Returns
true if ti2's return type is compatible with ti1 input (i.e. ti1 is assignable from ti2)

either argument may be nullptr meaning no type restrictions

Since
Qore 0.9.4

◆ qore_type_is_assignable_from() [3/3]

DLLEXPORT bool qore_type_is_assignable_from ( const QoreTypeInfo *  ti1,
const QoreTypeInfo *  ti2,
bool &  may_not_match 
)

returns true if ti2's return type is compatible with ti1 input (i.e. ti1 is assignable from ti2)

Parameters
ti1the type to check assignability to
ti2the type to see if it can be assigned to ti1
may_not_matchan output variable, if true then the assignment is not guaranteed to succeed and may fail at runtime
Returns
true if ti2's return type is compatible with ti1 input (i.e. ti1 is assignable from ti2)

either argument may be nullptr meaning no type restrictions

Since
Qore 0.9.4