<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Reflection in C++ &#8211; part 2</title>
	<atom:link href="http://msinilo.pl/blog/?feed=rss2&#038;p=521" rel="self" type="application/rss+xml" />
	<link>http://msinilo.pl/blog/?p=521</link>
	<description>Random gamedev ramblings</description>
	<lastBuildDate>Sun, 05 Sep 2010 06:59:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://msinilo.pl/blog/?p=521&#038;cpage=1#comment-18211</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 30 Nov 2009 09:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://msinilo.pl/blog/?p=521#comment-18211</guid>
		<description>Arseny - good points, thanks for sharing. About b) - surely you need to store number of elements as well? In such case there&#039;s no reason not to encapsulate it in some kind of object (ptr+size pair) and have custom save handler (like in vector example here).</description>
		<content:encoded><![CDATA[<p>Arseny &#8211; good points, thanks for sharing. About b) &#8211; surely you need to store number of elements as well? In such case there&#8217;s no reason not to encapsulate it in some kind of object (ptr+size pair) and have custom save handler (like in vector example here).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arseny Kapoulkine</title>
		<link>http://msinilo.pl/blog/?p=521&#038;cpage=1#comment-18206</link>
		<dc:creator>Arseny Kapoulkine</dc:creator>
		<pubDate>Mon, 30 Nov 2009 06:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://msinilo.pl/blog/?p=521#comment-18206</guid>
		<description>My experience with serialization is a bit different.

a. Layouts do differ; even without platform-specific types and multiple inheritance, this
struct barbase { int a; };
struct bar: barbase { virtual void foo(); double b; };
has size=24 in MSVC (Win/X360) and size=16 in GCC (Win/PS3).

b. We frequently use pointers to arrays, so vector-specific solution is not sufficient. Since our meta-info is in code form, there is a special pointerToArray construct; we were planning to switch to PDB/ELF (via libbfd) parsing for reflection for quite some time now, we&#039;ll require some sort of annotation support for sure.

c. Saving platform-specific types is a necessary thing (although we expose them in Windows export code to be able to serialize them, of course).

d. LIP and SIP are more or less orthogonal; our LIP patches pointers, but SIP is slightly more complex than simple iteration and pointer following

e. Something we also use is so-called post-constructors - a bits of code attached to specific classes that execute after the whole graph that contains those classes gets loaded; you can rely on pointer values inside objects you&#039;re pointing to there.</description>
		<content:encoded><![CDATA[<p>My experience with serialization is a bit different.</p>
<p>a. Layouts do differ; even without platform-specific types and multiple inheritance, this<br />
struct barbase { int a; };<br />
struct bar: barbase { virtual void foo(); double b; };<br />
has size=24 in MSVC (Win/X360) and size=16 in GCC (Win/PS3).</p>
<p>b. We frequently use pointers to arrays, so vector-specific solution is not sufficient. Since our meta-info is in code form, there is a special pointerToArray construct; we were planning to switch to PDB/ELF (via libbfd) parsing for reflection for quite some time now, we&#8217;ll require some sort of annotation support for sure.</p>
<p>c. Saving platform-specific types is a necessary thing (although we expose them in Windows export code to be able to serialize them, of course).</p>
<p>d. LIP and SIP are more or less orthogonal; our LIP patches pointers, but SIP is slightly more complex than simple iteration and pointer following</p>
<p>e. Something we also use is so-called post-constructors &#8211; a bits of code attached to specific classes that execute after the whole graph that contains those classes gets loaded; you can rely on pointer values inside objects you&#8217;re pointing to there.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
