KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KviKvsTreeNodeArrayElement Class Reference

Treenode array element class. More...

#include <KviKvsTreeNodeArrayElement.h>

+ Inheritance diagram for KviKvsTreeNodeArrayElement:

Public Member Functions

virtual void contextDescription (QString &szBuffer)
 Sets the buffer as Array Element Evaluation. More...
 
virtual void dump (const char *prefix)
 Dumps the tree. More...
 
virtual bool evaluateReadOnly (KviKvsRunTimeContext *c, KviKvsVariant *pBuffer)
 Evaluates the array element in read-only mode. More...
 
virtual bool evaluateReadOnlyInObjectScope (KviKvsObject *o, KviKvsRunTimeContext *c, KviKvsVariant *pBuffer)
 Evaluates the array element in read-only mode in the object scope. More...
 
virtual KviKvsRWEvaluationResultevaluateReadWrite (KviKvsRunTimeContext *c)
 Evaluates the array element in read-write mode. More...
 
virtual KviKvsRWEvaluationResultevaluateReadWriteInObjectScope (KviKvsObject *o, KviKvsRunTimeContext *c)
 Evaluates the array element in read-write mode in the object scope. More...
 
 KviKvsTreeNodeArrayElement (const QChar *pLocation, KviKvsTreeNodeData *pSource, KviKvsTreeNodeExpression *pIndex)
 Constructs the treenode array element object. More...
 
 ~KviKvsTreeNodeArrayElement ()
 Destroys the treenode array element object. More...
 
- Public Member Functions inherited from KviKvsTreeNodeArrayOrHashElement
virtual bool canEvaluateToObjectReference ()
 
virtual bool isReadOnly ()
 
 KviKvsTreeNodeArrayOrHashElement (const QChar *pLocation, KviKvsTreeNodeData *pSource)
 
 ~KviKvsTreeNodeArrayOrHashElement ()
 
- Public Member Functions inherited from KviKvsTreeNodeIndirectData
virtual bool canEvaluateInObjectScope ()
 
 KviKvsTreeNodeIndirectData (const QChar *pLocation, KviKvsTreeNodeData *pSource)
 
 ~KviKvsTreeNodeIndirectData ()
 
- Public Member Functions inherited from KviKvsTreeNodeData
virtual bool convertStringConstantToNumeric ()
 
const QChar * endingLocation ()
 
virtual bool isFunctionCall ()
 
 KviKvsTreeNodeData (const QChar *pLocation)
 
void setEndingLocation (const QChar *pEndingLocation)
 
 ~KviKvsTreeNodeData ()
 
- Public Member Functions inherited from KviKvsTreeNode
 KviKvsTreeNode (const QChar *pLocation)
 Constructs the treenode object. More...
 
const QChar * location ()
 Returns the location char. More...
 
KviKvsTreeNodeparent ()
 Returns the parent object. More...
 
void setParent (KviKvsTreeNode *p)
 Sets the parent object. More...
 
virtual ~KviKvsTreeNode ()
 Destroys the treenode object. More...
 

Protected Member Functions

bool evaluateIndex (KviKvsRunTimeContext *c, kvs_int_t &iVal)
 Evaluates the index of the array. More...
 
- Protected Member Functions inherited from KviKvsTreeNode
void setLocation (const QChar *pLocation)
 Sets the location char. More...
 

Protected Attributes

KviKvsTreeNodeExpressionm_pIndex
 
- Protected Attributes inherited from KviKvsTreeNodeIndirectData
KviKvsTreeNodeDatam_pSource
 
- Protected Attributes inherited from KviKvsTreeNodeData
const QChar * m_pEndingLocation
 
- Protected Attributes inherited from KviKvsTreeNode
const QChar * m_pLocation
 
KviKvsTreeNodem_pParent
 

Detailed Description

Treenode array element class.

Constructor & Destructor Documentation

KviKvsTreeNodeArrayElement::KviKvsTreeNodeArrayElement ( const QChar *  pLocation,
KviKvsTreeNodeData pSource,
KviKvsTreeNodeExpression pIndex 
)

Constructs the treenode array element object.

Parameters
pLocationThe location char of the instruction
pSourceThe source data
pIndexThe index of the expression
Returns
KviKvsTreeNodeArrayElement

References m_pIndex, and KviKvsTreeNode::setParent().

KviKvsTreeNodeArrayElement::~KviKvsTreeNodeArrayElement ( )

Destroys the treenode array element object.

References m_pIndex.

Member Function Documentation

void KviKvsTreeNodeArrayElement::contextDescription ( QString &  szBuffer)
virtual

Sets the buffer as Array Element Evaluation.

Parameters
szBufferThe buffer :)
Returns
void

Reimplemented from KviKvsTreeNodeData.

void KviKvsTreeNodeArrayElement::dump ( const char *  prefix)
virtual

Dumps the tree.

Parameters
prefixThe prefix of the instruction
Returns
void

Reimplemented from KviKvsTreeNodeData.

References KviKvsTreeNodeData::dump(), KviKvsTreeNodeExpression::dump(), m_pIndex, and KviKvsTreeNodeIndirectData::m_pSource.

bool KviKvsTreeNodeArrayElement::evaluateIndex ( KviKvsRunTimeContext c,
kvs_int_t iVal 
)
protected

Evaluates the index of the array.

Parameters
cThe context where the array is bound to
iValThe index of the array
Returns
bool

References __tr2qs_ctx(), KviKvsVariant::asInteger(), KviKvsRunTimeContext::error(), KviKvsTreeNodeData::evaluateReadOnly(), and m_pIndex.

Referenced by evaluateReadOnlyInObjectScope(), and evaluateReadWriteInObjectScope().

bool KviKvsTreeNodeArrayElement::evaluateReadOnly ( KviKvsRunTimeContext c,
KviKvsVariant pBuffer 
)
virtual

Evaluates the array element in read-only mode.

Parameters
cThe context where the alias is bound to
pBufferThe data buffer
Returns
bool

Reimplemented from KviKvsTreeNodeData.

References evaluateReadOnlyInObjectScope().

bool KviKvsTreeNodeArrayElement::evaluateReadOnlyInObjectScope ( KviKvsObject o,
KviKvsRunTimeContext c,
KviKvsVariant pBuffer 
)
virtual

Evaluates the array element in read-only mode in the object scope.

Parameters
oThe source object to evaluate
cThe context where the array is bound to
pBufferThe data buffer
Returns
bool

Reimplemented from KviKvsTreeNodeData.

References __tr2qs_ctx(), KviKvsVariant::array(), KviKvsArray::at(), KviKvsVariant::copyFrom(), evaluateIndex(), KviKvsTreeNodeData::evaluateReadOnly(), KviKvsTreeNodeData::evaluateReadOnlyInObjectScope(), KviKvsVariant::getTypeName(), KviKvsVariant::isArray(), KviKvsVariant::isNothing(), KviKvsTreeNodeIndirectData::m_pSource, KviKvsVariant::setNothing(), v, and KviKvsRunTimeContext::warning().

Referenced by evaluateReadOnly().

KviKvsRWEvaluationResult * KviKvsTreeNodeArrayElement::evaluateReadWrite ( KviKvsRunTimeContext c)
virtual

Evaluates the array element in read-write mode.

Parameters
cThe context where the alias is bound to
Returns
KviKvsRWEvaluationResult *

Reimplemented from KviKvsTreeNodeData.

References evaluateReadWriteInObjectScope().

KviKvsRWEvaluationResult * KviKvsTreeNodeArrayElement::evaluateReadWriteInObjectScope ( KviKvsObject o,
KviKvsRunTimeContext c 
)
virtual

Member Data Documentation

KviKvsTreeNodeExpression* KviKvsTreeNodeArrayElement::m_pIndex
protected

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