Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/imehandler/common/imeutils.h
2868 views
1
/*
2
Licensed to the Software Freedom Conservancy (SFC) under one
3
or more contributor license agreements. See the NOTICE file
4
distributed with this work for additional information
5
regarding copyright ownership. The SFC licenses this file
6
to you under the Apache License, Version 2.0 (the "License");
7
you may not use this file except in compliance with the License.
8
You may obtain a copy of the License at
9
10
http://www.apache.org/licenses/LICENSE-2.0
11
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
See the License for the specific language governing permissions and
16
limitations under the License.
17
18
Author: [email protected]
19
*/
20
21
#ifndef IMEUTILS_H_
22
#define IMEUTILS_H_
23
24
#include <string>
25
#include <map>
26
27
// A macro to disallow the copy constructor and operator= functions.
28
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
29
TypeName(const TypeName&); \
30
void operator=(const TypeName&)
31
32
33
class ImeUtils {
34
public:
35
virtual ~ImeUtils() {}
36
std::string GetNextCandidateKeyForEngine(std::string engine) const {
37
std::string key = "";
38
std::map<std::string, std::string>::const_iterator it;
39
if ((it = kNextCandidateKeysMap.find(engine)) !=
40
kNextCandidateKeysMap.end()) {
41
key = it->second;
42
}
43
return key;
44
}
45
46
protected:
47
ImeUtils() {}
48
std::map<std::string, std::string> kNextCandidateKeysMap;
49
};
50
51
#endif // IMEUTILS_H_
52
53