include
scip2
response
abstract.h
Go to the documentation of this file.
1
/*
2
* Copyright 2018 The urg_stamped 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 SCIP2_RESPONSE_ABSTRACT_H
18
#define SCIP2_RESPONSE_ABSTRACT_H
19
20
#include <memory>
21
#include <string>
22
23
#include <boost/asio.hpp>
24
25
namespace
scip2
26
{
27
class
Response
28
{
29
public
:
30
using
Ptr
= std::shared_ptr<Response>;
31
virtual
std::string
getCommandCode
()
const
= 0;
32
virtual
void
operator()
(
33
const
boost::posix_time::ptime&,
34
const
std::string&,
35
const
std::string&,
36
std::istream&) = 0;
37
};
38
39
inline
void
readUntilEnd
(std::istream& stream)
40
{
41
std::string line;
42
while
(std::getline(stream, line) && line.size() > 0)
43
{
44
}
45
}
46
47
}
// namespace scip2
48
49
#endif // SCIP2_RESPONSE_ABSTRACT_H
scip2::Response
Definition:
abstract.h:27
scip2::readUntilEnd
void readUntilEnd(std::istream &stream)
Definition:
abstract.h:39
scip2::Response::getCommandCode
virtual std::string getCommandCode() const =0
scip2
Definition:
connection.h:30
scip2::Response::operator()
virtual void operator()(const boost::posix_time::ptime &, const std::string &, const std::string &, std::istream &)=0
scip2::Response::Ptr
std::shared_ptr< Response > Ptr
Definition:
abstract.h:30
urg_stamped
Author(s): Atsushi Watanabe
autogenerated on Wed Dec 18 2024 03:10:57