Back to index

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

Holds the current state of a MDG node. More...

#include <nsXFormsNodeState.h>

List of all members.

Public Member Functions

 nsXFormsNodeState (PRUint16 aInitialState=kFlags_DEFAULT)
 Constructor.
void Set (PRUint16 aFlags, PRBool aVal)
 Sets flag(s) on or off.
nsXFormsNodeStateoperator&= (PRUint16 aMask)
 And own state with a bit mask.
PRBool operator== (nsXFormsNodeState &aCmp) const
 Comparator.
PRBool TestAndClear (eFlag_t aFlag)
 Get flag state and clear flag.
PRBool Test (eFlag_t aFlag) const
 Get flag state.
PRBool IsValid () const
PRBool IsConstraint () const
PRBool IsConstraintSchema () const
PRBool IsReadonly () const
PRBool IsRelevant () const
PRBool IsRequired () const
PRBool ShouldDispatchReadonly () const
PRBool ShouldDispatchRelevant () const
PRBool ShouldDispatchValid () const
PRBool ShouldDispatchRequired () const
PRBool ShouldDispatchValueChanged () const
PRUint32 GetIntrinsicState () const

Private Attributes

PRUint16 mState
 The node state, bit vector of eFlag_t.

Detailed Description

Holds the current state of a MDG node.

That is, whether the node is readonly, relevant, etc., and also information about which events that should be dispatched to any controls bound to the node.

Definition at line 101 of file nsXFormsNodeState.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
aInitialStateThe initial state of this

Definition at line 113 of file nsXFormsNodeState.h.

    : mState(aInitialState) {};

Member Function Documentation

Definition at line 161 of file nsXFormsNodeState.h.

    { return Test(eFlag_CONSTRAINT); };

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 163 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 165 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 168 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 171 of file nsXFormsNodeState.h.

    { return Test(eFlag_REQUIRED); };

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsXFormsNodeState::IsValid ( ) const [inline]

Definition at line 158 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Here is the caller graph for this function:

nsXFormsNodeState & nsXFormsNodeState::operator&= ( PRUint16  aMask)

And own state with a bit mask.

Parameters:
aMaskBit mask
Returns:
New value

Definition at line 54 of file nsXFormsNodeState.cpp.

{
  mState &= aMask;
  return *this;
}
PRBool nsXFormsNodeState::operator== ( nsXFormsNodeState aCmp) const

Comparator.

Parameters:
aCmpObject to compare with
Returns:
Objects equal?

Definition at line 61 of file nsXFormsNodeState.cpp.

{
  return (mState == aCmp.mState) ? PR_TRUE : PR_FALSE;
}
void nsXFormsNodeState::Set ( PRUint16  aFlags,
PRBool  aVal 
)

Sets flag(s) on or off.

Parameters:
aFlagsThe flag(s) to set
aValThe flag value

Definition at line 44 of file nsXFormsNodeState.cpp.

{
  if (aVal) {
    mState |= aFlags;
  } else {
    mState &= ~aFlags;
  }
}

Here is the caller graph for this function:

Definition at line 175 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Definition at line 177 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Definition at line 181 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Definition at line 179 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Definition at line 183 of file nsXFormsNodeState.h.

Here is the call graph for this function:

Get flag state.

Parameters:
aFlagThe flag
Returns:
The flag state

Definition at line 75 of file nsXFormsNodeState.cpp.

{
  return (mState & aFlag) ? PR_TRUE : PR_FALSE;
}

Here is the caller graph for this function:

Get flag state and clear flag.

Parameters:
aFlagThe flag
Returns:
The flag state

Definition at line 67 of file nsXFormsNodeState.cpp.

{
  PRUint16 test = mState & aFlag;
  mState &= ~aFlag;
  return test ? PR_TRUE : PR_FALSE;
}

Member Data Documentation

The node state, bit vector of eFlag_t.

Definition at line 105 of file nsXFormsNodeState.h.


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