points_processor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
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 CARTOGRAPHER_IO_POINTS_PROCESSOR_H_
18 #define CARTOGRAPHER_IO_POINTS_PROCESSOR_H_
19 
20 #include <memory>
21 
23 
24 namespace cartographer {
25 namespace io {
26 
27 // A processor in a pipeline. It processes a 'points_batch' and hands it to the
28 // next processor in the pipeline.
30  public:
31  enum class FlushResult {
33  kFinished,
34  };
35 
37  virtual ~PointsProcessor() {}
38 
39  PointsProcessor(const PointsProcessor&) = delete;
40  PointsProcessor& operator=(const PointsProcessor&) = delete;
41 
42  // Receive a 'points_batch', process it and pass it on.
43  virtual void Process(std::unique_ptr<PointsBatch> points_batch) = 0;
44 
45  // Some implementations will perform expensive computations and others that do
46  // multiple passes over the data might ask for restarting the stream.
47  virtual FlushResult Flush() = 0;
48 };
49 
50 } // namespace io
51 } // namespace cartographer
52 
53 #endif // CARTOGRAPHER_IO_POINTS_PROCESSOR_H_
virtual void Process(std::unique_ptr< PointsBatch > points_batch)=0
virtual FlushResult Flush()=0
PointsProcessor & operator=(const PointsProcessor &)=delete


cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:58