Apollo 11.0
自动驾驶开放平台
ft_config_manager.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2020 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 <map>
20#include <string>
21
22#include <boost/function.hpp>
23
24#include "modules/v2x/proto/fusion_params.pb.h"
25
26#include "cyber/cyber.h"
28
29#define PLUGIN_PARAMS(classname, conf_file, prototype) \
30 class classname { \
31 public: \
32 classname() { \
33 file_path_ = FLAGS_config_path + "/" + conf_file; \
34 cyber::common::GetProtoFromFile(file_path_, &params); \
35 } \
36 ~classname() { cyber::common::SetProtoToASCIIFile(params, file_path_); } \
37 prototype params; \
38 \
39 private: \
40 std::string file_path_; \
41 };
42
43namespace apollo {
44namespace v2x {
45namespace ft {
46
47PLUGIN_PARAMS(FusionParams, FLAGS_fusion_conf_file, fusion::FusionParams)
48
50 public:
52 public:
53 FusionParams fusion_params_;
54};
55
56} // namespace ft
57} // namespace v2x
58} // namespace apollo
#define DECLARE_SINGLETON(classname)
Definition macros.h:52
#define PLUGIN_PARAMS(classname, conf_file, prototype)
class register implement
Definition arena_queue.h:37