123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- #ifndef REP_H
- #define REP_H
- #include "unicode/uobject.h"
-
- U_NAMESPACE_BEGIN
- class UnicodeString;
- class U_COMMON_API Replaceable : public UObject {
- public:
-
- virtual ~Replaceable();
-
-
- inline int32_t length() const;
-
- inline UChar charAt(int32_t offset) const;
-
- inline UChar32 char32At(int32_t offset) const;
-
- virtual void extractBetween(int32_t start,
- int32_t limit,
- UnicodeString& target) const = 0;
-
- virtual void handleReplaceBetween(int32_t start,
- int32_t limit,
- const UnicodeString& text) = 0;
-
-
-
-
-
-
-
-
-
-
- virtual void copy(int32_t start, int32_t limit, int32_t dest) = 0;
-
- virtual UBool hasMetaData() const;
-
- virtual Replaceable *clone() const;
- protected:
-
- inline Replaceable();
-
-
-
- virtual int32_t getLength() const = 0;
-
- virtual UChar getCharAt(int32_t offset) const = 0;
-
- virtual UChar32 getChar32At(int32_t offset) const = 0;
- };
- inline Replaceable::Replaceable() {}
- inline int32_t
- Replaceable::length() const {
- return getLength();
- }
- inline UChar
- Replaceable::charAt(int32_t offset) const {
- return getCharAt(offset);
- }
- inline UChar32
- Replaceable::char32At(int32_t offset) const {
- return getChar32At(offset);
- }
- U_NAMESPACE_END
- #endif
|