Xalan-C++ API Reference  1.12.0
Classes | Public Types | Public Member Functions | List of all members
xalanc::XPathConstructionContext Class Referenceabstract

#include <xalanc/XPath/XPathConstructionContext.hpp>

Inheritance diagram for xalanc::XPathConstructionContext:
[legend]
Collaboration diagram for xalanc::XPathConstructionContext:
[legend]

Classes

class  GetCachedString
 

Public Types

typedef GetCachedString GetAndReleaseCachedString
 
- Public Types inherited from xalanc::ProblemListenerBase
enum  eSource {
  eXMLPARSER = 0, eXMLParser = 0, eXSLPROCESSOR = 1, eXSLTProcessor = 1,
  eXPATH = 2, eXPath = 2, eSourceCount
}
 
enum  eClassification {
  eMESSAGE = 0, eMessage = 0, eWARNING = 1, eWarning = 1,
  eERROR = 2, eError = 2, eClassificationCount
}
 
typedef eSource eProblemSource
 

Public Member Functions

 XPathConstructionContext (MemoryManager &theManager)
 
virtual ~XPathConstructionContext ()
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
 Function that is called when a problem event occurs. More...
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
 Function that is called when a problem event occurs. More...
 
virtual void reset ()=0
 Reset the instance. More...
 
virtual const XalanDOMStringgetPooledString (const XalanDOMString &theString)=0
 Get a pooled string given the source string. More...
 
virtual const XalanDOMStringgetPooledString (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 Get a pooled string given the source character array. More...
 
virtual XalanDOMStringgetCachedString ()=0
 Get a cached string for temporary use. More...
 
virtual bool releaseCachedString (XalanDOMString &theString)=0
 Return a cached string. More...
 
MemoryManager & getMemoryManager () const
 
MemoryManager & getMemoryManager ()
 
- Public Member Functions inherited from xalanc::ProblemListenerBase
 ProblemListenerBase ()
 
virtual ~ProblemListenerBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from xalanc::ProblemListenerBase
static void defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
 Function to format a problem call to a PrintWriter instance. More...
 
static void defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
 Function to format a problem call to a PrintWriter instance. More...
 
- Static Protected Attributes inherited from xalanc::ProblemListenerBase
static const XalanMessages::Codes s_messageCodes [eSourceCount][eClassificationCount]
 

Detailed Description

Definition at line 60 of file XPathConstructionContext.hpp.

Member Typedef Documentation

◆ GetAndReleaseCachedString

Definition at line 190 of file XPathConstructionContext.hpp.

Constructor & Destructor Documentation

◆ XPathConstructionContext()

xalanc::XPathConstructionContext::XPathConstructionContext ( MemoryManager &  theManager)

◆ ~XPathConstructionContext()

virtual xalanc::XPathConstructionContext::~XPathConstructionContext ( )
virtual

Member Function Documentation

◆ getCachedString()

virtual XalanDOMString& xalanc::XPathConstructionContext::getCachedString ( )
pure virtual

Get a cached string for temporary use.

Returns
A reference to the string

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.

◆ getMemoryManager() [1/2]

MemoryManager& xalanc::XPathConstructionContext::getMemoryManager ( )
inline

Definition at line 199 of file XPathConstructionContext.hpp.

◆ getMemoryManager() [2/2]

MemoryManager& xalanc::XPathConstructionContext::getMemoryManager ( ) const
inline

Definition at line 193 of file XPathConstructionContext.hpp.

◆ getPooledString() [1/2]

virtual const XalanDOMString& xalanc::XPathConstructionContext::getPooledString ( const XalanDOMChar *  theString,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

Get a pooled string given the source character array.

If the string already exists in the pool, no copy will be made. If not, a copy will be made and kept for later use.

Parameters
theStringThe source character array
theLengthThe length of the character array
Returns
a const reference to a pooled string.

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.

◆ getPooledString() [2/2]

virtual const XalanDOMString& xalanc::XPathConstructionContext::getPooledString ( const XalanDOMString theString)
pure virtual

Get a pooled string given the source string.

If the string already exists in the pool, no copy will be made. If not, a copy will be made and kept for later use.

Parameters
theStringThe source string
Returns
a const reference to a pooled string.

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.

◆ problem() [1/2]

virtual void xalanc::XPathConstructionContext::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const Locator *  locator,
const XalanNode sourceNode 
)
pure virtual

Function that is called when a problem event occurs.

Parameters
sourceEither eXMLParser, eXSLProcessor, or eXPATH.
classificationEither eMessage, eWarning, or eError.
locatorThe current Locator instance for the stylesheet. Maybe be a null pointer.
sourceNodeThe current source node, if any.
msgThe error message.

Implements xalanc::ProblemListenerBase.

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.

◆ problem() [2/2]

virtual void xalanc::XPathConstructionContext::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const XalanNode sourceNode 
)
pure virtual

Function that is called when a problem event occurs.

This version assumes location information is already formatted into the message.

Parameters
sourceeither eXMLPARSER, eXSLPROCESSOR, or eXPATH
classificationeither eMESSAGE, eERROR or eWARNING
msgstring message explaining the problem.

Implements xalanc::ProblemListenerBase.

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.

◆ releaseCachedString()

virtual bool xalanc::XPathConstructionContext::releaseCachedString ( XalanDOMString theString)
pure virtual

Return a cached string.

Parameters
theStringThe string to release.
Returns
true if the string was released successfully.

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.

◆ reset()

virtual void xalanc::XPathConstructionContext::reset ( )
pure virtual

Reset the instance.

Any existing objects created by the instance will be destroyed.

Implemented in xalanc::StylesheetConstructionContext, xalanc::StylesheetConstructionContextDefault, and xalanc::XPathConstructionContextDefault.


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