Xalan-C++ API Documentation
Go to the documentation of this file.
18 #if !defined(DOMSTRINGHELPER_HEADER_GUARD_1357924680)
19 #define DOMSTRINGHELPER_HEADER_GUARD_1357924680
31 #if defined(XALAN_CLASSIC_IOSTREAMS)
56 XALAN_CPP_NAMESPACE_BEGIN
68 template<
class InputIteratorType,
class OutputIteratorType>
69 inline OutputIteratorType
71 InputIteratorType begin,
72 InputIteratorType end,
73 OutputIteratorType iterator)
75 return XALAN_STD_QUALIFIER copy(begin, end, iterator);
80 template<
class InputIteratorType,
class OutputIteratorType,
class UnaryFunction>
81 inline OutputIteratorType
83 InputIteratorType begin,
84 InputIteratorType end,
85 OutputIteratorType iterator,
86 UnaryFunction
function)
88 return XALAN_STD_QUALIFIER transform(begin, end, iterator);
102 inline const XalanDOMChar*
105 return theString.
c_str();
120 if (theString.
empty() ==
true)
126 const char*
const ptr = &theString[0];
128 assert(ptr[theString.
size() - 1] ==
'\0');
153 inline const XalanDOMChar*
170 inline const XalanDOMChar*
173 return theString.
c_str();
186 inline const XalanDOMChar*
206 return theString.
empty() ==
true ? 0 : &theString[0];
241 return theString.
length();
256 assert(theString != 0);
258 const XalanDOMChar* theBufferPointer = theString;
260 while(*theBufferPointer != 0)
279 assert(theString != 0);
313 const XalanDOMChar* theString,
314 XalanDOMChar theChar)
316 assert(theString != 0);
318 const XalanDOMChar* thePointer = theString;
320 while(*thePointer != theChar && *thePointer != 0)
342 const XalanDOMChar* theString,
344 XalanDOMChar theChar)
346 assert(theString != 0);
348 const XalanDOMChar* thePointer = theString;
349 const XalanDOMChar*
const theEndPointer = theString + theStringLength;
351 while(*thePointer != theChar && thePointer != theEndPointer)
373 XalanDOMChar theChar)
393 const XalanDOMChar* theString,
395 const XalanDOMChar* theSubstring,
411 const XalanDOMChar* theString,
412 const XalanDOMChar* theSubstring)
414 assert(theString != 0 && theSubstring != 0);
449 const XalanDOMChar* theString,
450 XalanDOMChar theChar);
466 XalanDOMChar theChar)
484 const XalanDOMChar* theString,
486 const XalanDOMChar* theSubstring,
500 const XalanDOMChar* theString,
501 const XalanDOMChar* theSubstring)
503 assert(theString != 0 && theSubstring != 0);
519 const XalanDOMChar* theString,
522 assert(theString != 0);
527 theSubstring.
c_str(),
543 const XalanDOMChar* theSubstring)
545 assert(theSubstring != 0);
567 const XalanDOMChar* theSubstring,
570 assert(theSubstring != 0);
596 theSubstring.
c_str(),
611 const XalanDOMChar* theString,
613 const XalanDOMChar* theSubstring,
627 const XalanDOMChar* theString,
628 const XalanDOMChar* theSubstring)
630 assert(theString != 0 && theSubstring != 0);
656 theSubstring.
c_str(),
671 const void* theValue,
684 initialize(MemoryManager& theMemoryManager);
693 MemberFunctionPtr
function);
699 MemberFunctionPtr
function);
705 MemberFunctionPtr
function);
761 unsigned long theValue,
799 unsigned int theValue,
837 unsigned short theValue,
903 unsigned long theValue,
941 unsigned int theValue,
979 unsigned short theValue,
1050 const XalanDOMChar* theString,
1051 MemoryManager& theMemoryManager);
1089 inline unsigned long
1107 MemoryManager& theMemoryManager)
1142 std::ostream& theStream,
1158 const XalanDOMChar* theString);
1174 std::ostream& theStream,
1176 const XalanDOMChar* theString,
1177 MemoryManager& theMemoryManager);
1193 if (theString.
empty() ==
false)
1216 std::ostream& theStream,
1219 MemoryManager& theMemoryManager)
1257 #if defined(XALAN_NO_STD_NAMESPACE)
1262 inline std::ostream&
1264 std::ostream& theStream,
1287 const XalanDOMChar* theString)
1305 #if defined(XALAN_NO_STD_NAMESPACE)
1310 inline std::ostream&
1312 std::ostream& theStream,
1314 const XalanDOMChar* theString)
1353 #if defined(XALAN_NO_STD_NAMESPACE)
1358 inline std::ostream&
1360 std::ostream& theStream,
1381 #if defined(XALAN_NO_STD_NAMESPACE)
1386 inline std::ostream&
1388 std::ostream& theStream,
1395 theString.getMemoryManager());
1416 return theString[theIndex];
1481 const XalanDOMChar* theString,
1611 const XalanDOMChar* theString,
1656 const XalanDOMChar* theString,
1724 const XalanDOMChar* theLHS,
1726 const XalanDOMChar* theRHS,
1744 const XalanDOMChar* theLHS,
1745 const XalanDOMChar* theRHS)
1792 const XalanDOMChar* theLHS,
1818 const XalanDOMChar* theRHS)
1846 const XalanDOMChar* theLHS,
1848 const XalanDOMChar* theRHS,
1868 const XalanDOMChar* theLHS,
1869 const XalanDOMChar* theRHS)
1921 const XalanDOMChar* theRHS)
1947 const XalanDOMChar* theLHS,
1971 const XalanDOMChar* theLHS,
1973 const XalanDOMChar* theRHS,
1990 const XalanDOMChar* theLHS,
1991 const XalanDOMChar* theRHS);
2025 const XalanDOMChar* theLHS,
2044 const XalanDOMChar* theRHS)
2065 const XalanDOMChar* theLHS,
2066 const XalanDOMChar* theRHS,
2082 const XalanDOMChar* theLHS,
2084 const XalanDOMChar* theRHS,
2087 return theLHSLength != theRHSLength ? false :
equals(theLHS, theRHS, theLHSLength);
2101 const XalanDOMChar* theLHS,
2102 const XalanDOMChar* theRHS)
2106 return theLHSLength !=
length(theRHS) ? false :
equals(theLHS, theRHS, theLHSLength);
2123 return theLHS == theRHS;
2137 const XalanDOMChar* theLHS,
2140 assert(theLHS != 0);
2143 return theRHS == theLHS;
2157 const XalanDOMChar* theRHS)
2159 return equals(theRHS, theLHS);
2175 const XalanDOMChar* theRHS,
2178 return theRHSLength != theLHS.
length() ? false :
equals(theLHS.
c_str(), theRHSLength, theRHS, theRHSLength);
2194 const XalanDOMChar* theLHS,
2195 const XalanDOMChar* theRHS,
2212 const XalanDOMChar* theLHS,
2214 const XalanDOMChar* theRHS,
2217 return theLHSLength != theRHSLength ? false :
2233 const XalanDOMChar* theLHS,
2234 const XalanDOMChar* theRHS)
2238 return theLength !=
length(theRHS) ? false :
2259 return theLength != theRHS.
length() ? false :
2278 const XalanDOMChar* theLHS,
2283 return theRHSLength !=
length(theLHS) ? false :
2303 const XalanDOMChar* theRHS)
2324 return compare(theLHS, theRHS) < 0 ? true :
false;
2343 return compare(theLHS, theRHS) < 0 ? true :
false;
2363 theString = theStringToAssign;
2383 const XalanDOMChar* theStringToAssign,
2388 theString.
assign(theStringToAssign);
2392 theString.
assign(theStringToAssign, theStringToAssignLength);
2414 theString.
append(theStringToAppend);
2434 const XalanDOMChar* theStringToAppend,
2437 assert(theStringToAppend != 0);
2441 theString.
append(theStringToAppend);
2445 theString.
append(theStringToAppend, theStringToAppendLength);
2466 const char* theStringToAppend,
2492 const XalanDOMChar theCharToAppend)
2494 theString.
append(1, theCharToAppend);
2513 char theCharToAppend)
2516 char theTempBuffer[] = { theCharToAppend,
'\0' };
2518 return append(theString, theTempBuffer);
2539 theString.
insert(thePosition, theStringToInsert);
2560 const XalanDOMChar* theStringToInsert)
2562 theString.
insert(thePosition, theStringToInsert);
2629 const XalanDOMChar* theString,
2636 const char* theString,
2653 bool fTranscode =
true);
2686 #if defined(XALAN_NO_STD_NAMESPACE)
2687 struct c_wstr_functor :
public unary_function<XalanDOMString, const XalanDOMChar*>
2689 struct
c_wstr_functor :
public std::unary_function<XalanDOMString, const XalanDOMChar*>
2695 return theString.c_str();
2708 #if defined(XALAN_NO_STD_NAMESPACE)
2716 second_argument_type theRHS)
const
2731 #if defined(XALAN_NO_STD_NAMESPACE)
2739 second_argument_type theRHS)
const
2741 return compare(theLHS, theRHS) <= 0 ? true :
false;
2754 #if defined(XALAN_NO_STD_NAMESPACE)
2762 second_argument_type theRHS)
const
2764 return compare(theLHS, theRHS) > 0 ? true :
false;
2777 #if defined(XALAN_NO_STD_NAMESPACE)
2785 second_argument_type theRHS)
const
2787 return compare(theLHS, theRHS) >= 0 ? true :
false;
2798 #if defined(XALAN_NO_STD_NAMESPACE)
2814 first_argument_type theLHS,
2815 second_argument_type theRHS)
const
2844 const XalanDOMChar ch[],
2859 assert(theString != 0);
2866 XALAN_CPP_NAMESPACE_END
2870 #endif // DOMSTRINGHELPER_HEADER_GUARD_1357924680
toLowerCaseASCII(const XalanDOMChar *theString, XalanDOMString &theResult)
Converts ASCII alphabetic characters from upper case to lower case.
unsigned long DOMStringToUnsignedLong(const XalanDOMString &theString)
Converts a XalanDOMString into a long value.
bool operator<(const CharVectorType &theLHS, const CharVectorType &theRHS)
Implements operator< for CharVectorType.
compareIgnoreCaseASCII(const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
Compare the contents of two arrays in a case insensitive manner.
void releaseMemory(XalanDOMString &theString, MemoryManager &theManager)
Remove all elements from target string and frees all allocated memory.
result_type operator()(const argument_type &theString) const
CopyStringToVector(const char *theString, CharVectorType &theVector)
double DOMStringToDouble(const XalanDOMString &theString, MemoryManager &theMemoryManager)
Converts a XalanDOMString into a double value.
lastIndexOf(const XalanDOMChar *theString, XalanDOMChar theChar)
Simulates the java String method lastIndexOf().
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Less than or equal functor for DOMStrings.
const char * c_str(const CharVectorType &theString)
Get the underlying representation of the target CharVectorType as a null-terminated string.
const XalanDOMString TranscodeFromLocalCodePage(const char *theSourceString, XalanDOMString::size_type theSourceStringLength=XalanDOMString::npos)
Convert a string to a XalanDOMString, transcoding from the default local code page.
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.
bool isXMLDigit(XalanDOMChar theChar)
Determines whether character represents a digit.
static bool isLetter(XalanDOMChar c)
Greater than or equal functor for DOMStrings.
void reserve(XalanDOMString &theString, XalanDOMString::size_type theCount)
Reserve some space in the string for more efficient concatenation...
iterator erase(iterator thePosition)
void reserve(size_type theCount=0)
void clear(XalanDOMString &theString)
Remove all elements from target string.
long DOMStringToLong(const XalanDOMString &theString)
Converts a XalanDOMString into a long value.
XalanDOMChar charAt(const XalanDOMString &theString, XalanDOMString::size_type theIndex)
Retrieves a character at a specified index in the target string.
XalanDOMString & assign(XalanDOMString &theString, const XalanDOMString &theStringToAssign)
Assign one string to another.
XalanDOMString & append(const XalanDOMString &theSource)
toUpperCaseASCII(const XalanDOMChar *theString, XalanDOMString &theResult)
Converts ASCII alphabetic characters from lower case to upper case.
XalanDOMString & assign(const XalanDOMChar *theSource)
Less than functor for DOMStrings which ignores case for the characters a-z and A-Z.
static MemoryManager & getDefault()
static bool isWhitespace(XalanDOMChar c)
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
const XalanDOMChar * c_str() const
int DOMStringToInt(const XalanDOMString &theString)
Converts a XalanDOMString into an integer value.
void erase(XalanDOMString &theString)
Remove all elements from target string.
PointerToDOMString(const void *theValue, XalanDOMString &theResult)
Converts a pointer into a XalanDOMString.
XalanDOMChar flipCaseASCII(XalanDOMChar theChar)
Flips the case to of the supplied character.
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
bool isEmpty(const XalanDOMString &str)
Determines if the target string contains any elements.
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
Compare the values of two objects.
XalanDOMString & insert(size_type thePosition, const XalanDOMString &theString)
equalsIgnoreCaseASCII(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality, without regard for case.
Greater than functor for DOMStrings.
MemoryManager & getMemoryManager()
XalanDOMChar toLowerASCII(XalanDOMChar theChar)
Converts ASCII alphabetic characters from upper case to lower case.
#define XALAN_NO_STD_NAMESPACE
static bool isDigit(XalanDOMChar c)
XalanDOMChar toUpperASCII(XalanDOMChar theChar)
Converts ASCII alphabetic characters from lower case to upper case.
XALAN_CPP_NAMESPACE_BEGIN XALAN_USING_XERCES(Locator)
const XalanDOMChar * toCharArray(const XalanDOMString &theString)
Get the underlying representation of the target XalanDOMString as an array of XalanDOMChar,...
NumberToHexDOMString(XALAN_UINT64 theValue, XalanDOMString &theResult)
Converts an 64-bit unsigned value into a XalanDOMString.
bool isXMLWhitespace(XalanDOMChar theChar)
Determines whether character represents white space.
bool isXMLLetterOrDigit(XalanDOMChar theChar)
Determines whether character represents a letter or digit.
MakeXalanDOMCharVector(const char *data, XalanDOMCharVectorType &result, bool fTranscode=true)
Utility function to make a null-terminated vector of XMLChs, from a null-terminated array of chars,...
XalanDOMString & insert(XalanDOMString &theString, XalanDOMString::size_type thePosition, const XalanDOMString &theStringToInsert)
Insert a string into another string.
void swap(XalanDOMString &theOther)
endsWith(const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
Simulates the java String method endsWith().
result_type operator()(first_argument_type theLHS, second_argument_type theRHS) const
WideStringToDouble(const XalanDOMChar *theString, MemoryManager &theMemoryManager)
Converts a wide string into a double value.
OutputString(XalanOutputStream &theStream, const CharVectorType &theString)
Outputs the target string to the specified stream.
XalanDOMString::size_type indexOf(const XalanDOMChar *theString, XalanDOMChar theChar)
Simulates the java String method indexOf().
WideStringToLong(const XalanDOMChar *theString)
Converts a wide string into a long value.
trim(const XalanDOMString &theString, XalanDOMString &theResult)
Remove leading and trailing whitespace.
const XalanDOMChar * c_wstr(const XalanDOMString &theString)
Get the underlying representation of the target XalanDOMString as a null-terminated string.
collationCompare(const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
Compare the contents of two character arrays.
OutputIteratorType XalanTransform(InputIteratorType begin, InputIteratorType end, OutputIteratorType iterator, UnaryFunction function)
NumberToDOMString(double theValue, XalanDOMString &theResult)
Converts a double value into a XalanDOMString.
OutputIteratorType XalanCopy(InputIteratorType begin, InputIteratorType end, OutputIteratorType iterator)
WideStringToInt(const XalanDOMChar *theString)
Converts a wide string into an integer value.
XalanDOMString & append(XalanDOMString &theString, const XalanDOMString &theStringToAppend)
Concatenate two strings.
This functor is designed to compare 0-terminated wide strings in a case-insensitive manner.
compare(const CharVectorType &theLHS, const CharVectorType &theRHS)
Compare the contents of two strings.
WideStringToUnsignedLong(const XalanDOMChar *theString)
Converts a wide string into an unsigned long value.
startsWith(const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
Simulates the java String method startsWith().
XalanOutputStream & operator<<(XalanOutputStream &theStream, const CharVectorType &theString)
Outputs the string to the specified stream.
substring(const XalanDOMChar *theString, XalanDOMString &theSubstring, XalanDOMString::size_type theStartIndex, XalanDOMString::size_type theEndIndex=XalanDOMString::npos)
Simulates the java String method substring().
CopyWideStringToVector(const XalanDOMChar *theString, CharVectorType &theVector)
Interpreting class diagrams
Doxygen and
GraphViz are
used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.
|
|