Apollo  6.0
Open source self driving car software
data_fusion.h
Go to the documentation of this file.
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 
29 namespace apollo {
30 namespace cyber {
31 namespace data {
32 namespace fusion {
33 
34 template <typename M0, typename M1 = NullType, typename M2 = NullType,
35  typename M3 = NullType>
36 class DataFusion {
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 
45 template <typename M0, typename M1, typename M2>
46 class 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 
55 template <typename M0, typename M1>
56 class 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_
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
virtual ~DataFusion()
Definition: data_fusion.h:38
Definition: data_fusion.h:36
Definition: types.h:25
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