ICU 76.1 76.1
Loading...
Searching...
No Matches
unifunct.h
Go to the documentation of this file.
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4**********************************************************************
5* Copyright (c) 2002-2005, International Business Machines Corporation
6* and others. All Rights Reserved.
7**********************************************************************
8* Date Name Description
9* 01/14/2002 aliu Creation.
10**********************************************************************
11*/
12#ifndef UNIFUNCT_H
13#define UNIFUNCT_H
14
15#include "unicode/utypes.h"
16
17#if U_SHOW_CPLUSPLUS_API
18
19#include "unicode/uobject.h"
20
26U_NAMESPACE_BEGIN
27
28class UnicodeMatcher;
29class UnicodeReplacer;
30class TransliterationRuleData;
31
39
40public:
41
46 virtual ~UnicodeFunctor();
47
54 virtual UnicodeFunctor* clone() const = 0;
55
66 virtual UnicodeMatcher* toMatcher() const;
67
78 virtual UnicodeReplacer* toReplacer() const;
79
87
103 virtual UClassID getDynamicClassID() const override = 0;
104
113 virtual void setData(const TransliterationRuleData*) = 0;
114
115protected:
116
122 /*UnicodeFunctor();*/
123
124};
125
126/*inline UnicodeFunctor::UnicodeFunctor() {}*/
127
129
130#endif /* U_SHOW_CPLUSPLUS_API */
131
132#endif
"Smart pointer" base class; do not use directly: use LocalPointer etc.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
UnicodeFunctor is an abstract base class for objects that perform match and/or replace operations on ...
Definition unifunct.h:38
virtual ~UnicodeFunctor()
Destructor.
virtual UnicodeFunctor * clone() const =0
Return a copy of this object.
virtual UnicodeReplacer * toReplacer() const
Cast 'this' to a UnicodeReplacer* pointer and return the pointer, or null if this is not a UnicodeRep...
virtual UClassID getDynamicClassID() const override=0
Returns a unique class ID polymorphically.
virtual void setData(const TransliterationRuleData *)=0
Set the data object associated with this functor.
static UClassID getStaticClassID()
Return the class ID for this class.
virtual UnicodeMatcher * toMatcher() const
Cast 'this' to a UnicodeMatcher* pointer and return the pointer, or null if this is not a UnicodeMatc...
UnicodeMatcher defines a protocol for objects that can match a range of characters in a Replaceable s...
Definition unimatch.h:71
UnicodeReplacer defines a protocol for objects that replace a range of characters in a Replaceable st...
Definition unirepl.h:40
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
Definition utypes.h:315