Apollo 10.0
自动驾驶开放平台
data_fusion.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#ifndef CYBER_DATA_FUSION_DATA_FUSION_H_
18#define CYBER_DATA_FUSION_DATA_FUSION_H_
19
20#include <deque>
21#include <memory>
22#include <string>
23#include <type_traits>
24#include <typeinfo>
25#include <vector>
26
27#include "cyber/common/types.h"
28
29namespace apollo {
30namespace cyber {
31namespace data {
32namespace fusion {
33
34template <typename M0, typename M1 = NullType, typename M2 = NullType,
35 typename M3 = NullType>
37 public:
38 virtual ~DataFusion() {}
39 virtual bool Fusion(uint64_t* index, std::shared_ptr<M0>& m0, // NOLINT
40 std::shared_ptr<M1>& m1, // NOLINT
41 std::shared_ptr<M2>& m2, // NOLINT
42 std::shared_ptr<M3>& m3) = 0; // NOLINT
43};
44
45template <typename M0, typename M1, typename M2>
46class DataFusion<M0, M1, M2, NullType> {
47 public:
48 virtual ~DataFusion() {}
49
50 virtual bool Fusion(uint64_t* index, std::shared_ptr<M0>& m0, // NOLINT
51 std::shared_ptr<M1>& m1, // NOLINT
52 std::shared_ptr<M2>& m2) = 0; // NOLINT
53};
54
55template <typename M0, typename M1>
56class DataFusion<M0, M1, NullType, NullType> {
57 public:
58 virtual ~DataFusion() {}
59
60 virtual bool Fusion(uint64_t* index, std::shared_ptr<M0>& m0, // NOLINT
61 std::shared_ptr<M1>& m1) = 0; // NOLINT
62};
63
64} // namespace fusion
65} // namespace data
66} // namespace cyber
67} // namespace apollo
68
69#endif // CYBER_DATA_FUSION_DATA_FUSION_H_
virtual bool Fusion(uint64_t *index, std::shared_ptr< M0 > &m0, std::shared_ptr< M1 > &m1, std::shared_ptr< M2 > &m2)=0
virtual bool Fusion(uint64_t *index, std::shared_ptr< M0 > &m0, std::shared_ptr< M1 > &m1)=0
virtual bool Fusion(uint64_t *index, std::shared_ptr< M0 > &m0, std::shared_ptr< M1 > &m1, std::shared_ptr< M2 > &m2, std::shared_ptr< M3 > &m3)=0
class register implement
Definition arena_queue.h:37