File: msg.lisp.template

package info (click to toggle)
ros-genlisp 0.4.18-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144 kB
  • sloc: python: 700; xml: 24; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 806 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@###############################################
@#
@# ROS message source code generation for C++
@#
@# EmPy template for generating <msg>.h files
@#
@###############################################
@# Start of Template
@#
@# Context:
@#  - file_name_in (String) Source file
@#  - spec (msggen.MsgSpec) Parsed specification of the .msg file
@#  - md5sum (String) MD5Sum of the .msg specification
@###############################################
#include <boost/python.hpp>
#include <@(spec.package)/@(spec.short_name).h>

using namespace boost::python;

void export_@(spec.short_name)()
{
  class_<@(spec.package)::@(spec.short_name)>("@(spec.short_name)")
@[for field in spec.parsed_fields()]@
    .def_readwrite("@(field.name)", &@(spec.package)::@(spec.short_name)::@(field.name))
@[end for]@#field
;
}