mock_map_builder.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2018 The Cartographer Authors
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_
00018 #define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_
00019 
00020 #include "cartographer/mapping/map_builder_interface.h"
00021 #include "cartographer/mapping/pose_graph_interface.h"
00022 #include "cartographer/mapping/trajectory_builder_interface.h"
00023 #include "glog/logging.h"
00024 #include "gmock/gmock.h"
00025 #include "gtest/gtest.h"
00026 
00027 using testing::_;
00028 
00029 namespace cartographer {
00030 namespace mapping {
00031 namespace testing {
00032 
00033 class MockMapBuilder : public mapping::MapBuilderInterface {
00034  public:
00035   MOCK_METHOD3(
00036       AddTrajectoryBuilder,
00037       int(const std::set<SensorId> &expected_sensor_ids,
00038           const mapping::proto::TrajectoryBuilderOptions &trajectory_options,
00039           mapping::MapBuilderInterface::LocalSlamResultCallback
00040               local_slam_result_callback));
00041   MOCK_METHOD1(AddTrajectoryForDeserialization,
00042                int(const mapping::proto::TrajectoryBuilderOptionsWithSensorIds
00043                        &options_with_sensor_ids_proto));
00044   MOCK_CONST_METHOD1(GetTrajectoryBuilder,
00045                      mapping::TrajectoryBuilderInterface *(int trajectory_id));
00046   MOCK_METHOD1(FinishTrajectory, void(int trajectory_id));
00047   MOCK_METHOD2(SubmapToProto,
00048                std::string(const mapping::SubmapId &,
00049                            mapping::proto::SubmapQuery::Response *));
00050   MOCK_METHOD2(SerializeState, void(bool, io::ProtoStreamWriterInterface *));
00051   MOCK_METHOD2(SerializeStateToFile, bool(bool, const std::string &));
00052   MOCK_METHOD2(LoadState,
00053                std::map<int, int>(io::ProtoStreamReaderInterface *, bool));
00054   MOCK_METHOD2(LoadStateFromFile,
00055                std::map<int, int>(const std::string &, bool));
00056   MOCK_CONST_METHOD0(num_trajectory_builders, int());
00057   MOCK_METHOD0(pose_graph, mapping::PoseGraphInterface *());
00058   MOCK_CONST_METHOD0(
00059       GetAllTrajectoryBuilderOptions,
00060       const std::vector<mapping::proto::TrajectoryBuilderOptionsWithSensorIds>
00061           &());
00062 };
00063 
00064 }  // namespace testing
00065 }  // namespace mapping
00066 }  // namespace cartographer
00067 
00068 #endif  // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:35