Apollo 10.0
自动驾驶开放平台
bridge_argument.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#pragma once
18
19#include <list>
20#include <string>
21
23#include "cyber/common/log.h"
24#include "cyber/common/types.h"
25
26namespace apollo {
27namespace cyber {
28
30 public:
31 BridgeArgument() = default;
32 virtual ~BridgeArgument() = default;
33 void DisplayUsage();
34 void ParseArgument(int argc, char* const argv[]);
35 void GetOptions(const int argc, char* const argv[]);
36 const std::string& GetBinaryName() const;
37 const bool GetEnableCpuprofile() const { return enable_cpuprofile_; }
38 const std::string GetProfileFilename() const { return profile_filename_; }
39 const bool GetEnableHeapprofile() const { return enable_heapprofile_; }
40 const std::string GetHeapProfileFilename() const {
41 return heapprofile_filename_;
42 }
43
44 private:
45 std::string binary_name_;
46 bool enable_cpuprofile_ = false;
47 std::string profile_filename_;
48 bool enable_heapprofile_ = false;
49 std::string heapprofile_filename_;
50};
51
52inline const std::string& BridgeArgument::GetBinaryName() const {
53 return binary_name_;
54}
55
56} // namespace cyber
57} // namespace apollo
const bool GetEnableHeapprofile() const
const std::string GetHeapProfileFilename() const
void GetOptions(const int argc, char *const argv[])
virtual ~BridgeArgument()=default
const bool GetEnableCpuprofile() const
const std::string GetProfileFilename() const
const std::string & GetBinaryName() const
void ParseArgument(int argc, char *const argv[])
class register implement
Definition arena_queue.h:37