mock_map_builder_context.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_CLOUD_INTERNAL_TESTING_MOCK_MAP_BUILDER_CONTEXT_H
00018 #define CARTOGRAPHER_CLOUD_INTERNAL_TESTING_MOCK_MAP_BUILDER_CONTEXT_H
00019 
00020 #include "cartographer/cloud/internal/map_builder_context_interface.h"
00021 #include "cartographer/mapping/local_slam_result_data.h"
00022 #include "glog/logging.h"
00023 #include "gmock/gmock.h"
00024 #include "gtest/gtest.h"
00025 
00026 namespace cartographer {
00027 namespace cloud {
00028 namespace testing {
00029 
00030 class MockMapBuilderContext : public MapBuilderContextInterface {
00031  public:
00032   MOCK_METHOD0(map_builder, mapping::MapBuilderInterface &());
00033   MOCK_METHOD0(
00034       sensor_data_queue,
00035       common::BlockingQueue<std::unique_ptr<MapBuilderContextInterface::Data>>
00036           &());
00037   MOCK_METHOD0(GetLocalSlamResultCallbackForSubscriptions,
00038                mapping::TrajectoryBuilderInterface::LocalSlamResultCallback());
00039   MOCK_METHOD1(AddSensorDataToTrajectory,
00040                void(const MapBuilderContextInterface::Data &));
00041   MOCK_METHOD2(SubscribeLocalSlamResults,
00042                MapBuilderContextInterface::LocalSlamSubscriptionId(
00043                    int,
00044                    MapBuilderContextInterface::LocalSlamSubscriptionCallback));
00045   MOCK_METHOD1(
00046       UnsubscribeLocalSlamResults,
00047       void(const MapBuilderContextInterface::LocalSlamSubscriptionId &));
00048   MOCK_METHOD1(SubscribeGlobalSlamOptimizations,
00049                int(GlobalSlamOptimizationCallback));
00050   MOCK_METHOD1(UnsubscribeGlobalSlamOptimizations, void(int));
00051   MOCK_METHOD1(NotifyFinishTrajectory, void(int));
00052   MOCK_METHOD0(local_trajectory_uploader, LocalTrajectoryUploaderInterface *());
00053 
00054   MOCK_METHOD2(DoEnqueueSensorData, void(int, sensor::Data *));
00055   void EnqueueSensorData(int trajectory_id,
00056                          std::unique_ptr<sensor::Data> data) override {
00057     DoEnqueueSensorData(trajectory_id, data.get());
00058   }
00059   MOCK_METHOD3(EnqueueLocalSlamResultData,
00060                void(int, const std::string &,
00061                     const mapping::proto::LocalSlamResultData &));
00062   MOCK_METHOD2(RegisterClientIdForTrajectory, void(const std::string &, int));
00063   MOCK_METHOD2(CheckClientIdForTrajectory, bool(const std::string &, int));
00064 };
00065 
00066 }  // namespace testing
00067 }  // namespace cloud
00068 }  // namespace cartographer
00069 
00070 #endif  // CARTOGRAPHER_CLOUD_INTERNAL_TESTING_MOCK_MAP_BUILDER_CONTEXT_H


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