Qore's SQL "NULL" parse tree/value type, not-referenced counted, not dynamically allocated. More...
#include <QoreNullNode.h>
Public Member Functions | |
virtual DLLEXPORT int | getAsString (QoreString &str, int foff, class ExceptionSink *xsink) const |
concatenate "<NULL>" to an existing QoreString | |
virtual DLLEXPORT QoreString * | getAsString (bool &del, int foff, class ExceptionSink *xsink) const |
returns a QoreString with the text: "<NULL>" | |
virtual DLLEXPORT bool | is_equal_soft (const AbstractQoreNode *v, ExceptionSink *xsink) const |
tests for equality with possible type conversion (soft compare) | |
virtual DLLEXPORT bool | is_equal_hard (const AbstractQoreNode *v, ExceptionSink *xsink) const |
tests for equality without type conversions (hard compare) | |
virtual DLLEXPORT const char * | getTypeName () const |
returns the type name as a c string | |
virtual DLLLOCAL AbstractQoreNode * | parseInit (LocalVar *oflag, int pflag, int &lvids, const QoreTypeInfo *&typeInfo) |
returns the type information | |
Protected Member Functions | |
DLLLOCAL AbstractQoreNode * | evalImpl (class ExceptionSink *xsink) const |
should never be called for value types |
Qore's SQL "NULL" parse tree/value type, not-referenced counted, not dynamically allocated.
This class cannot be instantiated; there will only be one single QoreNullNode object instantiated and used everywhere in the Qore library; use the null() function or simply &Null to acquire a pointer to an object of this class. This value can be represented in Qore code as the keyword "NULL". NOTE: Qore's "NULL" is not equal to "NOTHING"
DLLLOCAL AbstractQoreNode* QoreNullNode::evalImpl | ( | class ExceptionSink * | xsink | ) | const [protected, virtual] |
should never be called for value types
in debugging builds of the library, calls to this function will abort
Reimplemented from SimpleValueQoreNode.
virtual DLLEXPORT QoreString* QoreNullNode::getAsString | ( | bool & | del, | |
int | foff, | |||
class ExceptionSink * | xsink | |||
) | const [virtual] |
returns a QoreString with the text: "<NULL>"
used for n and N printf formatting
del | is always set to true for this implementation of the function, meaning that the returned QoreString pointer should be deleted | |
foff | for multi-line formatting offset, -1 = no line breaks (ignored by this version of the function) | |
xsink | ignored by this version of the function NOTE: Use the QoreNodeAsStringHelper class (defined in QoreStringNode.h) instead of using this function directly |
Implements AbstractQoreNode.
virtual DLLEXPORT int QoreNullNode::getAsString | ( | QoreString & | str, | |
int | foff, | |||
class ExceptionSink * | xsink | |||
) | const [virtual] |
concatenate "<NULL>" to an existing QoreString
used for n and N printf formatting
str | the string representation of the type will be concatenated to this QoreString reference | |
foff | for multi-line formatting offset, -1 = no line breaks | |
xsink | if an error occurs, the Qore-language exception information will be added here |
Implements AbstractQoreNode.
virtual DLLEXPORT bool QoreNullNode::is_equal_hard | ( | const AbstractQoreNode * | v, | |
ExceptionSink * | xsink | |||
) | const [virtual] |
tests for equality without type conversions (hard compare)
v | the value to compare | |
xsink | ignored for this version of the function |
virtual DLLEXPORT bool QoreNullNode::is_equal_soft | ( | const AbstractQoreNode * | v, | |
ExceptionSink * | xsink | |||
) | const [virtual] |
tests for equality with possible type conversion (soft compare)
since no type can be implicitly converted to a NULL, this comparison is the same as is_equal_hard() for QoreNullNode
v | the value to compare | |
xsink | ignored for this version of the function |