148f512ceSopenharmony_ci/* 248f512ceSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 348f512ceSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 448f512ceSopenharmony_ci * you may not use this file except in compliance with the License. 548f512ceSopenharmony_ci * You may obtain a copy of the License at 648f512ceSopenharmony_ci * 748f512ceSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 848f512ceSopenharmony_ci * 948f512ceSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1048f512ceSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1148f512ceSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1248f512ceSopenharmony_ci * See the License for the specific language governing permissions and 1348f512ceSopenharmony_ci * limitations under the License. 1448f512ceSopenharmony_ci */ 1548f512ceSopenharmony_ci#ifndef HIPERF_SUBCOMMAND_HELP_H_ 1648f512ceSopenharmony_ci#define HIPERF_SUBCOMMAND_HELP_H_ 1748f512ceSopenharmony_ci 1848f512ceSopenharmony_ci#include "option.h" 1948f512ceSopenharmony_ci#include "subcommand.h" 2048f512ceSopenharmony_cinamespace OHOS { 2148f512ceSopenharmony_cinamespace Developtools { 2248f512ceSopenharmony_cinamespace HiPerf { 2348f512ceSopenharmony_ciclass SubCommandHelp : public SubCommand { 2448f512ceSopenharmony_cipublic: 2548f512ceSopenharmony_ci SubCommandHelp() 2648f512ceSopenharmony_ci // clang-format off 2748f512ceSopenharmony_ci : SubCommand("help", "Show more help information for hiperf", 2848f512ceSopenharmony_ci "Usage: hiperf help [subcommand]\n" 2948f512ceSopenharmony_ci " By default, all options help information and subcommand brief information are output.\n" 3048f512ceSopenharmony_ci " If you provide a subcommand, only the help information for this command will be output.\n\n" 3148f512ceSopenharmony_ci ) 3248f512ceSopenharmony_ci // clang-format on 3348f512ceSopenharmony_ci { 3448f512ceSopenharmony_ci Option::RegisterMainOption("--help", "show help", OnHelp); 3548f512ceSopenharmony_ci Option::RegisterMainOption("-h", "show help", OnHelp); 3648f512ceSopenharmony_ci } 3748f512ceSopenharmony_ci 3848f512ceSopenharmony_ci bool OnSubCommand(std::vector<std::string> &args) override; 3948f512ceSopenharmony_ci static void RegisterSubCommandHelp(void); 4048f512ceSopenharmony_ci static bool OnHelp(std::vector<std::string> &args); 4148f512ceSopenharmony_ci}; 4248f512ceSopenharmony_ci} // namespace HiPerf 4348f512ceSopenharmony_ci} // namespace Developtools 4448f512ceSopenharmony_ci} // namespace OHOS 4548f512ceSopenharmony_ci#endif // HIPERF_SUBCOMMAND_HELP_H_ 46