1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "input_method_info.h" 17 18 namespace OHOS { 19 namespace MiscServices { 20 using namespace std; 21 /*! Constructor 22 */ InputMethodInfo()23 InputMethodInfo::InputMethodInfo() 24 { 25 } 26 27 /*! Destructor 28 */ ~InputMethodInfo()29 InputMethodInfo::~InputMethodInfo() 30 { 31 } 32 33 /*! Constructor 34 \param property the source property will be copied to this instance. 35 */ InputMethodInfo(const InputMethodInfo & property)36 InputMethodInfo::InputMethodInfo(const InputMethodInfo &property) 37 { 38 mImeId = property.mImeId; 39 mPackageName = property.mPackageName; 40 mAbilityName = property.mAbilityName; 41 mConfigurationPage = property.mConfigurationPage; 42 isSystemIme = property.isSystemIme; 43 mDefaultImeId = property.mDefaultImeId; 44 labelId = property.labelId; 45 descriptionId = property.descriptionId; 46 label = property.label; 47 description = property.description; 48 } 49 50 /*! operator= 51 \param property the source property will be copied to this instance. 52 \return return this 53 */ operator =(const InputMethodInfo & property)54 InputMethodInfo &InputMethodInfo::operator =(const InputMethodInfo &property) 55 { 56 if (this == &property) { 57 return *this; 58 } 59 mImeId = property.mImeId; 60 mPackageName = property.mPackageName; 61 mAbilityName = property.mAbilityName; 62 mConfigurationPage = property.mConfigurationPage; 63 isSystemIme = property.isSystemIme; 64 mDefaultImeId = property.mDefaultImeId; 65 labelId = property.labelId; 66 descriptionId = property.descriptionId; 67 label = property.label; 68 description = property.description; 69 return *this; 70 } 71 } // namespace MiscServices 72 } // namespace OHOS 73