<?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: Component Oriented Entities</title>
	<atom:link href="http://www.dotsimplicity.net/2009/04/component-oriented-entities/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotsimplicity.net/2009/04/component-oriented-entities/</link>
	<description>Simple, reliable, simplicity. A software discussion blog</description>
	<lastBuildDate>Sun, 25 Dec 2011 00:29:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael</title>
		<link>http://www.dotsimplicity.net/2009/04/component-oriented-entities/comment-page-1/#comment-1744</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 25 Apr 2009 20:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotsimplicity.net/?p=181#comment-1744</guid>
		<description>As of April 25, 2009 the above code has been updated. It&#039;s recommended to update your code if you&#039;re using the above code.</description>
		<content:encoded><![CDATA[<p>As of April 25, 2009 the above code has been updated. It&#8217;s recommended to update your code if you&#8217;re using the above code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.dotsimplicity.net/2009/04/component-oriented-entities/comment-page-1/#comment-1334</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sat, 11 Apr 2009 13:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotsimplicity.net/?p=181#comment-1334</guid>
		<description>Well, in OOP objects can be other objects (a circle is a shape) and objects can have other objects (shapes have vertices). An object is defined but what it has and can do. Attaching 4 wheels to an engine does not make it a car, unless the engine&#039;s power can be transferred to the wheels in some way.

With components, the separation between data (4 wheels, engine) and function (transfer power) is lost. I don&#039;t know if that&#039;s bad good or does not matter, but composition is something quit different from inheritance in C++, and maybe for a good reason.</description>
		<content:encoded><![CDATA[<p>Well, in OOP objects can be other objects (a circle is a shape) and objects can have other objects (shapes have vertices). An object is defined but what it has and can do. Attaching 4 wheels to an engine does not make it a car, unless the engine&#8217;s power can be transferred to the wheels in some way.</p>
<p>With components, the separation between data (4 wheels, engine) and function (transfer power) is lost. I don&#8217;t know if that&#8217;s bad good or does not matter, but composition is something quit different from inheritance in C++, and maybe for a good reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.dotsimplicity.net/2009/04/component-oriented-entities/comment-page-1/#comment-1325</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 11 Apr 2009 06:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotsimplicity.net/?p=181#comment-1325</guid>
		<description>I&#039;m trying to decipher what you meant with a has-a and is-a relationship. If you mean that an entity and its components should recognize each other, that&#039;s already possible. An entity can access it&#039;s components through the vector or the method getComponent(...). And components can access their parent entity through the parent pointer. This enables code like this:

&lt;code&gt;
AnimatedComponent::onUpdate()
{
   Entity *entity = pParent;
   EntityComponent *comp = entity-&gt;getComponent(&quot;CameraComponent&quot;);
   // ^ You might want to do a cast there to access the specific code of the component.
}
&lt;/code&gt;

By the way, I saw your post at DaniWeb. Looked pretty interesting. You might want to cross-post that here.</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to decipher what you meant with a has-a and is-a relationship. If you mean that an entity and its components should recognize each other, that&#8217;s already possible. An entity can access it&#8217;s components through the vector or the method getComponent(&#8230;). And components can access their parent entity through the parent pointer. This enables code like this:</p>
<p><code><br />
AnimatedComponent::onUpdate()<br />
{<br />
   Entity *entity = pParent;<br />
   EntityComponent *comp = entity->getComponent("CameraComponent");<br />
   // ^ You might want to do a cast there to access the specific code of the component.<br />
}<br />
</code></p>
<p>By the way, I saw your post at DaniWeb. Looked pretty interesting. You might want to cross-post that here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.dotsimplicity.net/2009/04/component-oriented-entities/comment-page-1/#comment-1316</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sat, 11 Apr 2009 00:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dotsimplicity.net/?p=181#comment-1316</guid>
		<description>Getting pretty late, but what the heck.

Multiple Virtual Inheritance seems a good way to go with C++ and still doing this, but I still have to inherit from more than 2 classes and with some more complex ways. I dislike the components stuff because you can&#039;t really tell the difference anymore between has-a and is-a relationships, a fundamental part of OOP I reckon. But hey, maybe that&#039;s not that important. Or maybe it&#039;s as simple as having two vectors, one for is-a relationships and one for has-a relationships.

Bedtime! Finally.</description>
		<content:encoded><![CDATA[<p>Getting pretty late, but what the heck.</p>
<p>Multiple Virtual Inheritance seems a good way to go with C++ and still doing this, but I still have to inherit from more than 2 classes and with some more complex ways. I dislike the components stuff because you can&#8217;t really tell the difference anymore between has-a and is-a relationships, a fundamental part of OOP I reckon. But hey, maybe that&#8217;s not that important. Or maybe it&#8217;s as simple as having two vectors, one for is-a relationships and one for has-a relationships.</p>
<p>Bedtime! Finally.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

