spec: define #to_h to marshal the models in a form that can be fed to YAML, JSON and friends
spec: fix superclass in Spec::TaskContext#to_h
Merge pull request #5 from orocos-toolchain/models_to_h

spec: define #to_h to marshal the models in a form that can be fed to YAML, JSON and friends
fix m-type generation for m-types that have the same basename

orogen was so far using the type basename as header filename, which meant
that two types with the same name (but different namespaces) would have
the same m-type filename, for instance:

  base::Wrench
  base::samples::Wrench

would have a m-type generated as base/m_types/Wrench.hpp

This commit switches to the full method name (including namespaces).
Merge pull request #10 from orocos-toolchain/fix_mtype_generation_for_types_with_same_basename

fix m-type generation for m-types that have the same basename
typekit.rb: minor fix for regex

the mistake shouldn't harm. but the fix won't hurt either.

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
typekit.rb: fix comments

- "included_files" _is_ an array, see typekit.rb:934
- the parameter _was_ removed/renamed in 2013

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
typekit.rb: more explicit syntax

not sure if this is good or bad -- am not a ruby guy. but writing "Hash.new" explicitly is more consistent with the rest of the code.

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
typekit.rb: add warning for non-existing line in "source_file_line"

general muttering: these kind of checks... i don't get it... if the ":"
is missing in the "source_file_line", the API-agreement is broken by
someone. which is a crystal-clear error! orogen should bail out.  I
don't know about the quality concerning the "source_file_line" feature
when backed by gccxml though...

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
typekit.rb: include_for_type: add special handling for '/std/string' and '/string'

otherwise the function would return ["vector", "boost/cstdint.hpp"] as
it sees the template-argument of the Container

for uint8_t-like types: return "boost/cstdint.hpp". why not use
"stdint.h"?

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
templates: remove various unconditional includes of headers

"vector", "string" and "boost/cstdint.h" -- is not needed as long as the
rest of the code does its job?

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
Revert "always add the system directories to the list of include dirs"

This reverts commit d8f39106e7fde8f1574ed753b7feb79a5ea1cddf.

Conflicts:
	lib/orogen/gen/typekit.rb
typekit.rb: fix missing typekit-name in "orogen_include"

this commit grew larger than anticipated, due to the rather convoluted
design of orogen...

as mentioned here: https://github.com/orocos-toolchain/orogen/issues/7#issuecomment-52231833

fixed to the best of my knowledge ;-) including the typekit-name in the
added line removes the doubled mention of "ReadOnlyPointer.hpp"

also renamed the "name" variable to a more precise "ptr_name".
reformulated the comments and renamed one of the "inc" variables to
"or_inc", just for a little bit extra-clarity.

Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
fix generation of OpaqueFwd in presence of user-written opaque convertion functions

The actual opaques that the user specifies were not added to the Fwd
header, which meant that in principle the compilation would fail.

We've been lucky so far it seems.
Merge pull request #11 from marvin2k/various_minor_typelib_fixes

Various minor typelib fixes
typekit: fix include of typekit/BoostSerialization

In case rtt_scripting is supported, include the BoostSerialization header,
but do it from the correct include path.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>
fix handling of containers in resolve_registry_includes (fixes #12)

The containers' source_file_line points to the template's definition, which is
then resolved to whichever header included it first. This commit adds a special
case to ensure that the metadata is properly set

It also ensures that orogen_include for a type now lists all includes that this
type requires, in particular in #ro_ptr. #ro_ptr was only adding the
ReadOnlyPointer header, not the header for the template and the header for the
element.

It removes the need for special cases for containers in include_for_type and in
template code. All code generation should now assume that orogen_include is the
authoritative source of information for includes. If it is not, the metadata
should be fixed, not the code.
remove the inclusion of Types.hpp in the CORBA transport

Types.hpp was still used in the Convertions.hpp header for the CORBA
transport. This commit uses a different approach than with opaque handling
(which uses forward declarations) because (1) it is really hard to get "just
right" and (2) the only users of Convertions.hpp are code-generated and only
used for code-generated cpp files. So, drop it completely and simply declare
the functions we need in each Convertions.cpp file.

A short tests demonstrates the expected benefits of reduced compilation times,
reduced memory usage and reduced recompilation (removes unnecessary
dependencies). This has no side effects from the user side as it is only used by
the generated code.

On my test project (control/orogen/auv_control), running

/usr/bin/time -v make -C build/.orogen/typekit/transports/corba

shows a saving of 20s (33%) for the compilation times and of 150M
on the memory usage (20%) with gcc 4.9 on a (very old) Core 2 Duo.

RAW DATA
Before:
  User time (seconds): 56.37
  System time (seconds): 3.46
  Percent of CPU this job got: 98%
  Elapsed (wall clock) time (h:mm:ss or m:ss): 1:01.02
  Maximum resident set size (kbytes): 726596

After:
  User time (seconds): 37.69
  System time (seconds): 2.58
  Percent of CPU this job got: 98%
  Elapsed (wall clock) time (h:mm:ss or m:ss): 0:40.69
  Maximum resident set size (kbytes): 577604
spec: allow passing Typelib type objects to define operations (closes #13)
add some missing includes in templates