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

Class defines a table of functions that can be called in XPath expresions. More...

#include <xalanc/XPath/XPathFunctionTable.hpp>

Collaboration diagram for xalanc::XPathFunctionTable:
[legend]

Classes

struct  FunctionNameTableEntry
 

Public Types

enum  { InvalidFunctionNumberID = -1, TableSize = 36 }
 
typedef size_t SizeType
 
typedef XalanDOMString::size_type StringSizeType
 
typedef DeleteFunctor< FunctionDeleteFunctorType
 

Public Member Functions

 XPathFunctionTable (bool fCreateTable=true)
 Constructor. More...
 
 ~XPathFunctionTable ()
 
void setMemoryManager (MemoryManager &theManager)
 
void CreateTable ()
 Set up the internal table. More...
 
void DestroyTable ()
 Destroy the internal table. More...
 
const Functionget (const XalanDOMString &theFunctionName, const Locator *theLocator) const
 Retrieve the function object for a specified function name. More...
 
const Functionoperator[] (int theFunctionID) const
 Retrieve the function object for a specified function ID number. More...
 
const XalanDOMStringidToName (int theFunctionID, XalanDOMString &theResult) const
 Map a function ID to the corresponding name. More...
 
int nameToID (const XalanDOMString &theName) const
 Map a function name to the corresponding ID number. More...
 
void InstallFunction (const XalanDOMString &theFunctionName, const Function &theFunction)
 Insert a named function into the function table. More...
 
bool UninstallFunction (const XalanDOMString &theFunctionName)
 Remove a named function from the function table. More...
 
void InstallFunction (const XalanDOMChar *theFunctionName, const Function &theFunction)
 Insert a named function into the function table. More...
 
bool UninstallFunction (const XalanDOMChar *theFunctionName)
 Remove a named function from the function table. More...
 
bool isInstalledFunction (const XalanDOMString &theFunctionName) const
 Whether a named function is in the function table. More...
 
template<class OutputIteratorType >
void getInstalledFunctionNames (OutputIteratorType theIterator) const
 Add a list of the names of installed functions to a vector of names. More...
 

Static Public Attributes

static const XalanDOMChar s_id []
 
static const XalanDOMChar s_key []
 
static const XalanDOMChar s_not []
 
static const XalanDOMChar s_sum []
 
static const XalanDOMChar s_lang []
 
static const XalanDOMChar s_last []
 
static const XalanDOMChar s_name []
 
static const XalanDOMChar s_true []
 
static const XalanDOMChar s_count []
 
static const XalanDOMChar s_false []
 
static const XalanDOMChar s_floor []
 
static const XalanDOMChar s_round []
 
static const XalanDOMChar s_concat []
 
static const XalanDOMChar s_number []
 
static const XalanDOMChar s_string []
 
static const XalanDOMChar s_boolean []
 
static const XalanDOMChar s_ceiling []
 
static const XalanDOMChar s_current []
 
static const XalanDOMChar s_contains []
 
static const XalanDOMChar s_document []
 
static const XalanDOMChar s_position []
 
static const XalanDOMChar s_substring []
 
static const XalanDOMChar s_translate []
 
static const XalanDOMChar s_localName []
 
static const XalanDOMChar s_generateId []
 
static const XalanDOMChar s_startsWith []
 
static const XalanDOMChar s_formatNumber []
 
static const XalanDOMChar s_namespaceUri []
 
static const XalanDOMChar s_stringLength []
 
static const XalanDOMChar s_normalizeSpace []
 
static const XalanDOMChar s_substringAfter []
 
static const XalanDOMChar s_systemProperty []
 
static const XalanDOMChar s_substringBefore []
 
static const XalanDOMChar s_elementAvailable []
 
static const XalanDOMChar s_functionAvailable []
 
static const XalanDOMChar s_unparsedEntityUri []
 
static const FunctionNameTableEntry s_functionNames []
 
static const SizeType s_functionNamesSize
 

Detailed Description

Class defines a table of functions that can be called in XPath expresions.

Definition at line 93 of file XPathFunctionTable.hpp.

Member Typedef Documentation

◆ DeleteFunctorType

Definition at line 101 of file XPathFunctionTable.hpp.

◆ SizeType

Definition at line 99 of file XPathFunctionTable.hpp.

◆ StringSizeType

Definition at line 100 of file XPathFunctionTable.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidFunctionNumberID 
TableSize 

Definition at line 97 of file XPathFunctionTable.hpp.

Constructor & Destructor Documentation

◆ XPathFunctionTable()

xalanc::XPathFunctionTable::XPathFunctionTable ( bool  fCreateTable = true)

Constructor.

Parameters
fCreateTableIf true, the internal table will be created. Otherwise, CreateTable() must be called.

◆ ~XPathFunctionTable()

xalanc::XPathFunctionTable::~XPathFunctionTable ( )

Member Function Documentation

◆ CreateTable()

void xalanc::XPathFunctionTable::CreateTable ( )

Set up the internal table.

◆ DestroyTable()

void xalanc::XPathFunctionTable::DestroyTable ( )

Destroy the internal table.

◆ get()

const Function& xalanc::XPathFunctionTable::get ( const XalanDOMString theFunctionName,
const Locator *  theLocator 
) const
inline

Retrieve the function object for a specified function name.

If the named Function is not found, an exception is thrown.

Parameters
theFunctionNameThe name of function
theLocatorThe Locator instance to use when reporting an error.
Returns
function named

Definition at line 138 of file XPathFunctionTable.hpp.

◆ getInstalledFunctionNames()

template<class OutputIteratorType >
void xalanc::XPathFunctionTable::getInstalledFunctionNames ( OutputIteratorType  theIterator) const
inline

Add a list of the names of installed functions to a vector of names.

Parameters
theIteratorfunction table iterator to append names to

Definition at line 309 of file XPathFunctionTable.hpp.

References xalanc::XalanDOMString::assign().

◆ idToName()

const XalanDOMString& xalanc::XPathFunctionTable::idToName ( int  theFunctionID,
XalanDOMString theResult 
) const
inline

Map a function ID to the corresponding name.

Parameters
theFunctionIDThe ID number of the function
Returns
The name of the function, or an empty string if the function doesn't exist.

Definition at line 218 of file XPathFunctionTable.hpp.

References xalanc::XalanDOMString::assign().

◆ InstallFunction() [1/2]

void xalanc::XPathFunctionTable::InstallFunction ( const XalanDOMChar *  theFunctionName,
const Function theFunction 
)

Insert a named function into the function table.

Parameters
theFunctionNamename of function
theFunctionfunction object corresponding to name

◆ InstallFunction() [2/2]

void xalanc::XPathFunctionTable::InstallFunction ( const XalanDOMString theFunctionName,
const Function theFunction 
)
inline

Insert a named function into the function table.

Parameters
theFunctionNamename of function
theFunctionfunction object corresponding to name

Definition at line 251 of file XPathFunctionTable.hpp.

References xalanc::XalanDOMString::c_str().

◆ isInstalledFunction()

bool xalanc::XPathFunctionTable::isInstalledFunction ( const XalanDOMString theFunctionName) const
inline

Whether a named function is in the function table.

Parameters
theFunctionNamename of function
Returns
true if function is in table

Definition at line 297 of file XPathFunctionTable.hpp.

◆ nameToID()

int xalanc::XPathFunctionTable::nameToID ( const XalanDOMString theName) const
inline

Map a function name to the corresponding ID number.

Parameters
theNamename of function
Returns
The ID number of function, or InvalidFunctionNumberID if the function doesn't exist.

Definition at line 239 of file XPathFunctionTable.hpp.

◆ operator[]()

const Function& xalanc::XPathFunctionTable::operator[] ( int  theFunctionID) const
inline

Retrieve the function object for a specified function ID number.

Parameters
theFunctionIDID number of the function
Returns
function named

Definition at line 203 of file XPathFunctionTable.hpp.

◆ setMemoryManager()

void xalanc::XPathFunctionTable::setMemoryManager ( MemoryManager &  theManager)
inline

Definition at line 113 of file XPathFunctionTable.hpp.

◆ UninstallFunction() [1/2]

bool xalanc::XPathFunctionTable::UninstallFunction ( const XalanDOMChar *  theFunctionName)

Remove a named function from the function table.

Parameters
theFunctionNamename of function
Returns
true if the function was found and removed.

◆ UninstallFunction() [2/2]

bool xalanc::XPathFunctionTable::UninstallFunction ( const XalanDOMString theFunctionName)
inline

Remove a named function from the function table.

Parameters
theFunctionNamename of function
Returns
true if the function was found and removed.

Definition at line 265 of file XPathFunctionTable.hpp.

References xalanc::XalanDOMString::c_str().

Member Data Documentation

◆ s_boolean

const XalanDOMChar xalanc::XPathFunctionTable::s_boolean[]
static

Definition at line 385 of file XPathFunctionTable.hpp.

◆ s_ceiling

const XalanDOMChar xalanc::XPathFunctionTable::s_ceiling[]
static

Definition at line 388 of file XPathFunctionTable.hpp.

◆ s_concat

const XalanDOMChar xalanc::XPathFunctionTable::s_concat[]
static

Definition at line 376 of file XPathFunctionTable.hpp.

◆ s_contains

const XalanDOMChar xalanc::XPathFunctionTable::s_contains[]
static

Definition at line 394 of file XPathFunctionTable.hpp.

◆ s_count

const XalanDOMChar xalanc::XPathFunctionTable::s_count[]
static

Definition at line 364 of file XPathFunctionTable.hpp.

◆ s_current

const XalanDOMChar xalanc::XPathFunctionTable::s_current[]
static

Definition at line 391 of file XPathFunctionTable.hpp.

◆ s_document

const XalanDOMChar xalanc::XPathFunctionTable::s_document[]
static

Definition at line 397 of file XPathFunctionTable.hpp.

◆ s_elementAvailable

const XalanDOMChar xalanc::XPathFunctionTable::s_elementAvailable[]
static

Definition at line 439 of file XPathFunctionTable.hpp.

◆ s_false

const XalanDOMChar xalanc::XPathFunctionTable::s_false[]
static

Definition at line 367 of file XPathFunctionTable.hpp.

◆ s_floor

const XalanDOMChar xalanc::XPathFunctionTable::s_floor[]
static

Definition at line 370 of file XPathFunctionTable.hpp.

◆ s_formatNumber

const XalanDOMChar xalanc::XPathFunctionTable::s_formatNumber[]
static

Definition at line 418 of file XPathFunctionTable.hpp.

◆ s_functionAvailable

const XalanDOMChar xalanc::XPathFunctionTable::s_functionAvailable[]
static

Definition at line 442 of file XPathFunctionTable.hpp.

◆ s_functionNames

const FunctionNameTableEntry xalanc::XPathFunctionTable::s_functionNames[]
static

Definition at line 448 of file XPathFunctionTable.hpp.

◆ s_functionNamesSize

const SizeType xalanc::XPathFunctionTable::s_functionNamesSize
static

Definition at line 451 of file XPathFunctionTable.hpp.

◆ s_generateId

const XalanDOMChar xalanc::XPathFunctionTable::s_generateId[]
static

Definition at line 412 of file XPathFunctionTable.hpp.

◆ s_id

const XalanDOMChar xalanc::XPathFunctionTable::s_id[]
static

Definition at line 340 of file XPathFunctionTable.hpp.

◆ s_key

const XalanDOMChar xalanc::XPathFunctionTable::s_key[]
static

Definition at line 343 of file XPathFunctionTable.hpp.

◆ s_lang

const XalanDOMChar xalanc::XPathFunctionTable::s_lang[]
static

Definition at line 352 of file XPathFunctionTable.hpp.

◆ s_last

const XalanDOMChar xalanc::XPathFunctionTable::s_last[]
static

Definition at line 355 of file XPathFunctionTable.hpp.

◆ s_localName

const XalanDOMChar xalanc::XPathFunctionTable::s_localName[]
static

Definition at line 409 of file XPathFunctionTable.hpp.

◆ s_name

const XalanDOMChar xalanc::XPathFunctionTable::s_name[]
static

Definition at line 358 of file XPathFunctionTable.hpp.

◆ s_namespaceUri

const XalanDOMChar xalanc::XPathFunctionTable::s_namespaceUri[]
static

Definition at line 421 of file XPathFunctionTable.hpp.

◆ s_normalizeSpace

const XalanDOMChar xalanc::XPathFunctionTable::s_normalizeSpace[]
static

Definition at line 427 of file XPathFunctionTable.hpp.

◆ s_not

const XalanDOMChar xalanc::XPathFunctionTable::s_not[]
static

Definition at line 346 of file XPathFunctionTable.hpp.

◆ s_number

const XalanDOMChar xalanc::XPathFunctionTable::s_number[]
static

Definition at line 379 of file XPathFunctionTable.hpp.

◆ s_position

const XalanDOMChar xalanc::XPathFunctionTable::s_position[]
static

Definition at line 400 of file XPathFunctionTable.hpp.

◆ s_round

const XalanDOMChar xalanc::XPathFunctionTable::s_round[]
static

Definition at line 373 of file XPathFunctionTable.hpp.

◆ s_startsWith

const XalanDOMChar xalanc::XPathFunctionTable::s_startsWith[]
static

Definition at line 415 of file XPathFunctionTable.hpp.

◆ s_string

const XalanDOMChar xalanc::XPathFunctionTable::s_string[]
static

Definition at line 382 of file XPathFunctionTable.hpp.

◆ s_stringLength

const XalanDOMChar xalanc::XPathFunctionTable::s_stringLength[]
static

Definition at line 424 of file XPathFunctionTable.hpp.

◆ s_substring

const XalanDOMChar xalanc::XPathFunctionTable::s_substring[]
static

Definition at line 403 of file XPathFunctionTable.hpp.

◆ s_substringAfter

const XalanDOMChar xalanc::XPathFunctionTable::s_substringAfter[]
static

Definition at line 430 of file XPathFunctionTable.hpp.

◆ s_substringBefore

const XalanDOMChar xalanc::XPathFunctionTable::s_substringBefore[]
static

Definition at line 436 of file XPathFunctionTable.hpp.

◆ s_sum

const XalanDOMChar xalanc::XPathFunctionTable::s_sum[]
static

Definition at line 349 of file XPathFunctionTable.hpp.

◆ s_systemProperty

const XalanDOMChar xalanc::XPathFunctionTable::s_systemProperty[]
static

Definition at line 433 of file XPathFunctionTable.hpp.

◆ s_translate

const XalanDOMChar xalanc::XPathFunctionTable::s_translate[]
static

Definition at line 406 of file XPathFunctionTable.hpp.

◆ s_true

const XalanDOMChar xalanc::XPathFunctionTable::s_true[]
static

Definition at line 361 of file XPathFunctionTable.hpp.

◆ s_unparsedEntityUri

const XalanDOMChar xalanc::XPathFunctionTable::s_unparsedEntityUri[]
static

Definition at line 445 of file XPathFunctionTable.hpp.


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