Choreonoid
1.8
Main Page
Related Pages
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
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
p
q
r
s
t
v
w
z
Enumerations
Enumerator
a
b
c
d
f
g
i
k
l
m
n
p
s
t
u
Classes
Class List
Class Index
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
l
m
n
o
p
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
i
l
n
p
r
s
t
u
v
Enumerations
a
b
c
d
e
f
h
i
j
l
m
n
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Properties
Related Functions
b
c
d
e
f
g
h
i
j
l
m
o
p
r
s
t
v
w
y
Files
File List
File Members
All
Functions
Variables
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Util
GettextUtil.h
Go to the documentation of this file.
1
7
#ifndef CNOID_UTIL_GETTEXT_UTIL_H
8
#define CNOID_UTIL_GETTEXT_UTIL_H
9
10
#include <cnoid/Config>
11
#include "exportdecl.h"
12
13
#ifdef CNOID_ENABLE_GETTEXT
14
# include <libintl.h>
15
16
# ifdef CNOID_USE_GETTEXT_WRAPPER
17
# define _(text) cnoid::getText(CNOID_GETTEXT_DOMAIN_NAME, text)
18
# else
19
# define _(text) dgettext(CNOID_GETTEXT_DOMAIN_NAME, text)
20
# endif
21
22
#else
23
namespace
cnoid
{
24
inline
const
char
*
bindtextdomain
(
const
char
* domainname,
const
char
* dirname) {
25
return
dirname;
26
}
27
inline
const
char
*
dgettext
(
const
char
* domainname,
const
char
* msgid){
28
return
msgid;
29
}
30
}
31
#define _(string) string
32
#endif
33
34
#define N_(string) string
35
36
namespace
cnoid
{
37
38
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
39
CNOID_EXPORT
const
char
*
getText
(
const
char
* domainname,
const
char
* msgid);
40
#else
41
inline
const
char
*
getText
(
const
char
* domainname,
const
char
* msgid) {
42
return
dgettext
(domainname, msgid);
43
}
44
#endif
45
46
CNOID_EXPORT
void
bindGettextDomain
(
const
char
* domainname);
47
48
class
GettextDomainBinder
49
{
50
public
:
51
GettextDomainBinder
(
const
char
* domainname){
52
bindGettextDomain
(domainname);
53
}
54
};
55
56
}
57
62
#define CNOID_BIND_GETTEXT_DOMAN() \
63
namespace { cnoid::GettextDomainBinder cnoidGettextDomainBinder(CNOID_GETTEXT_DOMAIN_NAME); }
64
65
#endif
cnoid::dgettext
const char * dgettext(const char *domainname, const char *msgid)
Definition:
GettextUtil.h:27
cnoid::bindGettextDomain
void bindGettextDomain(const char *domainname)
Definition:
GettextUtil.cpp:29
cnoid::GettextDomainBinder::GettextDomainBinder
GettextDomainBinder(const char *domainname)
Definition:
GettextUtil.h:51
cnoid::getText
const char * getText(const char *domainname, const char *msgid)
Definition:
GettextUtil.h:41
cnoid
Definition:
AbstractSceneLoader.h:11
cnoid::bindtextdomain
const char * bindtextdomain(const char *domainname, const char *dirname)
Definition:
GettextUtil.h:24
cnoid::GettextDomainBinder
Definition:
GettextUtil.h:48
Generated by
1.8.17