00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _QORE_QORETYPE_H
00024
00025 #define _QORE_QORETYPE_H
00026
00027 #include <qore/common.h>
00028 #include <qore/node_types.h>
00029
00030 #include <map>
00031
00032
00033 DLLEXPORT extern QoreListNode *emptyList;
00034 DLLEXPORT extern QoreHashNode *emptyHash;
00035 DLLEXPORT extern QoreStringNode *NullString;
00036 DLLEXPORT extern DateTimeNode *ZeroDate;
00037
00038 DLLEXPORT extern QoreString NothingTypeString, NullTypeString, TrueString,
00039 FalseString, EmptyHashString, EmptyListString;
00040
00041 DLLEXPORT qore_type_t get_next_type_id();
00042
00043 DLLLOCAL void init_qore_types();
00044 DLLLOCAL void delete_qore_types();
00045
00046 DLLEXPORT bool compareHard(const AbstractQoreNode *l, const AbstractQoreNode *r, class ExceptionSink *xsink);
00047 DLLEXPORT bool compareSoft(const AbstractQoreNode *l, const AbstractQoreNode *r, class ExceptionSink *xsink);
00048
00049 static inline AbstractQoreNode *boolean_false()
00050 {
00051 return &False;
00052 }
00053
00054 static inline AbstractQoreNode *boolean_true()
00055 {
00056 return &True;
00057 }
00058
00059 static inline class QoreBigIntNode *zero()
00060 {
00061 return new QoreBigIntNode();
00062 }
00063
00064 static inline class AbstractQoreNode *zero_float()
00065 {
00066 return new QoreFloatNode(0.0);
00067 }
00068
00069 static inline DateTimeNode *zero_date()
00070 {
00071 ZeroDate->ref();
00072 return ZeroDate;
00073 }
00074
00075 static inline class QoreStringNode *null_string()
00076 {
00077 NullString->ref();
00078 return NullString;
00079 }
00080
00081 #endif // _QORE_QORETYPE_H