Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace 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
y
z
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
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
y
z
~
Variables
_
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
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
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
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File 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
y
z
Variables
_
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
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
wrap
pybind11
include
pybind11
detail
typeid.h
Go to the documentation of this file.
1
/*
2
pybind11/detail/typeid.h: Compiler-independent access to type identifiers
3
4
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
5
6
All rights reserved. Use of this source code is governed by a
7
BSD-style license that can be found in the LICENSE file.
8
*/
9
10
#pragma once
11
12
#include <cstdio>
13
#include <cstdlib>
14
15
#if defined(__GNUG__)
16
# include <cxxabi.h>
17
#endif
18
19
#include "
common.h
"
20
21
PYBIND11_NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
22
PYBIND11_NAMESPACE_BEGIN
(
detail
)
23
24
inline
void
erase_all
(std::string &
string
,
const
std::string &search) {
26
for
(
size_t
pos
= 0;;) {
27
pos
=
string
.find(search,
pos
);
28
if
(
pos
== std::string::npos) {
29
break
;
30
}
31
string
.erase(
pos
, search.length());
32
}
33
}
34
35
PYBIND11_NOINLINE
void
clean_type_id
(std::string &
name
) {
36
#if defined(__GNUG__)
37
int
status = 0;
38
std::unique_ptr<char, void (*)(
void
*)>
res
{
39
abi::__cxa_demangle(
name
.c_str(),
nullptr
,
nullptr
, &status), std::free};
40
if
(status == 0) {
41
name
=
res
.get();
42
}
43
#else
44
detail::erase_all
(
name
,
"class "
);
45
detail::erase_all
(
name
,
"struct "
);
46
detail::erase_all
(
name
,
"enum "
);
47
#endif
48
detail::erase_all
(
name
,
"pybind11::"
);
49
}
50
51
inline
std::string
clean_type_id
(
const
char
*typeid_name) {
52
std::string
name
(typeid_name);
53
detail::clean_type_id
(
name
);
54
return
name
;
55
}
56
57
PYBIND11_NAMESPACE_END
(
detail
)
58
59
template
<
typename
T>
61
static
std::string
type_id
() {
62
return
detail::clean_type_id
(
typeid
(
T
).
name
());
63
}
64
65
PYBIND11_NAMESPACE_END
(
PYBIND11_NAMESPACE
)
name
Annotation for function names.
Definition:
attr.h:51
erase_all
void erase_all(std::string &string, const std::string &search)
Erase all occurrences of a substring.
Definition:
typeid.h:25
clean_type_id
PYBIND11_NOINLINE void clean_type_id(std::string &name)
Definition:
typeid.h:35
PYBIND11_NAMESPACE_END
#define PYBIND11_NAMESPACE_END(name)
Definition:
wrap/pybind11/include/pybind11/detail/common.h:80
PYBIND11_NOINLINE
#define PYBIND11_NOINLINE
Definition:
wrap/pybind11/include/pybind11/detail/common.h:194
detail
Definition:
testSerializationNonlinear.cpp:69
PYBIND11_NAMESPACE_BEGIN
#define PYBIND11_NAMESPACE_BEGIN(name)
Definition:
wrap/pybind11/include/pybind11/detail/common.h:76
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition:
PartialRedux_count.cpp:3
name
static char name[]
Definition:
rgamma.c:72
type_id
static std::string type_id()
Return a string representation of a C++ type.
Definition:
typeid.h:61
PYBIND11_NAMESPACE
Definition:
test_custom_type_casters.cpp:24
Eigen::Triplet
A small structure to hold a non zero as a triplet (i,j,value).
Definition:
SparseUtil.h:162
common.h
pos
Definition:
example-NearestNeighbor.cpp:32
gtsam
Author(s):
autogenerated on Wed Mar 19 2025 03:08:57