Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
y
z
Typedefs
a
b
c
d
f
g
i
l
m
n
r
s
t
u
w
Enumerations
Enumerator
a
b
c
d
e
f
g
h
k
l
n
o
r
s
t
u
v
y
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Enumerations
Enumerator
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Related Functions
:
_
a
g
i
l
n
o
p
r
s
t
u
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
g
i
l
m
n
o
p
r
s
t
u
v
Variables
_
a
c
d
g
i
m
n
r
s
t
v
w
Typedefs
b
c
d
i
m
n
o
p
q
s
t
v
Macros
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
y
z
3rdparty
libpointmatcher
pointmatcher
IOFunctions.cpp
Go to the documentation of this file.
1
#include "
IOFunctions.h
"
2
3
namespace
PointMatcherSupport
4
{
5
6
7
std::istream &
safeGetLine
( std::istream& is,
std::string
& t)
8
{
9
t
.clear();
10
11
// The characters in the stream are read one-by-one using a std::streambuf.
12
// That is faster than reading them one-by-one using the std::istream.
13
// Code that uses streambuf this way must be guarded by a sentry object.
14
// The sentry object performs various tasks,
15
// such as thread synchronization and updating the stream state.
16
17
std::istream::sentry se(is,
true
);
18
std::streambuf* sb = is.rdbuf();
19
20
for
(;;) {
21
int
c = sb->sbumpc();
22
switch
(c) {
23
case
'\n'
:
24
return
is;
25
case
'\r'
:
26
if
(sb->sgetc() ==
'\n'
)
27
sb->sbumpc();
28
return
is;
29
case
EOF:
30
// Also handle the case when the last line has no line ending
31
if
(
t
.empty())
32
is.setstate(std::ios::eofbit);
33
return
is;
34
default
:
35
t
+= (char)c;
36
}
37
}
38
}
39
40
}
// namespace PointMatcherSupport
testing::internal::string
::std::string string
Definition:
gtest.h:1979
IOFunctions.h
PointMatcherSupport::safeGetLine
std::istream & safeGetLine(std::istream &is, std::string &t)
Replaces getline for handling windows style CR/LF line endings.
Definition:
IOFunctions.cpp:7
PointMatcherSupport
Functions and classes that are not dependant on scalar type are defined in this namespace.
Definition:
Bibliography.cpp:45
t
geometry_msgs::TransformStamped t
mp2p_icp
Author(s):
autogenerated on Wed Feb 26 2025 03:45:47