Qore Programming Language  0.8.3
Public Member Functions | Protected Member Functions | Protected Attributes
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
virtual DLLLOCAL AbstractQoreNodeparseInit (LocalVar *oflag, int pflag, int &lvids, const QoreTypeInfo *&typeInfo)
 initializes during parsing
DLLLOCAL AbstractQoreNodegetExpression () const
 returns the lvalue expression for this object

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 TypeSafeReferenceHelper class. To create a reference argument to pass to a user or builtin function, use the ReferenceArgumentHelper class.

See also:
TypeSafeReferenceHelper
ReferenceArgumentHelper

Constructor & Destructor Documentation

DLLLOCAL ReferenceNode::ReferenceNode ( AbstractQoreNode exp)

creates the ReferenceNode object with the given lvalue expression

Parameters:
expmust be a parse expression for an lvalue

Member Function Documentation

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:
strthe string representation of the type will be concatenated to this QoreString reference
fofffor multi-line formatting offset, -1 = no line breaks (ignored in this version of the function)
xsinkignored in this version of the function
Returns:
this implementation of the function always returns 0 for no error raised

Implements AbstractQoreNode.

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:
delif this is true when the function returns, then the returned QoreString pointer should be deleted, if false, then it must not be
fofffor multi-line formatting offset, -1 = no line breaks (ignored in this version of the function)
xsinkignored in this version of the function
See also:
QoreNodeAsStringHelper

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:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines