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);
97 enum { InvalidFunctionNumberID = -1, TableSize = 36 };
115 m_memoryManager = &theManager;
140 const Locator* theLocator)
const
142 const int theFunctionID =
143 getFunctionIndex(theFunctionName);
145 if (theFunctionID != InvalidFunctionNumberID)
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)
225 s_functionNames[theFunctionID].m_name,
226 s_functionNames[theFunctionID].m_size);
241 return getFunctionIndex(theName);
255 InstallFunction(theFunctionName.
c_str(), theFunction);
267 return UninstallFunction(theFunctionName.
c_str());
278 const XalanDOMChar* theFunctionName,
288 UninstallFunction(
const XalanDOMChar* theFunctionName);
299 return getFunctionIndex(theFunctionName) != InvalidFunctionNumberID ? true :
false;
307 template<
class OutputIteratorType>
313 for (
int i = 0; i < TableSize; ++i)
315 if (m_functionTable[i] != 0)
318 s_functionNames[i].m_name,
319 s_functionNames[i].m_size);
321 *theIterator = theString;
340 static const XalanDOMChar s_id[];
343 static const XalanDOMChar s_key[];
346 static const XalanDOMChar s_not[];
349 static const XalanDOMChar s_sum[];
352 static const XalanDOMChar s_lang[];
355 static const XalanDOMChar s_last[];
358 static const XalanDOMChar s_name[];
361 static const XalanDOMChar s_true[];
364 static const XalanDOMChar s_count[];
367 static const XalanDOMChar s_false[];
370 static const XalanDOMChar s_floor[];
373 static const XalanDOMChar s_round[];
376 static const XalanDOMChar s_concat[];
379 static const XalanDOMChar s_number[];
382 static const XalanDOMChar s_string[];
385 static const XalanDOMChar s_boolean[];
388 static const XalanDOMChar s_ceiling[];
391 static const XalanDOMChar s_current[];
394 static const XalanDOMChar s_contains[];
397 static const XalanDOMChar s_document[];
400 static const XalanDOMChar s_position[];
403 static const XalanDOMChar s_substring[];
406 static const XalanDOMChar s_translate[];
409 static const XalanDOMChar s_localName[];
412 static const XalanDOMChar s_generateId[];
415 static const XalanDOMChar s_startsWith[];
418 static const XalanDOMChar s_formatNumber[];
421 static const XalanDOMChar s_namespaceUri[];
424 static const XalanDOMChar s_stringLength[];
427 static const XalanDOMChar s_normalizeSpace[];
430 static const XalanDOMChar s_substringAfter[];
433 static const XalanDOMChar s_systemProperty[];
436 static const XalanDOMChar s_substringBefore[];
439 static const XalanDOMChar s_elementAvailable[];
442 static const XalanDOMChar s_functionAvailable[];
445 static const XalanDOMChar s_unparsedEntityUri[];
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;
492 #endif // XPATHFUNCTIONTABLE_HEADER_GUARD_1357924680