<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Visual C++ Tips &#187; C++ namespace</title>
	<atom:link href="http://weseetips.com/tag/c-namespace/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to Rename Namespace?</title>
		<link>http://weseetips.com/2008/11/23/how-to-rename-namespace/</link>
		<comments>http://weseetips.com/2008/11/23/how-to-rename-namespace/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 22:00:24 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Codeproject]]></category>
		<category><![CDATA[C++ namespace]]></category>
		<category><![CDATA[C++ rename namespace]]></category>
		<category><![CDATA[namespace]]></category>
		<category><![CDATA[rename namespace]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=646</guid>
		<description><![CDATA[Namspaces are introduced to have logical grouping of classes. But as the framework grows you could often find that the namespace length grows which make the usage more difficult. For instance, one namespace i&#8217;ve encountered is like this - namespace Company { namespace Product { namespace Communication { namespace Event { class CEventEx { }; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.wordpress.com/files/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
<span style="color:#0000ff;">Namspaces are introduced to have logical grouping of classes.</span> But as the framework grows you could often find that the namespace length grows which make the usage more difficult.</p>
<p><img class="alignnone size-full wp-image-649" title="renamenamespaces" src="http://weseetips.wordpress.com/files/2008/11/renamenamespaces.jpg" alt="renamenamespaces" width="403" height="602" /></p>
<p>For instance, one namespace i&#8217;ve encountered is like this -</p>
<pre>namespace Company
{
    namespace Product
    {
        namespace Communication
        {
            namespace Event
            {
                class CEventEx
                {
                };
            };
        }
    };
};</pre>
<p><span style="color:#0000ff;">How much I&#8217;ve to go inside to address a class?</span> Well, in big frameworks this kind of deep hierarchy is unavoidable. But, its a fact that it causes trouble to developer who uses it. Well, is there any idea to avoid that?</p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.wordpress.com/files/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
<span style="color:#0000ff;"> Well, you can rename the namespace to much more smaller one!</span> Have a look at the code snippet below.</p>
<pre>// Rename the namespace
namespace ThirdPartyEvent = Company::Product::Communication::Event;
...
// Create the object by using renamed namespace.
ThirdPartyEvent::CEventEx objEvent;</pre>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.wordpress.com/files/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
There are still a lot of gems inside C++. isn&#8217;t it? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-medium wp-image-51" title="beginnerseries" src="http://weseetips.wordpress.com/files/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/11/23/how-to-rename-namespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

