Main Page
Namespaces
Classes
Files
File List
File Members
include
std_msgs
trait_macros.h
Go to the documentation of this file.
1
2
/*
3
* Copyright (C) 2009, Willow Garage, Inc.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
* * Redistributions of source code must retain the above copyright notice,
8
* this list of conditions and the following disclaimer.
9
* * Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
* * Neither the names of Willow Garage, Inc. nor the names of its
13
* contributors may be used to endorse or promote products derived from
14
* this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26
* POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef STD_MSGS_TRAIT_MACROS_H
30
#define STD_MSGS_TRAIT_MACROS_H
31
32
#define STD_MSGS_DEFINE_BUILTIN_TRAITS(builtin, msg, static_md5sum1, static_md5sum2) \
33
namespace ros \
34
{ \
35
namespace message_traits \
36
{ \
37
\
38
template<> struct MD5Sum<builtin> \
39
{ \
40
static const char* value() \
41
{ \
42
return MD5Sum<std_msgs::msg>::value(); \
43
} \
44
\
45
static const char* value(const builtin&) \
46
{ \
47
return value(); \
48
} \
49
}; \
50
\
51
template<> struct DataType<builtin> \
52
{ \
53
static const char* value() \
54
{ \
55
return DataType<std_msgs::msg>::value(); \
56
} \
57
\
58
static const char* value(const builtin&) \
59
{ \
60
return value(); \
61
} \
62
}; \
63
\
64
template<> struct Definition<builtin> \
65
{ \
66
static const char* value() \
67
{ \
68
return Definition<std_msgs::msg>::value(); \
69
} \
70
\
71
static const char* value(const builtin&) \
72
{ \
73
return value(); \
74
} \
75
}; \
76
\
77
} \
78
}
79
80
#endif // STD_MSGS_TRAIT_MACROS_H
std_msgs
Author(s): Morgan Quigley
, Ken Conley
, Jeremy Leibs
, Tully Foote
autogenerated on Wed Oct 28 2020 03:43:30