<?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>Blöög</title>
	<atom:link href="http://maddimax.dyndns.org/maddi/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://maddimax.dyndns.org/maddi</link>
	<description>made with 100% Romania Cotton</description>
	<lastBuildDate>Fri, 20 Feb 2009 21:13:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mac OS X</title>
		<link>http://maddimax.dyndns.org/maddi/?p=34</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=34#comments</comments>
		<pubDate>Fri, 20 Feb 2009 21:13:22 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=34</guid>
		<description><![CDATA[Manchmal liebe ich dieses Betriebssystem. Wie cool ist das denn bitte ? Schatten inclusive.

]]></description>
			<content:encoded><![CDATA[<p>Manchmal liebe ich dieses Betriebssystem. Wie cool ist das denn bitte ? Schatten inclusive.</p>
<p><a href='http://maddimax.dyndns.org/maddi/?attachment_id=33' rel='attachment wp-att-33' title='Mac rulez'><img src='/maddi/wp-content/uploads/2009/02/picture-5.png' alt='Mac rulez' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Same procedure as every year</title>
		<link>http://maddimax.dyndns.org/maddi/?p=32</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=32#comments</comments>
		<pubDate>Thu, 22 Jan 2009 09:19:11 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=32</guid>
		<description><![CDATA[Und wieder glsl. Diesmal eine implementation von Voronoi Diagrammen auf der GPU. Ohne for-schleife bestehend aus 6 min&#8217;s und 6 texture lookups ( auf der selben Texture jedesmal ). Das ergebnis tile&#8217;t wie nen Weltmeister.
Ich mag Quartz.


Der code zu dem ganzen ist sehr simpel:  

uniform sampler2D texture;          [...]]]></description>
			<content:encoded><![CDATA[<p>Und wieder glsl. Diesmal eine implementation von Voronoi Diagrammen auf der GPU. Ohne for-schleife bestehend aus 6 min&#8217;s und 6 texture lookups ( auf der selben Texture jedesmal ). Das ergebnis tile&#8217;t wie nen Weltmeister.<br />
Ich mag Quartz.<br />
<img src="http://maddimax.dyndns.org/screens/Voronoi1.png" alt="Sieht noch besser in bewegung aus" /></p>
<p><span id="more-32"></span></p>
<p>Der code zu dem ganzen ist sehr simpel:  <br />
<code></p>
<p>uniform sampler2D texture;                            </p>
<p>void main()<br />
{<br />
	vec2 p1 = vec2(0.5, 0.25);<br />
	float c1 = texture2D(texture, gl_TexCoord[0].xy + p1).r;</p>
<p>	vec2 p2 = vec2(0.4, 0.5);<br />
	float c2 = texture2D(texture, gl_TexCoord[0].xy + p2).r;</p>
<p>	vec2 p3 = vec2(0.1, 0.8);<br />
	float c3 = texture2D(texture, gl_TexCoord[0].xy + p3).r;</p>
<p>	vec2 p4 = vec2(0.2, 0.345);<br />
	float c4 = texture2D(texture, gl_TexCoord[0].xy + p4).r;</p>
<p>	vec2 p5 = vec2(0.456, 0.146);<br />
	float c5 = texture2D(texture, gl_TexCoord[0].xy + p5).r;</p>
<p>	vec2 p6 = vec2(0.8, 0.6);<br />
	float c6 = texture2D(texture, gl_TexCoord[0].xy + p6).r;</p>
<p>	float v = min(c6, min(c5, min(c4, min(c3, min(c1, c2)))));</p>
<p>	gl_FragColor = vec4(v,v,v,v);<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glsl Metballs</title>
		<link>http://maddimax.dyndns.org/maddi/?p=28</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=28#comments</comments>
		<pubDate>Thu, 04 Sep 2008 06:21:19 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=28</guid>
		<description><![CDATA[Ein bissl quartz mal wieder, leider nur in 2D:



By the way, das ganze ließ sich wunderbar mit dieser methode zum rendern von Text verknüpfen, da auch hier ein Distance Field der ausgangspunkt ist.
]]></description>
			<content:encoded><![CDATA[<p>Ein bissl quartz mal wieder, leider nur in 2D:</p>
<p><a href='/maddi/wp-content/uploads/2008/09/picture-2.png' title='Metballs'><img src='/maddi/wp-content/uploads/2008/09/picture-2.thumbnail.png' alt='Metballs' /></a></p>
<p><a href='/maddi/wp-content/uploads/2008/09/picture-3.png' title='Metballs 2'><img src='/maddi/wp-content/uploads/2008/09/picture-3.thumbnail.png' alt='Metballs 2' /></a></p>
<p><a href='/maddi/wp-content/uploads/2008/09/picture-4.png' title='Metballs 3'><img src='/maddi/wp-content/uploads/2008/09/picture-4.thumbnail.png' alt='Metballs 3' /></a></p>
<p>By the way, das ganze ließ sich wunderbar mit <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=494612">dieser methode</a> zum rendern von Text verknüpfen, da auch hier ein Distance Field der ausgangspunkt ist.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=28</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neuer Job, neues Projekt</title>
		<link>http://maddimax.dyndns.org/maddi/?p=26</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=26#comments</comments>
		<pubDate>Thu, 15 May 2008 11:02:56 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=26</guid>
		<description><![CDATA[Ich arbeite nun schon seit längerem bei einem neuen Unternehmen und mittlerweile ist auch das momentane projekt als &#8220;Free Preview&#8221; verfügbar.  ( Offizielle Seite  )
]]></description>
			<content:encoded><![CDATA[<p>Ich arbeite nun schon seit längerem bei einem neuen Unternehmen und mittlerweile ist auch das momentane projekt als &#8220;Free Preview&#8221; verfügbar.  ( <a href="http://www.digidesign.com/transfuserpreview/">Offizielle Seite </a> )</p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neue Version des mpd Plugins</title>
		<link>http://maddimax.dyndns.org/maddi/?p=20</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=20#comments</comments>
		<pubDate>Sat, 21 Jul 2007 12:47:26 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=20</guid>
		<description><![CDATA[Es gibt wieder eine neue Version des MPD Plugins für den AppleTV, mitlerweile Version 1.1.3. Es ist jetzt kompatibel mit dem AppleTV Update 1.1.

]]></description>
			<content:encoded><![CDATA[<p>Es gibt wieder eine neue Version des MPD Plugins für den AppleTV, mitlerweile Version 1.1.3. Es ist jetzt kompatibel mit dem AppleTV Update 1.1.</p>
<p><a href='/maddi/wp-content/uploads/2007/07/v113screenshot.jpg' title='Screenshot der Hauptansicht'><img src='/maddi/wp-content/uploads/2007/07/v113screenshot.thumbnail.jpg' alt='Screenshot der Hauptansicht' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nur ein zufall ?</title>
		<link>http://maddimax.dyndns.org/maddi/?p=19</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=19#comments</comments>
		<pubDate>Tue, 10 Jul 2007 07:36:15 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Code Snipptes]]></category>
		<category><![CDATA[Nix Wichtiges]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=19</guid>
		<description><![CDATA[Oder nicht  

]]></description>
			<content:encoded><![CDATA[<p>Oder nicht <img src='/maddi/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href='/maddi/wp-content/uploads/2007/07/zufall.png' title='Nur ein zufall ?'><img src='/maddi/wp-content/uploads/2007/07/zufall.thumbnail.png' alt='Nur ein zufall ?' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppleTV</title>
		<link>http://maddimax.dyndns.org/maddi/?p=16</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=16#comments</comments>
		<pubDate>Sat, 09 Jun 2007 15:07:58 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[AppleTV]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=16</guid>
		<description><![CDATA[Für meinen Apple TV habe ich ein plugin geschrieben das die steuerung eines MPD Servers ermöglicht ( musicpd )
http://code.google.com/p/atvmpdcontrol/

]]></description>
			<content:encoded><![CDATA[<p>Für meinen Apple TV habe ich ein plugin geschrieben das die steuerung eines MPD Servers ermöglicht ( <a href="http://www.musipd.org">musicpd</a> )<br />
<a href="http://code.google.com/p/atvmpdcontrol/">http://code.google.com/p/atvmpdcontrol/</a></p>
<p><a href='/maddi/wp-content/uploads/2007/06/screeni.jpg' title='Screenshot der Status ansicht'><img src='/maddi/wp-content/uploads/2007/06/screeni.thumbnail.jpg' alt='Screenshot der Status ansicht' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Treiber entwicklung</title>
		<link>http://maddimax.dyndns.org/maddi/?p=15</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=15#comments</comments>
		<pubDate>Thu, 23 Nov 2006 08:43:01 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=15</guid>
		<description><![CDATA[Da ich seit kurzem zur eintwicklung eines Treibers &#8220;verdonnert&#8221; wurde, musste ich mich mit dem ganzen Low Level kram von Windows beschäftigen. Dabei hat mir www.osronline.com bzw. die leute aus der Mailing liste dort sehr geholfen. Um den Text nicht zu verlieren und für leute dies interressiert habe ich hier eine antwort zum Thema IRQL [...]]]></description>
			<content:encoded><![CDATA[<p>Da ich seit kurzem zur eintwicklung eines Treibers &#8220;verdonnert&#8221; wurde, musste ich mich mit dem ganzen Low Level kram von Windows beschäftigen. Dabei hat mir www.osronline.com bzw. die leute aus der Mailing liste dort sehr geholfen. Um den Text nicht zu verlieren und für leute dies interressiert habe ich hier eine antwort zum Thema IRQL nochmal gesichert.</p>
<p><span id="more-15"></span></p>
<blockquote><p>
The documentation for every DDK function shows (or should) the IRQLs at which you can safely call that function.<br />
NT provides many different mechanisms for synchronizing execution.<br />
Each mechanism is designed for a different situation. Spinlocks are just one of those mechanisms. They are designed for synchronizing access to data, where that data needs to be accessed at DISPATCH_LEVEL.<br />
Before continuing, make sure you understand why we have dispatch levels at all, and why some DDK functions can only be called at certain dispatch levels. </p>
<p>PASSIVE_LEVEL is the lowest-priority dispatch level. When a thread is running at this level, the thread is &#8220;schedulable&#8221; &#8212; the kernel can choose to halt the thread and reschedule it at any time. This means that a thread running at PASSIVE_LEVEL does not &#8220;own&#8221; a processor; it is frequently given access to a processor, if the thread is runnable, but it cannot be guaranteed access to a processor. When a thread is running at any higher dispatch level, the thread is not schedulable. This means that the thread temporarily &#8220;owns&#8221; the processor that it is running on. As long as that thread is running at a higher dispatch level, the scheduler will never park that thread and schedule another one (on the same processor &#8212; other processors may be running at different dispatch levels). User-mode threads run at PASSIVE_LEVEL. When those threads call kernel entry points, such as NtClose or NtCreateFile or NtSetEvent (etc.), the kernel half of that thread wakes up, thread arguments are copied from the user-mode stack to the kernel-mode stack, and the kernel-mode part of thread begins running the correct system call function (e.g. nt!NtClose, which is the NtClose routine in ntoskrnl.exe, not ntdll.dll). But that thread is still running at PASSIVE_LEVEL, even though it is now running in kernel-mode. Because threads running at PASSIVE_LEVEL are schedulable, they can wait for dispatch objects, such as events, mutexes, semaphores, threads, and processes. When such a thread calls ZwWaitForSingleObject, if that object is not &#8220;signaled&#8221; (the meaning of &#8220;signaled&#8221; varies per object type), then that thread is halted, and placed in a &#8220;waiting&#8221; state. The scheduler then chooses the next runnable thread. </p>
<p>When a thread elevates to DISPATCH_LEVEL or above, this can no longer happen. The scheduler cannot halt the current thread, by definition. So you cannot call ZwWaitForSingleObject (unless you call it in polling mode, by passing a timeout of 0 (not NULL, but 0)), or any other function that boils down to any kind of &#8220;wait&#8221; operation. This includes many functions, including many of the functions that are exposed 1:1 in NTDLL.DLL. You can&#8217;t call ZwClose, ZwCreateFile, ZwReadFile, ZwWriteFile, ZwDeviceIoControl, etc. All of these functions can potentially block the current thread, and so are illegal at elevated IRQL. One of the reasons for this is paging. The &#8220;passive&#8221; functions, like ZwReadFile, are allowed to operate on memory that can be paged (swapped out). Since these functions are meant for use by user-mode threads, and since memory allocated to user-more threads is always pageable (* with a few slight exceptions), you can see that these functions can all implicitly cause a thread to be halted (become not schedulable), because any page fault (touching of a page that is marked &#8220;not present&#8221;) will require the thread to be halted while the page is read from disk. </p>
<p>So what is the purpose of DISPATCH_LEVEL?<br />
DISPATCH_LEVEL is a level that allows device drivers to run code without switching to a different thread. When a device completes a request, typically that device asserts its interrupt line, and the HAL+kernel receive the interrupt. Interrupts occur at &#8220;high&#8221; priority, meaning higher than DISPATCH_LEVEL. Interrupt service routines are not allowed to swap the current thread; they inherit the constraint from DISPATCH_LEVEL that the current thread cannot be swapped. Interrupt service routines must do their job by borrowing the stack of the currently-running thread. In general, ISRs check their device, extract any interrupt information from the device, and then clear the interrupt so that the device stops asserting its interrupt line, and then the ISR schedules a DPC routine to be run &#8220;later, but soon&#8221;. This inserts a DPC object into a queue of DPCs to be run, on the current processor (usually), when the current thread/processor *attempts* to lower its IRQL from DISPATCH_LEVEL to PASSIVE_LEVEL.<br />
In effect, DPCs are kind of &#8220;another&#8221; scheduler. Rather than scheduling threads, DPC objects schedule the execution of DPC routines. DPC routines are allowed to briefly &#8220;borrow&#8221; the current processor, and they always pre-empt threads running at PASSIVE_LEVEL. </p>
<p>Now we get back to your original question (sort of), of what good are spinlocks? Spinlocks are useful for synchronizing code that runs at PASSIVE_LEVEL with code that runs in response to device interrupts. The device interrupt logic runs at &#8220;device IRQL&#8221;, which is higher than dispatch, so its schedules a work item to run at DISPATCH_LEVEL. The passive-level code, such as your DispatchDeviceIoControl routine, runs at PASSIVE_LEVEL, so it elevates to DISPATCH_LEVEL by using KeRaiseIrql, or by using KeAcquireSpinLock (which also raises the current thread to DISPATCH_LEVEL). Then both &#8220;halves&#8221; of the driver can safely access shared data structures. If you want to synchronize access to data structures that are in pageable memory, or will only be accessed by threads that are always running at PASSIVE_LEVEL, then you have a lot of other options. You can use mutexes (KeInitializeMutex), semaphores (KeInitializeSemaphore), or events (KeInitializeEvent).<br />
These all leave the current thread at PASSIVE_LEVEL after the waitable object has become signaled (meaning: the mutex is acquired, or the semaphore has been incremented, or the event has signaled). Or you can use fast mutexes (ExInitializeFastMutex), which leave the current thread in APC_LEVEL. (I haven&#8217;t discussed APC_LEVEL, but it&#8217;s sort of halfway between DISPATCH_LEVEL and PASSIVE_LEVEL, and if you&#8217;re new to dispatch levels, I would suggest you just avoid APC_LEVEL and master DISPATCH_LEVEL vs PASSIVE_LEVEL first.) This is a bit rambly, of course, but I hope it points you in the right direction. The shortest summary is: Dispatch levels are how threads control the scheduler (enabling and disabling scheduling), and how threads synchronize with interrupt service routines.
</p></blockquote>
<p>Dazu gehört dann noch die Link liste aus einer weiteren antwort:</p>
<blockquote><p>
http://www.microsoft.com/whdc/driver/kernel/locks.mspx<br />
When you&#8217;re done with that, read this:<br />
http://www.microsoft.com/whdc/driver/kernel/IRQL.mspx<br />
After you&#8217;ve had a good long rest, then read this: http://www.microsoft.com/whdc/driver/kernel/MP_issues.mspx<br />
If you&#8217;re still curious, read this:<br />
http://www.microsoft.com/whdc/driver/kernel/mem-mgmt.mspx
</p></blockquote>
<p>Danke nochmal an Jake Oshins und Arlie Davis für die erklärung.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enum die 2.</title>
		<link>http://maddimax.dyndns.org/maddi/?p=14</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=14#comments</comments>
		<pubDate>Mon, 16 Oct 2006 07:34:51 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Code Snipptes]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=14</guid>
		<description><![CDATA[Ich hab mal ne noch krausere Implementierung des ContainerEnumerator des vorherigen posts geschrieben.
Diesmal wird sie so benutzt:

vector&#60;int&#62; vInts;
vInts.push_back(1);
enumiterator&#60;vector &#60;int&#62; &#62; enumIt(&#38;vInts);
while(enumIt++)
{
	...
}


PLAIN TEXT
C++:




template &#60;class _T, class _I = _T::iterator&#62;


class enumiterator : public _I


&#123;


public:


&#160; &#160; enumiterator&#40;_T* pContainer&#41;


&#160; &#160; &#123;


&#160; &#160; &#160; &#160; *&#40;&#40;_I*&#41;this&#41; = pContainer-&#62;begin&#40;&#41;;


&#160; &#160; &#160; &#160; m_pContainer = pContainer;


&#160; &#160; &#125;


&#160; &#160; bool operator++&#40;&#41;


&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hab mal ne noch krausere Implementierung des ContainerEnumerator des vorherigen posts geschrieben.</p>
<p>Diesmal wird sie so benutzt:</p>
<p><code><br />
vector&lt;int&gt; vInts;<br />
vInts.push_back(1);<br />
enumiterator&lt;vector &lt;int&gt; &gt; enumIt(&amp;vInts);</p>
<p>while(enumIt++)<br />
{<br />
	...<br />
}<br />
</code></p>
<p><span id="more-14"></span></p>
<div class="igBar"><span id="lcpp-2"><a href="#" onclick="javascript:showPlainTxt('cpp-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C++:</span>
<div id="cpp-2">
<div class="cpp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">template</span> &lt;class _T, <span style="color: #0000ff;">class</span> _I = _T::<span style="color: #00eeff;">iterator</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">class</span> enumiterator : <span style="color: #0000ff;">public</span> _I</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">public</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; enumiterator<span style="color: #000000;">&#40;</span>_T* pContainer<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; *<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>_I*<span style="color: #000000;">&#41;</span><span style="color: #0000dd;">this</span><span style="color: #000000;">&#41;</span> = pContainer-&gt;begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_pContainer = pContainer;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">bool</span> operator++<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>*<span style="color: #0000dd;">this</span> != m_pContainer-&gt;end<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>*<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>_I*<span style="color: #000000;">&#41;</span><span style="color: #0000dd;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>++;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">bool</span> operator++<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>*<span style="color: #0000dd;">this</span> != m_pContainer-&gt;end<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>*<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>_I*<span style="color: #000000;">&#41;</span><span style="color: #0000dd;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>++;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">protected</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; _T*&nbsp;&nbsp;m_pContainer;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#125;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></class></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Container Enum</title>
		<link>http://maddimax.dyndns.org/maddi/?p=13</link>
		<comments>http://maddimax.dyndns.org/maddi/?p=13#comments</comments>
		<pubDate>Thu, 12 Oct 2006 09:55:27 +0000</pubDate>
		<dc:creator>Maddi</dc:creator>
				<category><![CDATA[Code Snipptes]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://maddimax.dyndns.org/maddi/?p=13</guid>
		<description><![CDATA[Vor einiger zeit wurde mir das for(it=begin();it!=end();it++) geschreibe zu nervig, deshalb hab ich mir eine Klasse dafür geschrieben.
Benutzt wird sie z.B. so:
CContainerEnum&#60; vector&#60;int&#62; &#62; enum(vec);
while(enum.next())
{
 ...
}
Mit nem einfachen typedef gibt es auch spezialisierte Versionen wie z.B.:
CVectorEnum&#60; int &#62; ( intVec);
oder 
CMapEnum&#60; int, string &#62; (mapIntToString);

PLAIN TEXT
C++:




template&#38;lt;class C&#38;gt; 


class CContainerEnum


&#123;


public:


&#160; &#160; CContainerEnum&#40;C* pContainer&#41;


&#160; &#160; &#123;


&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Vor einiger zeit wurde mir das for(it=begin();it!=end();it++) geschreibe zu nervig, deshalb hab ich mir eine Klasse dafür geschrieben.</p>
<p>Benutzt wird sie z.B. so:</p>
<p>CContainerEnum&lt; vector&lt;int&gt; &gt; enum(vec);</p>
<p>while(enum.next())<br />
{<br />
 ...<br />
}</p>
<p>Mit nem einfachen typedef gibt es auch spezialisierte Versionen wie z.B.:</p>
<p>CVectorEnum&lt; int &gt; ( intVec);</p>
<p>oder </p>
<p>CMapEnum&lt; int, string &gt; (mapIntToString);</p>
<p><span id="more-13"></span></p>
<div class="igBar"><span id="lcpp-4"><a href="#" onclick="javascript:showPlainTxt('cpp-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C++:</span>
<div id="cpp-4">
<div class="cpp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">template&amp;lt;class C&amp;gt; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">class</span> CContainerEnum</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">public</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; CContainerEnum<span style="color: #000000;">&#40;</span>C* pContainer<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_pContainer = pContainer;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_it = m_pContainer-&amp;gt;begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_bFirstRun = <span style="color: #0000ff;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">inline</span> <span style="color: #0000ff;">bool</span> isLast<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>m_it == m_pContainer-&amp;gt;end<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> m_it+<span style="color: #0000dd;color:#800000;">1</span> == m_pContainer-&amp;gt;end<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">inline</span> <span style="color: #0000ff;">bool</span> hasMore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> m_it != m_pContainer-&amp;gt;end<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">inline</span> <span style="color: #0000ff;">bool</span> next<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>!hasMore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>!m_bFirstRun<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_it++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_bFirstRun = <span style="color: #0000ff;">false</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> hasMore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">inline</span> <span style="color: #0000ff;">typename</span> C::_Reft getCurrent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">assert</span><span style="color: #000000;">&#40;</span>m_it != m_pContainer-&amp;gt;end<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> *m_it;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">typename</span> C::_Reft operator-&amp;gt;<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">const</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> *m_it;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; operator <span style="color: #0000ff;">typename</span> C::_Reft<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">const</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> *m_it;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">inline</span> <span style="color: #0000ff;">void</span> reset<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_it = m_pContainer-&amp;gt;begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_bFirstRun = <span style="color: #0000ff;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">inline</span> <span style="color: #0000ff;">size_t</span> getCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> m_pContainer-&amp;gt;size<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">protected</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">bool</span>&nbsp; &nbsp; m_bFirstRun;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">typename</span> C::<span style="color: #00eeff;">iterator</span> m_it;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0000ff;">typename</span> C* m_pContainer;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">template&amp;lt;class _T&amp;gt; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">class</span> CVectorEnum : <span style="color: #0000ff;">public</span> CContainerEnum&amp;lt;vector&amp;lt;_T&amp;gt;&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">public</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; CVectorEnum<span style="color: #000000;">&#40;</span>vector&amp;lt;_t&amp;gt;* pVector<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; : CContainerEnum&amp;lt;vector&amp;lt;_T&amp;gt;&amp;gt;<span style="color: #000000;">&#40;</span>pVector<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">template&amp;lt;class _K, <span style="color: #0000ff;">class</span> _V&amp;gt; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">class</span> CMapEnum : <span style="color: #0000ff;">public</span> CContainerEnum&amp;lt;map&amp;lt;_K, _V&amp;gt;&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">public</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; CMapEnum<span style="color: #000000;">&#40;</span>map&amp;lt;_K , _V&amp;gt;* pMap<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; : CContainerEnum&amp;lt;map&amp;lt;_K, _V&amp;gt;&amp;gt;<span style="color: #000000;">&#40;</span>pMap<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#125;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://maddimax.dyndns.org/maddi/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
