<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Code Snippet on Nikhil&#39;s blog</title>
    <link>https://master--suspicious-stonebraker-7d2d21.netlify.app/tags/code-snippet/</link>
    <description>Recent content in Code Snippet on Nikhil&#39;s blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Mon, 02 Nov 2009 16:19:00 +0000</lastBuildDate>
    <atom:link href="https://master--suspicious-stonebraker-7d2d21.netlify.app/tags/code-snippet/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Macros for Observers</title>
      <link>https://master--suspicious-stonebraker-7d2d21.netlify.app/post/2009/macros-for-observers/</link>
      <pubDate>Mon, 02 Nov 2009 16:19:00 +0000</pubDate>
      <guid>https://master--suspicious-stonebraker-7d2d21.netlify.app/post/2009/macros-for-observers/</guid>
      <description>Here are two little macros too make implementing the Observer design pattern less repetitive. This is C++&#xA;File: observermacros.h&#xA;#ifndef DDM_OBSERVERMACRO_H&#xA;#define DDM_OBSERVERMACRO_H&#xA;#define MAKE_OBSERVABLE( obscls ) \&#xA;private:\&#xA;std::list&lt; obscls *&gt; m_observers;\&#xA;public:\&#xA;void addObserver( obscls *obs ) {\&#xA;m_observers.push_back( obs );\&#xA;}\&#xA;void delObserver( obscls *obs ) {\&#xA;m_observers.remove( obs );\&#xA;}&#xA;#define NOTIFY( obscls, obsmethod, argument ) \&#xA;for( std::list::const_iterator it = m_observers.begin();\&#xA;it != m_observers.end(); it++ )\</description>
    </item>
    <item>
      <title>Dynamic delegation in PHP</title>
      <link>https://master--suspicious-stonebraker-7d2d21.netlify.app/post/2007/dynamic-delegation-in-php/</link>
      <pubDate>Thu, 05 Apr 2007 15:57:00 +0000</pubDate>
      <guid>https://master--suspicious-stonebraker-7d2d21.netlify.app/post/2007/dynamic-delegation-in-php/</guid>
      <description>While working on Pixelframe I devised 2 methods to dynamically delegate tasks to appropriate functions. These methods may already be known and used but these are mine and I thought it would be good to post them. These are particularly useful for handling requests where you call a certain function/script based on one parameter ( say &#39;action&#39; ) and pass the rest of the parameters to the function /script. So here goes.</description>
    </item>
  </channel>
</rss>
