32 #ifndef _QORE_QORETYPE_H
34 #define _QORE_QORETYPE_H
48 DLLEXPORT
extern QoreNumberNode* ZeroNumber, * InfinityNumber, * NaNumber, * piNumber;
50 DLLEXPORT
extern QoreString NothingTypeString, NullTypeString, TrueString,
51 FalseString, EmptyHashString, EmptyListString;
54 DLLEXPORT
extern const QoreTypeInfo* anyTypeInfo,
67 *runTimeClosureTypeInfo,
68 *callReferenceTypeInfo,
70 *userReferenceTypeInfo,
82 *bigIntOrFloatTypeInfo,
84 *bigIntOrNothingTypeInfo,
85 *floatOrNothingTypeInfo,
86 *numberOrNothingTypeInfo,
87 *stringOrNothingTypeInfo,
88 *boolOrNothingTypeInfo,
89 *binaryOrNothingTypeInfo,
90 *objectOrNothingTypeInfo,
91 *dateOrNothingTypeInfo,
92 *hashOrNothingTypeInfo,
93 *listOrNothingTypeInfo,
94 *nullOrNothingTypeInfo,
95 *codeOrNothingTypeInfo,
96 *dataOrNothingTypeInfo,
97 *referenceOrNothingTypeInfo,
99 *softBigIntOrNothingTypeInfo,
100 *softFloatOrNothingTypeInfo,
101 *softNumberOrNothingTypeInfo,
102 *softBoolOrNothingTypeInfo,
103 *softStringOrNothingTypeInfo,
104 *softDateOrNothingTypeInfo,
105 *softListOrNothingTypeInfo,
106 *timeoutOrNothingTypeInfo;
115 DLLEXPORT
bool q_compare_soft(
const QoreValue l,
const QoreValue r,
ExceptionSink* xsink);
166 enum qore_type_result_e {
176 class ExternalTypeInfo;
183 friend class ExternalTypeInfo;
186 ExternalTypeInfo* typeInfo;
196 DLLEXPORT QoreTypeInfoHelper(
const char* n_tname);
198 DLLEXPORT QoreTypeInfoHelper(
qore_type_t id,
const char* n_tname);
216 DLLEXPORT
int doAcceptError(
bool priv_error,
bool obj,
int param_num,
const char* param_name,
AbstractQoreNode* n,
ExceptionSink* xsink)
const;
235 DLLEXPORT
int testObjectClassAccess(
const QoreObject *obj,
const QoreClass *classtoaccess);
237 DLLEXPORT
const QoreClass *typeInfoGetUniqueReturnClass(
const QoreTypeInfo* typeInfo);
238 DLLEXPORT
bool typeInfoHasType(
const QoreTypeInfo* typeInfo);
239 DLLEXPORT
const char* typeInfoGetName(
const QoreTypeInfo* typeInfo);
240 DLLEXPORT qore_type_result_e typeInfoAcceptsType(
const QoreTypeInfo* typeInfo,
const QoreTypeInfo* otherTypeInfo);
241 DLLEXPORT qore_type_result_e typeInfoReturnsType(
const QoreTypeInfo* typeInfo,
const QoreTypeInfo* otherTypeInfo);
243 #endif // _QORE_QORETYPE_H
DLLEXPORT AbstractQoreClassTypeInfoHelper(const char *name, int n_domain=QDOM_DEFAULT)
allocates a QoreTypeInfo object and creates the QoreClass
Qore's arbitrary-precision number value type, dynamically-allocated only, reference counted...
Definition: QoreNumberNode.h:52
Qore's floating-point value type, dynamically-allocated only, reference counted.
Definition: QoreFloatNode.h:40
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns a pointer to the object
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:49
DLLEXPORT QoreBoolFalseNode False
Qore's boolean false value.
DLLEXPORT QoreClass * getClass()
returns the QoreClass object created and zeros out the class ptr; can only be called once ...
DLLEXPORT bool hasClass() const
returns true if this object is holding a class pointer, false if not
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:55
DLLEXPORT void setIntMatch()
set a flag so that any NT_INT in an accept list will match any type with is_int set with QTI_AMBIGUOU...
DLLEXPORT void setInt()
set a flag that means the type is equivalent to an integer
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:82
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50
DLLEXPORT QoreBoolTrueNode True
Qore's boolean true value.
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
virtual DLLEXPORT bool acceptInputImpl(QoreValue &n, ExceptionSink *xsink) const
this function must be reimplemented if setInputFilter() is called
Qore's parse tree/value type for date-time values, reference-counted, dynamically-allocated only...
Definition: DateTimeNode.h:44
defines a Qore-language class
Definition: QoreClass.h:195
DLLEXPORT void assign(qore_type_t id)
assigns the typeid to the object
DLLEXPORT void setInputFilter()
set a flag that means that acceptInputImpl() has been reimplemented and should be used ...
DLLEXPORT void setInexactReturn()
set a flag that means that if the return type is matched on input, it matches with QTI_AMBIGUOUS inst...
note that the QoreClass object created by this class must be deleted externally
Definition: QoreType.h:220
DLLEXPORT void ref() const
increments the reference count
the implementation of Qore's object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:64
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:43
DLLEXPORT ~AbstractQoreClassTypeInfoHelper()
delets the QoreClass object managed if it has not been retrieved
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:68
helper type to allocate and manage QoreTypeInfo objects (not exported by the library) ...
Definition: QoreType.h:182
DLLEXPORT void addAcceptsType(const QoreTypeInfo *n_typeInfo)
add another type that the type accepts
this class implements Qore's 64-bit integer data type, reference-counted, dynamically-allocated only ...
Definition: QoreBigIntNode.h:41
virtual DLLEXPORT ~QoreTypeInfoHelper()
deallocates the managed QoreTypeInfo object
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:137