Apollo  6.0
Open source self driving car software
option_parser.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2019 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 #pragma once
17 #include <iostream>
18 #include <map>
19 #include <set>
20 #include <string>
21 
22 namespace apollo {
23 namespace perception {
24 namespace benchmark {
25 
26 class OptionParser {
27  public:
28  OptionParser() = default;
29  virtual ~OptionParser() = default;
30  bool parse_from_string(const std::string& input);
31  virtual bool set_options() const { return true; }
32  friend std::ostream& operator<<(std::ostream& out, const OptionParser& rhs);
33 
34  protected:
35  std::map<std::string, std::set<std::string>> _options;
36 };
37 
38 } // namespace benchmark
39 } // namespace perception
40 } // namespace apollo
friend std::ostream & operator<<(std::ostream &out, const OptionParser &rhs)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
bool parse_from_string(const std::string &input)
Definition: option_parser.h:26
virtual bool set_options() const
Definition: option_parser.h:31
std::map< std::string, std::set< std::string > > _options
Definition: option_parser.h:35