Skip to content

Commit

Permalink
added opaque for maps::Index
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Hemker committed Jul 5, 2017
1 parent 82ed730 commit 9dc3301
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
4 changes: 4 additions & 0 deletions envire_maps.orogen
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import_types_from 'base'
import_types_from 'envire_core'
import_types_from "maps/grid/MLSConfig.hpp"

import_types_from 'maps/grid/Index.hpp'
import_types_from 'envire_mapsTypes.hpp'
typekit.opaque_type '/maps/grid/Index', 'wrappers/Index'

# define opaques
typekit do

Expand Down
12 changes: 12 additions & 0 deletions envire_mapsTypes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once


namespace wrappers
{
struct Index
{
int x;
int y;
};

}
25 changes: 25 additions & 0 deletions typekit/Opaques.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Generated from orogen/lib/orogen/templates/typekit/Opaques.cpp */

#include <envire_maps/typekit/OpaqueTypes.hpp>
#include <envire_maps/typekit/Opaques.hpp>

/** Returns the intermediate value that is contained in \c real_type */
/** Stores \c intermediate into \c real_type. \c intermediate is owned by \c
* real_type afterwards. */
/** Release ownership of \c real_type on the corresponding intermediate
* pointer.
*/


void orogen_typekits::toIntermediate(::wrappers::Index& intermediate, ::maps::grid::Index const& real_type)
{
intermediate.x = real_type(0, 0);
intermediate.y = real_type(0, 1);
}

void orogen_typekits::fromIntermediate(::maps::grid::Index& real_type, ::wrappers::Index const& intermediate)
{
real_type(0, 0) = intermediate.x;
real_type(0, 1) = intermediate.y;
}

20 changes: 20 additions & 0 deletions typekit/Opaques.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* Generated from orogen/lib/orogen/templates/typekit/Opaques.hpp */

#ifndef __OROGEN_GENERATED_envire_maps_USER_MARSHALLING_HH
#define __OROGEN_GENERATED_envire_maps_USER_MARSHALLING_HH

#include <envire_maps/typekit/OpaqueFwd.hpp>

namespace orogen_typekits
{

/** Converts \c real_type into \c intermediate */
void toIntermediate(::wrappers::Index& intermediate, ::maps::grid::Index const& real_type);
/** Converts \c intermediate into \c real_type */
void fromIntermediate(::maps::grid::Index& real_type, ::wrappers::Index const& intermediate);


}

#endif

0 comments on commit 9dc3301

Please sign in to comment.