<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="text-align:left; direction:ltr;">
<div>Hello Rock-Devs,</div>
<div><br>
</div>
<div>long time not seen :).</div>
<div>I currently play around with typekit and orogen in one of our projects.</div>
<div>I did the basic build system integration and if we continue using it, i might need to extend orogen (castxml handling) with cmake support soon, but this is a differnt story.</div>
<div><br>
</div>
<div>So, I currently struggle to create bindings/serialization helper for some special types we use:</div>
<div><br>
</div>
<div>1) Typelib[WARN]: /home/a/workspace/athena/build/vfc/include/vfc/memory/vfc_fixedblock_allocator.hpp:198: cannot create the /vfc/TFixedBlockAllocator&lt;SOMETHING&gt;/storage_type typedef, as it points to&nbsp;&nbsp;which is ignored</div>
<div>2) Typelib[WARN]: /home/a/workspace/athena/build/vfc/include/vfc/memory/vfc_fixedblock_allocator.hpp:89: ignoring /vfc/TFixedBlockAllocator&lt;SOMETHING,200&gt; since its field m_memblock is of the ignored type /vfc/TFixedBlockAllocator&lt;SOMETHING,200&gt;/storage_type</div>
<div>3) Typelib[WARN]: /home/a/workspace/athena/build/vfc/include/vfc/container/vfc_fixedvector.hpp:453: ignoring /vfc/TFixedVector&lt;SOMETHING,200,SOMETHING,200&gt;&gt;/storage_type as it has a non-public access specifier: private</div>
<div>4) Typelib[WARN]: /home/a/workspace/athena/build/vfc/include/vfc/container/vfc_fixedvector.hpp:93: ignoring /vfc/TFixedVector&lt;SOMETHING,200,/vfc/TFixedBlockAllocator&lt;SOMETHING,200&gt;&gt; since its field m_memory is of the ignored type /vfc/TFixedVector&lt;SOMETHING,200,/vfc/TFixedBlockAllocator&lt;SOMETHING,200&gt;&gt;/storage_type</div>
<div><br>
</div>
<div>And i see several issues in:</div>
<div>1) there is a &quot;points to &lt;MISSING?&gt; which is ignored&quot; so obvisously here is something wrong in the error message (and i havwe to trace down the /storage_type which i have no clue where its comming from</div>
<div>2,3) private fields, normal error, see below....</div>
<div>4) simliar to one </div>
<div><br>
</div>
<div>To solve the issues I thought provide a own serialization/deserialization method to prevent the usage inside RTT.</div>
<div><br>
</div>
<div>I wanted to go for a &quot;specialize&quot; of the types. However adding the the following specialize to my .orogen project:</div>
<div><br>
</div>
<hr align="left" size="2" noshade="">
<div style="margin-left: 3ch;">
<pre>Typelib.specialize '/vfc/TFixedBlockAllocator&lt;&gt;' do</pre>
</div>
<pre>    include Typelib::ContainerType::StdVector #something should hopefully not YET madder, to be written later</pre>
<pre>  end</pre>
<pre><br></pre>
<pre>  Typelib.specialize '/vfc/TFixedVector&lt;&gt;' do</pre>
<pre>    include Typelib::ContainerType::StdVector #something should hopefully not YET madder, to be written later</pre>
<pre>  end</pre>
<div><br>
</div>
<hr align="left" size="2" noshade="">
<div>does not have any effect. Same as if i would add it to typelib directly:</div>
<div><br>
</div>
<div style="margin-left: 3ch;"><br>
<hr align="left" size="2" noshade="">
<pre>diff --git a/bindings/ruby/lib/typelib/standard_convertions.rb b/bindings/ruby/lib/typelib/standard_convertions.rb</pre>
<pre>index fb3e3fb..f917070 100644</pre>
<pre>--- a/bindings/ruby/lib/typelib/standard_convertions.rb</pre>
<pre>&#43;&#43;&#43; b/bindings/ruby/lib/typelib/standard_convertions.rb</pre>
<pre>@@ -59,6 &#43;59,10 @@ def concat(other_string)</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include Typelib::ContainerType::StdVector</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end</pre>
<pre>&nbsp;</pre>
<pre>&#43;&nbsp;&nbsp;&nbsp;&nbsp;specialize '/vfc/TFixedVector&lt;&gt;' do</pre>
<pre>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include Typelib::ContainerType::FixedVector #something should hopefully not YET madder, to be written later</pre>
<pre>&#43;&nbsp;&nbsp;&nbsp;&nbsp;end</pre>
<pre>&#43;</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;####</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# C string handling</pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if String.instance_methods.include? :ord</pre>
<div></div>
<div><br>
</div>
<hr align="left" size="2" noshade="">
</div>
<div><br>
</div>
<div>So my questions are:</div>
<div>* Since i am out of rock, am i going the right way, why the specialize is not taken into account?</div>
<div>** Cant it bypass the private fields, do i have to change my underlaying core datatypes (if so are there other ways which are copy free?, I would like to prevent going down this path)</div>
<div>* Can I prevent a copy this way, or will the data strucutres be copied if i go for a &quot;specialize&quot;?I</div>
<div>Thanks for your help</div>
<div><br>
</div>
<div>Best and stay safe,</div>
<div>Matthias</div>
<div style="margin-left: 3ch;">
<div style="margin-left: 3ch;">
<div></div>
<div></div>
</div>
</div>
</body>
</html>