Xalan-C++ API Reference 1.12.0
xalanc::XPathGuard Class Reference

Manages the lifetime of an XPath instance. More...

#include <xalanc/XPath/XPathFactory.hpp>

Public Member Functions

 XPathGuard (XPathFactory &theFactory, const XPath *theXPath)
 Construct an XPathGuard instance from a factory object and an XPath.
 XPathGuard (XPathGuard &theRHS)
 ~XPathGuard ()
const XPath * operator-> () const
 Retrieve the object pointer (must not be null).
const XPath * get () const
 Retrieve the object pointer (may be null).
void reset ()
 Return the referenced object to the factory and set pointers to null.
const XPath * release ()
 Transfers ownership of XPath to caller.

Detailed Description

Manages the lifetime of an XPath instance.

Definition at line 131 of file XPathFactory.hpp.

Constructor & Destructor Documentation

◆ XPathGuard() [1/2]

xalanc::XPathGuard::XPathGuard ( XPathFactory & theFactory,
const XPath * theXPath )
inline

Construct an XPathGuard instance from a factory object and an XPath.

Parameters
theFactoryobject that manages lifetime of XPaths
theXPathpointer to XPath managed

Definition at line 141 of file XPathFactory.hpp.

Referenced by XPathGuard().

◆ XPathGuard() [2/2]

xalanc::XPathGuard::XPathGuard ( XPathGuard & theRHS)
inline

Definition at line 151 of file XPathFactory.hpp.

References release(), and XPathGuard().

◆ ~XPathGuard()

xalanc::XPathGuard::~XPathGuard ( )
inline

Definition at line 166 of file XPathFactory.hpp.

References reset().

Member Function Documentation

◆ get()

const XPath * xalanc::XPathGuard::get ( ) const
inline

Retrieve the object pointer (may be null).

Returns
pointer to XPath

Definition at line 190 of file XPathFactory.hpp.

◆ operator->()

const XPath * xalanc::XPathGuard::operator-> ( ) const
inline

Retrieve the object pointer (must not be null).

Returns
pointer to XPath

Definition at line 177 of file XPathFactory.hpp.

◆ release()

const XPath * xalanc::XPathGuard::release ( )
inline

Transfers ownership of XPath to caller.

Returns
pointer to XPath

Definition at line 219 of file XPathFactory.hpp.

Referenced by XPathGuard().

◆ reset()

void xalanc::XPathGuard::reset ( )
inline

Return the referenced object to the factory and set pointers to null.

Definition at line 199 of file XPathFactory.hpp.

Referenced by ~XPathGuard().


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