Main Page
Namespaces
Classes
Files
File List
File Members
cartographer
io
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
22
#include "
cartographer/io/points_batch.h
"
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.
29
class
PointsProcessor
{
30
public
:
31
enum class
FlushResult
{
32
kRestartStream
,
33
kFinished
,
34
};
35
36
PointsProcessor
() {}
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_
cartographer::io::PointsProcessor::Process
virtual void Process(std::unique_ptr< PointsBatch > points_batch)=0
points_batch.h
cartographer::io::PointsProcessor::PointsProcessor
PointsProcessor()
Definition:
points_processor.h:36
cartographer::io::PointsProcessor::~PointsProcessor
virtual ~PointsProcessor()
Definition:
points_processor.h:37
cartographer::io::PointsProcessor::FlushResult
FlushResult
Definition:
points_processor.h:31
cartographer
Definition:
blocking_queue.h:29
cartographer::io::PointsProcessor::Flush
virtual FlushResult Flush()=0
cartographer::io::PointsProcessor::operator=
PointsProcessor & operator=(const PointsProcessor &)=delete
cartographer::io::PointsProcessor::FlushResult::kFinished
cartographer::io::PointsProcessor
Definition:
points_processor.h:29
cartographer::io::PointsProcessor::FlushResult::kRestartStream
cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:39