LibreOffice Module forms (master) 1
|
PathExpression represents an XPath Expression and caches results. More...
#include <pathexpression.hxx>
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_t & | getNodeList () 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... | |
PathExpression represents an XPath Expression and caches results.
Definition at line 39 of file pathexpression.hxx.
typedef std::vector<css::uno::Reference<css::xml::dom::XNode> > xforms::PathExpression::NodeVector_t |
Definition at line 42 of file pathexpression.hxx.
xforms::PathExpression::PathExpression | ( | ) |
Definition at line 41 of file pathexpression.cxx.
xforms::PathExpression::~PathExpression | ( | ) |
Definition at line 45 of file pathexpression.cxx.
|
private |
get expression for evaluation
Definition at line 65 of file pathexpression.cxx.
References xforms::ComputedExpression::_getExpressionForEvaluation().
Referenced by evaluate().
void xforms::PathExpression::evaluate | ( | const xforms::EvaluationContext & | rContext | ) |
evaluate the expression relative to the content node.
Definition at line 73 of file pathexpression.cxx.
References xforms::ComputedExpression::_evaluate(), _getExpressionForEvaluation(), xforms::ComputedExpression::isSimpleExpression(), maNodes, xforms::ComputedExpression::mxResult, n, and nLength.
Referenced by xforms::Binding::bind().
Reference< XNode > xforms::PathExpression::getNode | ( | ) | const |
Definition at line 96 of file pathexpression.cxx.
References maNodes.
Referenced by xforms::Binding::bind(), xforms::Binding::explainInvalid(), xforms::Binding::isValid(), xforms::Binding::setValue(), and xforms::Binding::valueModified().
|
inline |
Definition at line 65 of file pathexpression.hxx.
References maNodes.
Referenced by xforms::Binding::_getMIPEvaluationContexts(), xforms::Binding::bind(), xforms::Binding::getAllListEntries(), xforms::Binding::getListEntry(), and xforms::Binding::getListEntryCount().
Reference< XNodeList > xforms::PathExpression::getXNodeList | ( | ) | const |
Definition at line 105 of file pathexpression.cxx.
References xforms::ComputedExpression::mxResult.
Referenced by xforms::Binding::getXNodeList().
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().
|
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().