1 /** 2 * Copyright (c) 2022 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 #ifndef MERGE_ABC_MERGE_OPTIONS_H 17 #define MERGE_ABC_MERGE_OPTIONS_H 18 19 #include <iostream> 20 #include <macros.h> 21 #include <utils/pandargs.h> 22 23 namespace panda::proto { 24 class Options { 25 public: 26 Options(); 27 NO_COPY_SEMANTIC(Options); 28 NO_MOVE_SEMANTIC(Options); 29 ~Options(); 30 31 bool Parse(int argc, const char **argv); 32 protoPathInput()33 const std::string &protoPathInput() const 34 { 35 return protoPathInput_; 36 } 37 protoBinSuffix()38 const std::string &protoBinSuffix() const 39 { 40 return protoBinSuffix_; 41 } 42 outputFileName()43 const std::string &outputFileName() const 44 { 45 return outputFileName_; 46 } 47 outputFilePath()48 const std::string &outputFilePath() const 49 { 50 return outputFilePath_; 51 } 52 ErrorMsg()53 const std::string &ErrorMsg() const 54 { 55 return errorMsg_; 56 } 57 58 private: 59 panda::PandArgParser *argparser_; 60 std::string errorMsg_; 61 std::string protoBinSuffix_ {"protoBin"}; 62 std::string protoPathInput_; 63 std::string outputFileName_ {"modules.abc"}; 64 std::string outputFilePath_; 65 }; 66 } // panda::proto 67 #endif 68