<?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: One good thing in Objective-C</title>
	<atom:link href="http://greensoftware.net/blog/2010/02/21/one-good-thing-in-objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://greensoftware.net/blog/2010/02/21/one-good-thing-in-objective-c/</link>
	<description>Solving my problems</description>
	<lastBuildDate>Fri, 23 Mar 2012 10:58:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Atif</title>
		<link>http://greensoftware.net/blog/2010/02/21/one-good-thing-in-objective-c/comment-page-1/#comment-4544</link>
		<dc:creator>Atif</dc:creator>
		<pubDate>Tue, 19 Apr 2011 15:19:47 +0000</pubDate>
		<guid isPermaLink="false">http://greensoftware.net/blog/?p=248#comment-4544</guid>
		<description>Another way to do just that, is to make the methods file static functions if they are truly private, and not publish them in the header, but at the top of the cpp file. 

Of course, these functions are no longer member functions, so public member functions have to pass them the references to class state.</description>
		<content:encoded><![CDATA[<p>Another way to do just that, is to make the methods file static functions if they are truly private, and not publish them in the header, but at the top of the cpp file. </p>
<p>Of course, these functions are no longer member functions, so public member functions have to pass them the references to class state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RFC: Improving Qt&#8217;s properties. &#124; Technical Difficulties</title>
		<link>http://greensoftware.net/blog/2010/02/21/one-good-thing-in-objective-c/comment-page-1/#comment-3683</link>
		<dc:creator>RFC: Improving Qt&#8217;s properties. &#124; Technical Difficulties</dc:creator>
		<pubDate>Thu, 01 Jul 2010 16:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://greensoftware.net/blog/?p=248#comment-3683</guid>
		<description>[...] look like from stone age. Objective-C has some nice features as well, one I mentioned in my previous post, which Qt already solves rather nicely and in a better way as one of the commenter pointed out. [...]</description>
		<content:encoded><![CDATA[<p>[...] look like from stone age. Objective-C has some nice features as well, one I mentioned in my previous post, which Qt already solves rather nicely and in a better way as one of the commenter pointed out. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: digitalSurgeon</title>
		<link>http://greensoftware.net/blog/2010/02/21/one-good-thing-in-objective-c/comment-page-1/#comment-3626</link>
		<dc:creator>digitalSurgeon</dc:creator>
		<pubDate>Tue, 13 Apr 2010 09:38:45 +0000</pubDate>
		<guid isPermaLink="false">http://greensoftware.net/blog/?p=248#comment-3626</guid>
		<description>@Robin, I am familiar with that approach ( thanks to Qt ). But I think this could be added to the next C++ language update. Do you see any thing wrong with it ? I mean not declaring private functions in the class declaration.</description>
		<content:encoded><![CDATA[<p>@Robin, I am familiar with that approach ( thanks to Qt ). But I think this could be added to the next C++ language update. Do you see any thing wrong with it ? I mean not declaring private functions in the class declaration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Burchell</title>
		<link>http://greensoftware.net/blog/2010/02/21/one-good-thing-in-objective-c/comment-page-1/#comment-3624</link>
		<dc:creator>Robin Burchell</dc:creator>
		<pubDate>Fri, 09 Apr 2010 23:30:34 +0000</pubDate>
		<guid isPermaLink="false">http://greensoftware.net/blog/?p=248#comment-3624</guid>
		<description>There is a solution to this, known as the PIMPL pattern (amongst other things)

Basically, you declare a pointer to a seperate class, and use that to store all your data members/methods you want private/etc. Qt is one big user of this pattern.

For example:

// .h

// forward declaration
class MyFooPrivate;

class MyFoo
{
    void myBar();
private:
    MyFooPrivate *d_ptr;
};


// cpp
class MyFooPrivate
{
    void mooCow()
    {
        // make a moo noise
    }
};

void MyFoo::myBar()
{
    d_ptr-&gt;mooCow();

    // do other stuff
}</description>
		<content:encoded><![CDATA[<p>There is a solution to this, known as the PIMPL pattern (amongst other things)</p>
<p>Basically, you declare a pointer to a seperate class, and use that to store all your data members/methods you want private/etc. Qt is one big user of this pattern.</p>
<p>For example:</p>
<p>// .h</p>
<p>// forward declaration<br />
class MyFooPrivate;</p>
<p>class MyFoo<br />
{<br />
    void myBar();<br />
private:<br />
    MyFooPrivate *d_ptr;<br />
};</p>
<p>// cpp<br />
class MyFooPrivate<br />
{<br />
    void mooCow()<br />
    {<br />
        // make a moo noise<br />
    }<br />
};</p>
<p>void MyFoo::myBar()<br />
{<br />
    d_ptr-&gt;mooCow();</p>
<p>    // do other stuff<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

