QoreNullNode Class Reference

Qore's SQL "NULL" parse tree/value type, not-referenced counted, not dynamically allocated. More...

#include <QoreNullNode.h>

Inheritance diagram for QoreNullNode:

UniqueValueQoreNode SimpleValueQoreNode SimpleQoreNode AbstractQoreNode QoreReferenceCounter

List of all members.

Public Member Functions

virtual DLLEXPORT int getAsString (QoreString &str, int foff, class ExceptionSink *xsink) const
 concatenate "<NULL>" to an existing QoreString
virtual DLLEXPORT QoreStringgetAsString (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

Protected Member Functions

DLLLOCAL AbstractQoreNodeevalImpl (class ExceptionSink *xsink) const
 this function is never called for this type


Detailed Description

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"

See also:
QoreNothingNode

Member Function Documentation

DLLLOCAL AbstractQoreNode* QoreNullNode::evalImpl ( class ExceptionSink xsink  )  const [protected, virtual]

this function is never called for this type

See also:
AbstractQoreNode::evalImpl()

Reimplemented from SimpleValueQoreNode.

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

Parameters:
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
Returns:
-1 for exception raised, 0 = OK

Implements AbstractQoreNode.

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

Parameters:
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
See also:
QoreNodeAsStringHelper

Implements AbstractQoreNode.

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

Parameters:
v the value to compare
xsink ignored for this version of the function

Implements AbstractQoreNode.

virtual DLLEXPORT bool QoreNullNode::is_equal_hard ( const AbstractQoreNode v,
ExceptionSink xsink 
) const [virtual]

tests for equality without type conversions (hard compare)

Parameters:
v the value to compare
xsink ignored for this version of the function

Implements AbstractQoreNode.


The documentation for this class was generated from the following file:

Generated on Mon Oct 26 09:09:50 2009 for Qore Programming Language by  doxygen 1.5.6