Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Test/ArrayFn.cpp

Go to the documentation of this file.
00001 // Fred P. for J2K Library
00002 
00003 // LGPL Licensed.
00004 // http://j2k.sourceforge.net/
00005 #ifndef __ARRAY_FN_CPP__
00006 #define __ARRAY_FN_CPP__
00007 
00008 #include <stdio.h>
00009 #include <stdlib.h>
00010 #include <iostream.h>
00011 
00012 class ArrayFn {
00013 public:
00014   void Disp( int a, int b ) {
00015     ArrayFn::Table[a](b);
00016   }
00017 
00018   void fn1(int a) { cout << "fn1"; }
00019   void fn2(int a) { cout << "fn2"; }
00020 
00021   static void ( ArrayFn::*Table[] )( int ) = { 
00022     ArrayFn::fn1, 
00023     ArrayFn::fn2 
00024   };
00025 
00026 };
00027 
00028 void main() {
00029   ArrayFn* af = new ArrayFn();
00030   af->Disp( 1, 2 );
00031   delete af;
00032 }
00033 
00034 #endif

Generated on Sun Oct 14 18:46:43 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001