Loading...
Searching...
No Matches
schriter.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
* Copyright (C) 1998-2005, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
*
* File schriter.h
*
* Modification History:
*
* Date Name Description
* 05/05/99 stephen Cleaned up.
******************************************************************************
*/
#ifndef SCHRITER_H
#define SCHRITER_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#include "unicode/chariter.h"
#include "unicode/uchriter.h"
U_NAMESPACE_BEGIN
class U_COMMON_API StringCharacterIterator : public UCharCharacterIterator {
public:
StringCharacterIterator(const UnicodeString& textStr);
StringCharacterIterator(const UnicodeString& textStr,
int32_t textPos);
StringCharacterIterator(const UnicodeString& textStr,
int32_t textBegin,
int32_t textEnd,
int32_t textPos);
StringCharacterIterator(const StringCharacterIterator& that);
virtual ~StringCharacterIterator();
StringCharacterIterator&
operator=(const StringCharacterIterator& that);
virtual bool operator==(const ForwardCharacterIterator& that) const override;
virtual StringCharacterIterator* clone() const override;
void setText(const UnicodeString& newText);
virtual void getText(UnicodeString& result) override;
virtual UClassID getDynamicClassID() const override;
static UClassID U_EXPORT2 getStaticClassID();
protected:
StringCharacterIterator();
UnicodeString text;
};
U_NAMESPACE_END
#endif /* U_SHOW_CPLUSPLUS_API */
#endif
chariter.h
C++ API: Character Iterator.
icu::ForwardCharacterIterator
Abstract class that defines an API for forward-only iteration on text objects.
Definition chariter.h:94
icu::StringCharacterIterator::~StringCharacterIterator
virtual ~StringCharacterIterator()
Destructor.
icu::StringCharacterIterator::StringCharacterIterator
StringCharacterIterator(const UnicodeString &textStr, int32_t textPos)
Create an iterator over the UnicodeString referred to by "textStr".
icu::StringCharacterIterator::clone
virtual StringCharacterIterator * clone() const override
Returns a new StringCharacterIterator referring to the same character in the same range of the same s...
icu::StringCharacterIterator::StringCharacterIterator
StringCharacterIterator(const UnicodeString &textStr)
Create an iterator over the UnicodeString referred to by "textStr".
icu::StringCharacterIterator::operator==
virtual bool operator==(const ForwardCharacterIterator &that) const override
Returns true if the iterators iterate over the same range of the same string and are pointing at the ...
icu::StringCharacterIterator::StringCharacterIterator
StringCharacterIterator(const UnicodeString &textStr, int32_t textBegin, int32_t textEnd, int32_t textPos)
Create an iterator over the UnicodeString referred to by "textStr".
icu::StringCharacterIterator::setText
void setText(const UnicodeString &newText)
Sets the iterator to iterate over the provided string.
icu::StringCharacterIterator::getStaticClassID
static UClassID getStaticClassID()
Return a class ID for this class (not really public).
icu::StringCharacterIterator::text
UnicodeString text
Copy of the iterated string object.
Definition schriter.h:179
icu::StringCharacterIterator::StringCharacterIterator
StringCharacterIterator()
Default constructor, iteration over empty string.
icu::StringCharacterIterator::getDynamicClassID
virtual UClassID getDynamicClassID() const override
Return a class ID for this object (not really public).
icu::StringCharacterIterator::operator=
StringCharacterIterator & operator=(const StringCharacterIterator &that)
Assignment operator.
icu::StringCharacterIterator::getText
virtual void getText(UnicodeString &result) override
Copies the UnicodeString under iteration into the UnicodeString referred to by "result".
icu::StringCharacterIterator::StringCharacterIterator
StringCharacterIterator(const StringCharacterIterator &that)
Copy constructor.
icu::UCharCharacterIterator::UCharCharacterIterator
UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length)
Create an iterator over the char16_t array referred to by "textPtr".
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:303
uchriter.h
C++ API: char16_t Character Iterator.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_COMMON_API
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
Definition utypes.h:315