LibreOffice Module forms (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
xforms::PathExpression Class Referencefinal

PathExpression represents an XPath Expression and caches results. More...

#include <pathexpression.hxx>

Inheritance diagram for xforms::PathExpression:
[legend]
Collaboration diagram for xforms::PathExpression:
[legend]

Public Types

typedef std::vector< css::uno::Reference< css::xml::dom::XNode > > NodeVector_t
 

Public Member Functions

 PathExpression ()
 
 ~PathExpression ()
 
void setExpression (const OUString &rExpression)
 set the expression string (overridden to do remove old listeners) (also defines simple expressions) More...
 
void evaluate (const xforms::EvaluationContext &rContext)
 evaluate the expression relative to the content node. More...
 
css::uno::Reference< css::xml::dom::XNode > getNode () const
 
const NodeVector_tgetNodeList () const
 
css::uno::Reference< css::xml::dom::XNodeList > getXNodeList () const
 
- Public Member Functions inherited from xforms::ComputedExpression
 ComputedExpression ()
 
 ~ComputedExpression ()
 
const OUString & getExpression () const
 get the expression string More...
 
void setExpression (const OUString &rExpression)
 set a new expression string More...
 
bool isEmptyExpression () const
 do we have an actual expression? More...
 
bool isSimpleExpression () const
 heuristically determine whether this expression is 'simple', i.e. More...
 
bool evaluate (const xforms::EvaluationContext &rContext)
 evaluate the expression relative to the content node. More...
 
bool hasValue () const
 does this expression have a value? More...
 
void clear ()
 remove value/evaluate results More...
 
css::uno::Reference< css::xml::xpath::XXPathObject > const & getXPath () const
 
bool getBool (bool bDefault=false) const
 
OUString getString () const
 

Private Member Functions

OUString _getExpressionForEvaluation () const
 get expression for evaluation More...
 

Private Attributes

NodeVector_t maNodes
 the node-list result from the last bind (cached from mxResult) More...
 

Additional Inherited Members

- Protected Member Functions inherited from xforms::ComputedExpression
bool _checkExpression (const char *pExpression) const
 implementation of isSimpleExpression More...
 
const OUString & _getExpressionForEvaluation () const
 allow manipulation of the expression before it is evaluated More...
 
bool _evaluate (const xforms::EvaluationContext &rContext, const OUString &sExpression)
 evaluate the expression relative to the content node. More...
 
- Static Protected Member Functions inherited from xforms::ComputedExpression
static css::uno::Reference< css::xml::xpath::XXPathAPI > _getXPathAPI (const xforms::EvaluationContext &aContext)
 obtain a (suitable) XPathAPI implementation More...
 
- Protected Attributes inherited from xforms::ComputedExpression
bool mbIsSimple
 is msExpression a simple expression? More...
 
css::uno::Reference< css::xml::xpath::XXPathObject > mxResult
 the result from the last bind More...
 

Detailed Description

PathExpression represents an XPath Expression and caches results.

Definition at line 39 of file pathexpression.hxx.

Member Typedef Documentation

◆ NodeVector_t

typedef std::vector<css::uno::Reference<css::xml::dom::XNode> > xforms::PathExpression::NodeVector_t

Definition at line 42 of file pathexpression.hxx.

Constructor & Destructor Documentation

◆ PathExpression()

xforms::PathExpression::PathExpression ( )

Definition at line 41 of file pathexpression.cxx.

◆ ~PathExpression()

xforms::PathExpression::~PathExpression ( )

Definition at line 45 of file pathexpression.cxx.

Member Function Documentation

◆ _getExpressionForEvaluation()

OUString xforms::PathExpression::_getExpressionForEvaluation ( ) const
private

get expression for evaluation

Definition at line 65 of file pathexpression.cxx.

References xforms::ComputedExpression::_getExpressionForEvaluation().

Referenced by evaluate().

◆ evaluate()

void xforms::PathExpression::evaluate ( const xforms::EvaluationContext rContext)

◆ getNode()

Reference< XNode > xforms::PathExpression::getNode ( ) const

◆ getNodeList()

const NodeVector_t & xforms::PathExpression::getNodeList ( ) const
inline

◆ getXNodeList()

Reference< XNodeList > xforms::PathExpression::getXNodeList ( ) const

Definition at line 105 of file pathexpression.cxx.

References xforms::ComputedExpression::mxResult.

Referenced by xforms::Binding::getXNodeList().

◆ setExpression()

void xforms::PathExpression::setExpression ( const OUString &  rExpression)

set the expression string (overridden to do remove old listeners) (also defines simple expressions)

Definition at line 50 of file pathexpression.cxx.

References xforms::ComputedExpression::_checkExpression(), maNodes, xforms::ComputedExpression::mbIsSimple, and xforms::ComputedExpression::setExpression().

Referenced by xforms::Binding::setBindingExpression().

Member Data Documentation

◆ maNodes

NodeVector_t xforms::PathExpression::maNodes
private

the node-list result from the last bind (cached from mxResult)

Definition at line 46 of file pathexpression.hxx.

Referenced by evaluate(), getNode(), getNodeList(), and setExpression().


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