|
Xalan-C++ API Reference
1.12.0
|
Go to the documentation of this file.
18 #if !defined(XALANDOMSTRING_HEADER_GUARD_1357924680)
19 #define XALANDOMSTRING_HEADER_GUARD_1357924680
70 const char* theString,
82 const XalanDOMChar* theString,
92 clone(MemoryManager& theManager);
127 return m_data.begin();
135 return m_data.begin();
143 return m_data.empty() ==
true ? m_data.end() : m_data.end() - 1;
151 return m_data.empty() ==
true ? m_data.end() : m_data.end() - 1;
161 if (m_data.empty() ==
false)
169 const_reverse_iterator
176 if (m_data.empty() ==
false)
189 return m_data.rend();
192 const_reverse_iterator
197 return m_data.rend();
227 XalanDOMChar theChar);
234 resize(theCount, XalanDOMChar(0));
245 return theCapacity == 0 ? 0 :
size_type(theCapacity - 1);
253 m_data.reserve(theCount + 1);
261 m_data.erase(m_data.begin(), m_data.end());
273 m_data.erase(thePosition);
289 m_data.erase(theFirst, theLast);
291 m_size = m_data.size() - 1;
308 return m_size == 0 ? true :
false;
316 return m_data[theIndex];
324 return m_data[theIndex];
332 return m_data.at(theIndex);
340 return m_data.at(theIndex);
348 return m_data.empty() ==
true ? &s_empty : &m_data[0];
364 m_data.swap(theOther.m_data);
403 const XalanDOMChar* theSource,
412 return append(theSource, theCount);
429 const char* theSource,
438 return append(theSource, theCount);
452 if (&theSource !=
this)
454 m_data = theSource.m_data;
456 m_size = theSource.m_size;
467 XalanDOMChar theChar)
475 return append(theCount, theChar);
480 iterator theFirstPosition,
481 iterator theLastPosition);
495 assert(thePosition < theSource.
length() &&
496 (theCount ==
size_type(npos) || thePosition + theCount <= theSource.
length()));
498 return append(theSource.
c_str() + thePosition, theCount);
503 const XalanDOMChar* theString,
514 const char* theString,
526 XalanDOMChar theChar);
553 return insert(thePosition1, theString.
c_str() + thePosition2, theCount);
559 const XalanDOMChar* theString,
565 const XalanDOMChar* theString)
567 return insert(thePosition, theString,
length(theString));
574 XalanDOMChar theChar);
578 iterator thePosition,
579 XalanDOMChar theChar);
583 iterator thePosition,
585 XalanDOMChar theChar);
589 iterator theInsertPosition,
590 iterator theFirstPosition,
591 iterator theLastPosition);
601 (thePosition + theCount <=
length()));
605 return theSubstring.
assign(
608 theCount == npos ?
length() : theCount);
640 return compare(thePosition1, theCount1, theString.
c_str() + thePosition2, theCount2);
644 compare(
const XalanDOMChar* theString)
const;
650 const XalanDOMChar* theString,
655 reset(MemoryManager& theManager,
const char* theString);
658 reset(MemoryManager& theManager,
const XalanDOMChar* theString);
690 return m_data.getMemoryManager();
701 const XalanDOMChar* theString,
704 assert(theString != 0);
711 const XalanDOMChar* theLHS,
713 const XalanDOMChar* theRHS,
718 const XalanDOMChar* theLHS,
719 const XalanDOMChar* theRHS)
732 const XalanDOMChar* theRHS)
739 const XalanDOMChar* theLHS,
753 length(
const XalanDOMChar* theString);
763 length(
const char* theString);
776 assert((m_data.empty() ==
true && m_size == 0) || m_size == m_data.size() - 1);
777 assert(m_data.empty() ==
true || m_data.back() == 0);
791 return m_data.empty() ==
true ? m_data.end() : m_data.end() - 1;
799 return m_data.empty() ==
true ? m_data.end() : m_data.end() - 1;
807 return m_data.begin() + thePosition;
815 return m_data.begin() + thePosition;
818 #if defined (XALAN_DEVELOPMENT)
831 static const XalanDOMChar s_empty;
847 return theKey.
hash();
864 assert (theKey != 0);
866 return theKey->
hash();
938 return theLHS.
compare(theRHS) < 0 ? true :
false;
956 assert(theLHS != 0 && theRHS != 0);
976 assert(theLHS != 0 && theRHS != 0);
978 return theLHS->
compare(*theRHS) < 0 ? true :
false;
1006 const XalanDOMChar* theRHS)
1015 const XalanDOMChar* theLHS,
1029 return !(theLHS == theRHS);
1036 const XalanDOMChar* theLHS,
1039 return !(theLHS == theRHS);
1047 const XalanDOMChar* theRHS)
1049 return !(theRHS == theLHS);
1054 inline XalanDOMString&
1056 const XalanDOMString& theLHS,
1057 const XalanDOMString& theRHS,
1058 XalanDOMString& result)
1060 result.assign(theLHS);
1062 return result += theRHS;
1067 inline XalanDOMString&
1069 const XalanDOMString& theLHS,
1070 const XalanDOMChar* theRHS,
1071 XalanDOMString& result)
1073 result.assign(theLHS);
1075 return result += theRHS;
1080 inline XalanDOMString&
1082 const XalanDOMChar* theLHS,
1083 const XalanDOMString& theRHS,
1084 XalanDOMString& result)
1086 result.assign(theLHS);
1088 return result += theRHS;
1093 inline const XalanDOMString&
1096 const XalanDOMString& theRHS,
1097 XalanDOMString& result)
1099 result.assign(theLHS);
1101 result.append(theRHS);
1108 inline const XalanDOMString&
1110 const XalanDOMString& theLHS,
1112 XalanDOMString& result)
1114 result.assign(theLHS);
1116 result.append(theRHS);
1145 const XalanDOMChar* theSourceString,
1148 bool terminate =
false);
1165 const XalanDOMChar* theSourceString,
1169 char theSubstitutionChar);
1179 #if !defined(XALAN_DEVELOPMENT)
1182 const char* theSourceString,
1185 return XalanDOMString(theSourceString,XalanMemMgrs::getDefaultXercesMemMgr(), theSourceStringLength);
1202 const XalanDOMChar* theSourceString,
1204 bool terminate =
false);
1217 const XalanDOMChar* theSourceString,
1220 char theSubstitutionChar);
1230 #if !defined(XALAN_DEVELOPMENT)
1256 bool terminate =
false)
1259 theSourceString.
c_str(),
1277 const XalanDOMString& theSourceString,
1280 char theSubstitutionChar);
1292 #if !defined(XALAN_DEVELOPMENT)
1314 inline const XalanDOMString&
1316 const char* theSourceString,
1320 theResult.
assign(theSourceString, theSourceStringLength);
1340 const char* theSourceString,
1343 bool terminate =
false);
1357 const char* theSourceString,
1359 bool terminate =
false);
1375 const char* theSourceString,
1377 bool theSourceStringIsNullTerminated,
1379 bool terminate =
false);
1392 XalanDOMString& theResult);
1403 #endif // !defined(XALANDOMSTRING_HEADER_GUARD_1357924680)
DOMStringPointerHashFunction Hasher
XalanDOMString & insert(size_type thePosition1, const XalanDOMString &theString, size_type thePosition2, size_type theCount)
const_iterator getBackInsertIterator() const
reverse_iterator rbegin()
XalanDOMString & operator=(const XalanDOMChar *theRHS)
Equals functor for DOMStrings.
iterator erase(iterator theFirst, iterator theLast)
MemoryManager & getMemoryManager()
XalanDOMString & assign(const XalanDOMChar *theSource)
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
XalanDOMString & operator=(const XalanDOMString &theRHS)
pointer_equal< XalanDOMString > Comparator
const_iterator getIteratorForPosition(size_type thePosition) const
reference at(size_type theIndex)
Hash functor for DOMStrings.
static size_t hash(const XalanDOMChar *theString, size_type theLength)
XalanDOMString & append(const XalanDOMString &theSource, size_type thePosition, size_type theCount)
iterator getIteratorForPosition(size_type thePosition)
static bool equals(const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
XalanDOMString & substr(XalanDOMString &theSubstring, size_type thePosition=0, size_type theCount=size_type(npos)) const
XalanDOMCharVectorType::const_reverse_iterator const_reverse_iterator
#define XALAN_USES_MEMORY_MANAGER(Type)
TranscodeFromLocalCodePage(const CharVectorType &theSourceString, XalanDOMString &theResult)
Convert a vector of characters to a XalanDOMString, transcoding from the default local code.
void swap(XalanVector< Type > &theLHS, XalanVector< Type > &theRHS)
XalanDOMString & assign(const XalanDOMString &theSource)
XalanDOMString & operator=(XalanDOMChar theRHS)
int compare(const XalanDOMString &theString) const
#define XALAN_DEFAULT_MEMMGR
const_reverse_iterator rbegin() const
XalanDOMString & append(const XalanDOMString &theSource)
int compare(size_type thePosition1, size_type theCount1, const XalanDOMString &theString, size_type thePosition2, size_type theCount2) const
XalanDOMString & assign(XalanDOMString &theString, const XalanDOMString &theStringToAssign)
Assign one string to another.
Less than functor for DOMStrings.
XalanDOMString & assign(const char *theSource)
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.
#define XALAN_DOM_EXPORT_FUNCTION(T)
const CharVectorType TranscodeToLocalCodePage(const XalanDOMString &theSourceString)
Convert XalanDOMString to C++ standard library vector, transcoding to the default local code page.
XalanDOMString & operator+=(const XalanDOMString &theSource)
XalanVector< XalanDOMChar > XalanDOMCharVectorType
DOMStringHashFunction Hasher
XalanDOMString & operator+=(XalanDOMChar theChar)
static const size_type npos
bool operator!=(const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
XalanVector< XalanDOMChar > XalanDOMCharVectorType
const_reverse_iterator_ const_reverse_iterator
pointer_equal< XalanDOMString > Comparator
size_type max_size() const
XalanDOMString & append(XalanDOMString &theString, const XalanDOMString &theStringToAppend)
Concatenate two strings.
compare(const CharVectorType &theLHS, const CharVectorType &theRHS)
Compare the contents of two strings.
const char * c_str(const CharVectorType &theString)
Get the underlying representation of the target CharVectorType as a null-terminated string.
int compare(size_type thePosition1, size_type theCount1, const XalanDOMString &theString) const
static bool equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
const_iterator end() const
Equal to functor for DOMStrings.
std::equal_to< XalanDOMString > Comparator
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
void swap(XalanDOMString &theOther)
void erase(XalanDOMString &theString)
Remove all elements from target string.
const_reference operator[](size_type theIndex) const
const_reference at(size_type theIndex) const
void resize(size_type theCount)
static bool equals(const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
XalanDOMString & assign(const XalanDOMChar *theSource, size_type theCount)
Not equals functor for DOMStrings.
DOMStringPointerHashFunction Hasher
XalanDOMString & operator+=(const XalanDOMChar *theString)
XalanDOMString & assign(const char *theSource, size_type theCount)
size_type capacity() const
XalanDOMString & assign(size_type theCount, XalanDOMChar theChar)
XalanVector< char > CharVectorType
iterator getBackInsertIterator()
XalanDOMCharVectorType::reverse_iterator reverse_iterator
const XalanDOMChar * c_str() const
XalanDOMString & insert(size_type thePosition, const XalanDOMChar *theString)
XalanDOMCharVectorType::const_iterator const_iterator
iterator erase(iterator thePosition)
XalanDOMString & append(const XalanDOMChar *theString)
const XalanDOMChar * data() const
bool operator==(const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
XalanDOMString & operator=(const char *theRHS)
XalanDOMString & insert(XalanDOMString &theString, XalanDOMString::size_type thePosition, const XalanDOMString &theStringToInsert)
Insert a string into another string.
XalanVector< char > CharVectorType
const typedef XalanDOMChar & const_reference
XalanDOMCharVectorType::iterator iterator
const_reverse_iterator rend() const
virtual ~TranscodingError()
void reserve(size_type theCount=0)
reverse_iterator_ reverse_iterator
XalanVector< wchar_t > WideCharVectorType
reference operator[](size_type theIndex)
Less than functor for DOMStrings.
#define XALAN_DEFAULT_CONSTRUCTOR_MEMMGR
const_iterator begin() const
Hash functor for DOMStrings.
XalanDOMString & append(const char *theString)
void push_back(XalanDOMChar theChar)
XalanDOMString & insert(size_type thePosition, const XalanDOMString &theString)