DocExpression Class Reference

Represents XQuery standard function fn:doc. More...

#include <docexpression.h>

Inheritance diagram for DocExpression:

Inheritance graph
[legend]
Collaboration diagram for DocExpression:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DocExpression ()
 Constructor.
virtual ~DocExpression ()
void print (OutputStream &dos) const
const char * getPath ()
 Returns the argument of fn:doc.
void setPath (const char *_path)
 Sets the argument of fn:doc.
bool isEmptyPath ()
 Returns if the argument of fn:doc is empty.
bool isPathEqualTo (const char *_path)
 Returns if the argument (path to a file) of this fn:doc is equal to the entered argument (path to a file).

Private Attributes

const char * path
 The entered argument (path to a file) of fn:doc.


Detailed Description

Represents XQuery standard function fn:doc.

Represents XQuery standard function fn:doc, which takes a path to a file, e.g. fn:doc(\"examples/query.xq\"), as argument and returns the file located through the entered path (of the file).

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 51 of file docexpression.h.


Constructor & Destructor Documentation

DocExpression::DocExpression (  ) 

Constructor.

Constructor - creating object.

Definition at line 37 of file docexpression.cpp.

DocExpression::~DocExpression (  )  [virtual]

Destructor.

Definition at line 41 of file docexpression.cpp.

References path.


Member Function Documentation

const char * DocExpression::getPath (  )  [inline]

Returns the argument of fn:doc.

Returns the argument of fn:doc, i.e. returns the path to a file.

Return values:
const char* Pointer to a char object.

Definition at line 74 of file docexpression.h.

References path.

bool DocExpression::isEmptyPath (  )  [inline]

Returns if the argument of fn:doc is empty.

Returns if the argument of fn:doc is empty, i.e. if the input query contains no fn:doc expression.

Return values:
bool true if the input query contains one or more fn:doc expressions, false otherwise.

Definition at line 91 of file docexpression.h.

References path.

Referenced by Executor::parseQuery().

bool DocExpression::isPathEqualTo ( const char *  _path  ) 

Returns if the argument (path to a file) of this fn:doc is equal to the entered argument (path to a file).

Returns if the argument (path to a file) of this fn:doc is equal to the entered argument (path to a file).

Parameters:
[in] _path Pointer to a char object (path to a file), which should be checked for equality.
Return values:
bool true if both are equal, false otherwise.

Definition at line 54 of file docexpression.cpp.

References path.

void DocExpression::print ( OutputStream dos  )  const [virtual]

Prints the expression.

Prints the expression.

Parameters:
[in] dos Pointer to a OutputStream object.
Return values:
void 

Implements Expression.

Definition at line 47 of file docexpression.cpp.

References NEWLINE, path, and ROOTVAR.

void DocExpression::setPath ( const char *  _path  )  [inline]

Sets the argument of fn:doc.

Sets the argument of fn:doc, i.e. sets the path to a file.

Parameters:
[in] _path Pointer to a char object (path to a file).
Return values:
void 

Definition at line 82 of file docexpression.h.


Member Data Documentation

const char * DocExpression::path [private]

The entered argument (path to a file) of fn:doc.

The entered argument (path to a file) of fn:doc, which is the first argument of the constructor. This member variable is NULL on creation of object.

Definition at line 109 of file docexpression.h.

Referenced by getPath(), isEmptyPath(), isPathEqualTo(), print(), and ~DocExpression().


Generated on Sun May 24 20:20:22 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9