ReferenceNode Class Reference

parse type: reference to a lvalue expression More...

#include <ReferenceNode.h>

Inheritance diagram for ReferenceNode:

SimpleValueQoreNode SimpleQoreNode AbstractQoreNode QoreReferenceCounter

List of all members.

Public Member Functions

DLLLOCAL ReferenceNode (AbstractQoreNode *exp)
 creates the ReferenceNode object with the given lvalue expression
virtual DLLEXPORT int getAsString (QoreString &str, int foff, class ExceptionSink *xsink) const
 concatenate the verbose string representation of the value to an existing QoreString
virtual DLLEXPORT QoreStringgetAsString (bool &del, int foff, class ExceptionSink *xsink) const
 returns a QoreString giving the verbose string representation of the value
virtual DLLEXPORT
AbstractQoreNode
realCopy () const
 returns a copy of the object
virtual DLLEXPORT bool is_equal_soft (const AbstractQoreNode *v, ExceptionSink *xsink) const
 always returns false
virtual DLLEXPORT bool is_equal_hard (const AbstractQoreNode *v, ExceptionSink *xsink) const
 always returns false
virtual DLLEXPORT const char * getTypeName () const
 returns the type name as a c string
DLLLOCAL AbstractQoreNodegetExpression () const
 returns the lvalue expression for this object
DLLLOCAL AbstractQoreNode ** getExpressionPtr ()
 returns a pointer to the lvalue expression

Protected Member Functions

virtual DLLEXPORT ~ReferenceNode ()
 frees all memory and destroys the object

Protected Attributes

AbstractQoreNodelvexp
 lvalue expression for reference


Detailed Description

parse type: reference to a lvalue expression

This type could be passed to a builtin function. To get and set the value of the reference, use the ReferenceHelper class. To create a reference argument to pass to a user or builtin function, use the ReferenceArgumentHelper class.

See also:
ReferenceHelper

ReferenceArgumentHelper


Constructor & Destructor Documentation

DLLLOCAL ReferenceNode::ReferenceNode ( AbstractQoreNode exp  ) 

creates the ReferenceNode object with the given lvalue expression

Parameters:
exp must be a parse expression for an lvalue


Member Function Documentation

virtual DLLEXPORT QoreString* ReferenceNode::getAsString ( bool &  del,
int  foff,
class ExceptionSink xsink 
) const [virtual]

returns a QoreString giving the verbose string representation of the value

Used for n and N printf formatting. Do not call this function directly; use the QoreNodeAsStringHelper class (defined in QoreStringNode.h) instead

Parameters:
del if this is true when the function returns, then the returned QoreString pointer should be deleted, if false, then it must not be
foff for multi-line formatting offset, -1 = no line breaks (ignored in this version of the function)
xsink ignored in this version of the function
See also:
QoreNodeAsStringHelper

Implements AbstractQoreNode.

virtual DLLEXPORT int ReferenceNode::getAsString ( QoreString str,
int  foff,
class ExceptionSink xsink 
) const [virtual]

concatenate the verbose string representation of the value 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 (ignored in this version of the function)
xsink ignored in this version of the function
Returns:
this implementation of the function always returns 0 for no error raised

Implements AbstractQoreNode.

DLLLOCAL AbstractQoreNode* ReferenceNode::getExpression (  )  const [inline]

returns the lvalue expression for this object

Returns:
the lvalue expression for this object

References lvexp.


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

doxygen