MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Mezzanine::XML::XPathVariable Class Reference

A single XPath variable. More...

#include <xpathvariable.h>

+ Collaboration diagram for Mezzanine::XML::XPathVariable:

Public Member Functions

bool GetBoolean () const
 Get this as a bool. More...
 
const XPathNodeSetGetNodeSet () const
 Get this as a XPathNodeSet. More...
 
double GetNumber () const
 Get this as a double. More...
 
const Char8GetString () const
 Get this as a c-string. More...
 
const Char8Name () const
 Get the variable name. More...
 
bool Set (bool Value)
 Set variable Value; no Type conversion is performed. More...
 
bool Set (double Value)
 Set variable Value; no Type conversion is performed. More...
 
bool Set (const Char8 *Value)
 Set variable Value; no Type conversion is performed. More...
 
bool Set (const XPathNodeSet &Value)
 Set variable Value; no Type conversion is performed. More...
 
XPathValueType Type () const
 Get variable type. More...
 

Protected Member Functions

 XPathVariable ()
 Protected Default constructor to prevent default constrution.
 
 XPathVariable (const XPathVariable &)
 Protected Copy Constructor, used to force noncopyable semantics.
 
XPathVariableoperator= (const XPathVariable &)
 Protected assignment operator, used to force noncopyable semantics. More...
 

Protected Attributes

XPathVariableNextVariable
 The Next Variable in a linked structure of XPathVariables. More...
 
XPathValueType ValueType
 What kind of data does this variable store. More...
 

Friends

class XPathVariableSet
 

Detailed Description

A single XPath variable.

This is intended to be used as a single member of an Mezzanine::XML::XPathVariableSet, and for moving data into and out of Mezzanine::XML::XPathQuery.

Definition at line 75 of file xpathvariable.h.

Member Function Documentation

bool Mezzanine::XML::XPathVariable::GetBoolean ( ) const

Get this as a bool.

Get variable Value; Minimal Type conversion is performed, default Value (false, NaN, empty string, empty node set) is returned on Type mismatch error

Returns
This as a bool, with any appropriate downcasting.
const XPathNodeSet& Mezzanine::XML::XPathVariable::GetNodeSet ( ) const

Get this as a XPathNodeSet.

Get variable Value; no Type conversion is performed, if type of variable is not a XPathNodeSet then an XPathException is thrown

Exceptions
XPathExceptionon type mismatch or allocation error
Returns
A This as an XPathNodeSet, without conversion.
double Mezzanine::XML::XPathVariable::GetNumber ( ) const

Get this as a double.

Get variable Value; default Value (false, NaN, empty string, empty node set) is returned on Type mismatch error

Returns
This as a double.
const Char8* Mezzanine::XML::XPathVariable::GetString ( ) const

Get this as a c-string.

Get variable Value; default Value (false, NaN, empty string, empty node set) is returned on Type mismatch error

Returns
This as a c-string of char_t, without conversion.
const Char8* Mezzanine::XML::XPathVariable::Name ( ) const

Get the variable name.

Returns
The name of this variable or a null pointer if this this XPathVariable is of an invalid type/
XPathVariable& Mezzanine::XML::XPathVariable::operator= ( const XPathVariable )
protected

Protected assignment operator, used to force noncopyable semantics.

Returns
Shouldn't be used, not supported.
bool Mezzanine::XML::XPathVariable::Set ( bool  Value)

Set variable Value; no Type conversion is performed.

Returns
True is returned on Success, false is returned on Type mismatch error.
Parameters
ValueThe value to attempt to put into this.
bool Mezzanine::XML::XPathVariable::Set ( double  Value)

Set variable Value; no Type conversion is performed.

Parameters
ValueThe value as a double to attempt to put into this.
Returns
True is return, false is returned on Type mismatch error.
bool Mezzanine::XML::XPathVariable::Set ( const Char8 Value)

Set variable Value; no Type conversion is performed.

Parameters
ValueThe value as a char_t array to attempt to put into this.
Returns
True is return, false is returned on Type mismatch error.
bool Mezzanine::XML::XPathVariable::Set ( const XPathNodeSet Value)

Set variable Value; no Type conversion is performed.

Parameters
ValueThe value to attempt to put into this.
Returns
True is return, false is returned on Type mismatch error.
XPathValueType Mezzanine::XML::XPathVariable::Type ( ) const

Get variable type.

Returns
The current Type of this XPathVariable.

Member Data Documentation

XPathVariable* Mezzanine::XML::XPathVariable::NextVariable
protected

The Next Variable in a linked structure of XPathVariables.

Definition at line 87 of file xpathvariable.h.

XPathValueType Mezzanine::XML::XPathVariable::ValueType
protected

What kind of data does this variable store.

Definition at line 83 of file xpathvariable.h.


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