18#if !defined(XPATHFUNCTIONTABLE_HEADER_GUARD_1357924680)
19#define XPATHFUNCTIONTABLE_HEADER_GUARD_1357924680
61 const Locator* theLocator);
79 const XalanDOMChar* theFunctionName,
81 const Locator* theLocator);
115 m_memoryManager = &theManager;
140 const Locator* theLocator)
const
142 const int theFunctionID =
143 getFunctionIndex(theFunctionName);
147 return *m_functionTable[theFunctionID];
151 MemoryManager*
const theManager = m_memoryManager;
174 const int theFunctionID =
175 getFunctionIndex(theFunctionName);
177 if (theFunctionID != InvalidFunctionNumberID)
179 return *m_functionTable[theFunctionID];
183 MemoryManager*
const theManager = m_memoryManager;
185 XalanDOMString theResult(*theManager);
187 throw XPathExceptionFunctionNotAvailable(
205 assert(theFunctionID >= 0 && theFunctionID <
TableSize);
206 assert(m_functionTable[theFunctionID] != 0);
208 return *m_functionTable[theFunctionID];
222 if (theFunctionID >= 0 && theFunctionID <
TableSize)
241 return getFunctionIndex(theName);
278 const XalanDOMChar* theFunctionName,
307 template<
class OutputIteratorType>
315 if (m_functionTable[i] != 0)
321 *theIterator = theString;
340 static const XalanDOMChar
s_id[];
458 return getFunctionIndex(
464 getFunctionIndex(
const XalanDOMChar* theName)
466 return getFunctionIndex(
473 const XalanDOMChar* theName,
474 StringSizeType theNameLength);
476 MemoryManager* m_memoryManager;
478 const Function* m_functionTable[TableSize];
480 const Function**
const m_functionTableEnd;
483 static const FunctionNameTableEntry*
const s_lastFunctionName;
#define XALAN_CPP_NAMESPACE
#define XALAN_XPATH_EXPORT
xercesc::Locator LocatorType
Exception class thrown when an unknown function is encountered.
XPathExceptionFunctionNotAvailable(const XPathExceptionFunctionNotAvailable &other)
Function::LocatorType LocatorType
XPathExceptionFunctionNotAvailable(const XalanDOMString &theFunctionName, XalanDOMString &theResult, const Locator *theLocator)
~XPathExceptionFunctionNotAvailable()
~XPathExceptionFunctionNotSupported()
XPathExceptionFunctionNotSupported(const XalanDOMChar *theFunctionName, XalanDOMString &theResult, const Locator *theLocator)
XPathExceptionFunctionNotSupported(const XPathExceptionFunctionNotSupported &other)
static const XalanDOMChar s_id[]
static const XalanDOMChar s_lang[]
static const XalanDOMChar s_boolean[]
static const XalanDOMChar s_translate[]
bool UninstallFunction(const XalanDOMString &theFunctionName)
Remove a named function from the function table.
static const XalanDOMChar s_stringLength[]
void InstallFunction(const XalanDOMString &theFunctionName, const Function &theFunction)
Insert a named function into the function table.
static const XalanDOMChar s_functionAvailable[]
const Function & get(const XalanDOMString &theFunctionName, const Locator *theLocator) const
Retrieve the function object for a specified function name.
static const XalanDOMChar s_substringBefore[]
void DestroyTable()
Destroy the internal table.
static const XalanDOMChar s_number[]
void setMemoryManager(MemoryManager &theManager)
static const XalanDOMChar s_false[]
static const XalanDOMChar s_substring[]
static const XalanDOMChar s_current[]
bool isInstalledFunction(const XalanDOMString &theFunctionName) const
Whether a named function is in the function table.
static const XalanDOMChar s_count[]
const Function & operator[](int theFunctionID) const
Retrieve the function object for a specified function ID number.
static const XalanDOMChar s_document[]
int nameToID(const XalanDOMString &theName) const
Map a function name to the corresponding ID number.
static const XalanDOMChar s_true[]
static const XalanDOMChar s_generateId[]
static const XalanDOMChar s_key[]
static const XalanDOMChar s_namespaceUri[]
void CreateTable()
Set up the internal table.
static const XalanDOMChar s_position[]
static const XalanDOMChar s_elementAvailable[]
@ InvalidFunctionNumberID
static const FunctionNameTableEntry s_functionNames[]
const XalanDOMString & idToName(int theFunctionID, XalanDOMString &theResult) const
Map a function ID to the corresponding name.
static const XalanDOMChar s_ceiling[]
static const XalanDOMChar s_sum[]
static const XalanDOMChar s_unparsedEntityUri[]
static const XalanDOMChar s_concat[]
static const XalanDOMChar s_localName[]
static const SizeType s_functionNamesSize
static const XalanDOMChar s_string[]
XPathFunctionTable(bool fCreateTable=true)
Constructor.
XalanDOMString::size_type StringSizeType
DeleteFunctor< Function > DeleteFunctorType
void InstallFunction(const XalanDOMChar *theFunctionName, const Function &theFunction)
Insert a named function into the function table.
static const XalanDOMChar s_round[]
static const XalanDOMChar s_contains[]
bool UninstallFunction(const XalanDOMChar *theFunctionName)
Remove a named function from the function table.
static const XalanDOMChar s_floor[]
static const XalanDOMChar s_normalizeSpace[]
static const XalanDOMChar s_startsWith[]
static const XalanDOMChar s_formatNumber[]
static const XalanDOMChar s_name[]
static const XalanDOMChar s_systemProperty[]
void getInstalledFunctionNames(OutputIteratorType theIterator) const
Add a list of the names of installed functions to a vector of names.
static const XalanDOMChar s_last[]
static const XalanDOMChar s_substringAfter[]
static const XalanDOMChar s_not[]
const XalanDOMChar * c_str() const
XalanDOMString & assign(const XalanDOMChar *theSource)
static MemoryManager & getDefaultXercesMemMgr()
XalanXPathException(const XalanDOMString &theMessage, MemoryManager &theManager)
Construct an XPath exeption object.
Functor to delete objects, used in STL iteration algorithms.
const XalanDOMChar * m_name