Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsAssignment Class Reference

An assignment of a value to a variable. More...

#include <nsRuleNetwork.h>

Collaboration diagram for nsAssignment:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsAssignment ()
 nsAssignment (PRInt32 aVariable, const Value &aValue)
 nsAssignment (const nsAssignment &aAssignment)
 ~nsAssignment ()
nsAssignmentoperator= (const nsAssignment &aAssignment)
PRBool operator== (const nsAssignment &aAssignment) const
PRBool operator!= (const nsAssignment &aAssignment) const
PLHashNumber Hash () const

Public Attributes

PRInt32 mVariable
Value mValue

Detailed Description

An assignment of a value to a variable.

Definition at line 368 of file nsRuleNetwork.h.


Constructor & Destructor Documentation

Definition at line 373 of file nsRuleNetwork.h.

nsAssignment::nsAssignment ( PRInt32  aVariable,
const Value aValue 
) [inline]

Definition at line 376 of file nsRuleNetwork.h.

        : mVariable(aVariable),
          mValue(aValue)
        { MOZ_COUNT_CTOR(nsAssignment); }
nsAssignment::nsAssignment ( const nsAssignment aAssignment) [inline]

Definition at line 381 of file nsRuleNetwork.h.

        : mVariable(aAssignment.mVariable),
          mValue(aAssignment.mValue)
        { MOZ_COUNT_CTOR(nsAssignment); }

Definition at line 386 of file nsRuleNetwork.h.


Member Function Documentation

PLHashNumber nsAssignment::Hash ( ) const [inline]

Definition at line 399 of file nsRuleNetwork.h.

                              {
        // XXX I have no idea if this hashing function is good or not
        return (mValue.Hash() & 0xffff) | (mVariable << 16); }

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsAssignment::operator!= ( const nsAssignment aAssignment) const [inline]

Definition at line 396 of file nsRuleNetwork.h.

                                                             {
        return mVariable != aAssignment.mVariable || mValue != aAssignment.mValue; }
nsAssignment& nsAssignment::operator= ( const nsAssignment aAssignment) [inline]

Definition at line 388 of file nsRuleNetwork.h.

                                                             {
        mVariable = aAssignment.mVariable;
        mValue    = aAssignment.mValue;
        return *this; }
PRBool nsAssignment::operator== ( const nsAssignment aAssignment) const [inline]

Definition at line 393 of file nsRuleNetwork.h.

                                                             {
        return mVariable == aAssignment.mVariable && mValue == aAssignment.mValue; }

Member Data Documentation

Definition at line 371 of file nsRuleNetwork.h.

Definition at line 370 of file nsRuleNetwork.h.


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