Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Friends
NumberResult Class Reference

#include <ExprResult.h>

Inheritance diagram for NumberResult:
Inheritance graph
[legend]
Collaboration diagram for NumberResult:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ResultType {
  NODESET, BOOLEAN, NUMBER, STRING,
  RESULT_TREE_FRAGMENT
}

Public Member Functions

 NumberResult (double aValue, txResultRecycler *aRecycler)
 NumberResult Represents the a number as the result of evaluating an Expr.
void AddRef ()
void Release ()
virtual short getResultType ()=0
 Returns the type of ExprResult represented.
virtual void stringValue (nsAString &str)=0
 Creates a String representation of this ExprResult.
virtual nsAString * stringValuePointer ()=0
 Returns a pointer to the stringvalue if possible.
virtual MBool booleanValue ()=0
 Converts this ExprResult to a Boolean (MBool) value.
virtual double numberValue ()=0
 Converts this ExprResult to a Number (double) value.

Public Attributes

TX_DECL_EXPRRESULT double value

Friends

class txResultRecycler

Detailed Description

Definition at line 133 of file ExprResult.h.


Member Enumeration Documentation

enum txAExprResult::ResultType [inherited]
Enumerator:
NODESET 
BOOLEAN 
NUMBER 
STRING 
RESULT_TREE_FRAGMENT 

Definition at line 61 of file ExprResult.h.


Constructor & Destructor Documentation

NumberResult::NumberResult ( double  aValue,
txResultRecycler aRecycler 
)

NumberResult Represents the a number as the result of evaluating an Expr.

Default Constructor Creates a new NumberResult with the value of the given double parameter

Parameters:
dblthe double to use for initialization of this NumberResult's value

Definition at line 54 of file NumberResult.cpp.

    : txAExprResult(aRecycler), value(aValue)
{
} //-- NumberResult

Member Function Documentation

void txAExprResult::AddRef ( void  ) [inline, inherited]

Definition at line 72 of file ExprResult.h.

    {
        ++mRefCnt;
    }
virtual MBool txAExprResult::booleanValue ( ) [pure virtual, inherited]

Converts this ExprResult to a Boolean (MBool) value.

Returns:
the Boolean value

Here is the caller graph for this function:

virtual short txAExprResult::getResultType ( ) [pure virtual, inherited]

Returns the type of ExprResult represented.

Returns:
the type of ExprResult represented

Here is the caller graph for this function:

virtual double txAExprResult::numberValue ( ) [pure virtual, inherited]

Converts this ExprResult to a Number (double) value.

Returns:
the Number value

Here is the caller graph for this function:

void txAExprResult::Release ( void  ) [inherited]

Definition at line 291 of file txResultRecycler.cpp.

{
    if (--mRefCnt == 0) {
        if (mRecycler) {
            mRecycler->recycle(this);
        }
        else {
            delete this;
        }
    }
}
virtual void txAExprResult::stringValue ( nsAString &  str) [pure virtual, inherited]

Creates a String representation of this ExprResult.

Parameters:
strthe destination string to append the String representation to.

Here is the caller graph for this function:

virtual nsAString* txAExprResult::stringValuePointer ( ) [pure virtual, inherited]

Returns a pointer to the stringvalue if possible.

Otherwise null is returned.

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class txResultRecycler [friend, inherited]

Definition at line 60 of file ExprResult.h.


Member Data Documentation

Definition at line 140 of file ExprResult.h.


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