24 #ifndef _QORE_QORETYPE_H
26 #define _QORE_QORETYPE_H
40 DLLEXPORT
extern QoreNumberNode* ZeroNumber, * InfinityNumber, * NaNumber, * piNumber;
42 DLLEXPORT
extern QoreString NothingTypeString, NullTypeString, TrueString,
43 FalseString, EmptyHashString, EmptyListString;
46 DLLEXPORT
extern const QoreTypeInfo* anyTypeInfo,
59 *runTimeClosureTypeInfo,
60 *callReferenceTypeInfo,
62 *userReferenceTypeInfo,
74 *bigIntOrFloatTypeInfo,
76 *bigIntOrNothingTypeInfo,
77 *floatOrNothingTypeInfo,
78 *numberOrNothingTypeInfo,
79 *stringOrNothingTypeInfo,
80 *boolOrNothingTypeInfo,
81 *binaryOrNothingTypeInfo,
82 *objectOrNothingTypeInfo,
83 *dateOrNothingTypeInfo,
84 *hashOrNothingTypeInfo,
85 *listOrNothingTypeInfo,
86 *nullOrNothingTypeInfo,
87 *codeOrNothingTypeInfo,
88 *dataOrNothingTypeInfo,
89 *referenceOrNothingTypeInfo,
91 *softBigIntOrNothingTypeInfo,
92 *softFloatOrNothingTypeInfo,
93 *softNumberOrNothingTypeInfo,
94 *softBoolOrNothingTypeInfo,
95 *softStringOrNothingTypeInfo,
96 *softDateOrNothingTypeInfo,
97 *softListOrNothingTypeInfo,
98 *timeoutOrNothingTypeInfo;
154 enum qore_type_result_e {
164 class ExternalTypeInfo;
170 friend class ExternalTypeInfo;
173 ExternalTypeInfo* typeInfo;
183 DLLEXPORT QoreTypeInfoHelper(
const char* n_tname);
185 DLLEXPORT QoreTypeInfoHelper(
qore_type_t id,
const char* n_tname);
203 DLLEXPORT
int doAcceptError(
bool priv_error,
bool obj,
int param_num,
const char* param_name,
AbstractQoreNode* n,
ExceptionSink* xsink)
const;
222 DLLEXPORT
int testObjectClassAccess(
const QoreObject *obj,
const QoreClass *classtoaccess);
224 DLLEXPORT
const QoreClass *typeInfoGetUniqueReturnClass(
const QoreTypeInfo* typeInfo);
225 DLLEXPORT
bool typeInfoHasType(
const QoreTypeInfo* typeInfo);
226 DLLEXPORT
const char* typeInfoGetName(
const QoreTypeInfo* typeInfo);
227 DLLEXPORT qore_type_result_e typeInfoAcceptsType(
const QoreTypeInfo* typeInfo,
const QoreTypeInfo* otherTypeInfo);
228 DLLEXPORT qore_type_result_e typeInfoReturnsType(
const QoreTypeInfo* typeInfo,
const QoreTypeInfo* otherTypeInfo);
230 #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:44
Qore's floating-point value type, dynamically-allocated only, reference counted.
Definition: QoreFloatNode.h:32
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:41
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:47
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
signed short qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:59
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:42
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:40
DLLEXPORT QoreBoolTrueNode True
Qore's boolean true value.
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:44
Qore's parse tree/value type for date-time values, reference-counted, dynamically-allocated only...
Definition: DateTimeNode.h:36
defines a Qore-language class
Definition: QoreClass.h:186
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:207
DLLEXPORT void ref() const
increments the reference count
the implementation of Qore's object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:56
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:35
DLLEXPORT ~AbstractQoreClassTypeInfoHelper()
delets the QoreClass object managed if it has not been retrieved
helper type to allocate and manage QoreTypeInfo objects (not exported by the library) ...
Definition: QoreType.h:169
virtual DLLEXPORT bool acceptInputImpl(AbstractQoreNode *&n, ExceptionSink *xsink) const
this function must be reimplemented if setInputFilter() is called
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:33
virtual DLLEXPORT ~QoreTypeInfoHelper()
deallocates the managed QoreTypeInfo object
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:102