Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 }
00065 }
00066 }
00067
00068 #endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_