arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

SimMetaProg.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 //
00003 //   Joe Kniss
00004 //     3-20-03
00005 //                   ________    ____   ___ 
00006 //                  |        \  /    | /  /
00007 //                  +---+     \/     |/  /
00008 //                  +--+|  |\    /|     < 
00009 //                  |  ||  | \  / |  |\  \ 
00010 //                  |      |  \/  |  | \  \ 
00011 //                   \_____|      |__|  \__\
00012 //                       Copyright  2003 
00013 //                      Joe Michael Kniss
00014 //                   <<< jmk@cs.utah.edu >>>
00015 //               "All Your Base are Belong to Us"
00016 //-------------------------------------------------------------------------
00017 
00018 ///SimMetaProg.h
00019 ///  a base class for simian meta-programs
00020 
00021 #ifndef __SIMIAN_META_PROGRAM_DOT_H
00022 #define __SIMIAN_META_PROGRAM_DOT_H
00023 
00024 #include "MetaProg.h"
00025 #include <volume/Volume.h>
00026 
00027 //// a generic simian metaprogram, to extend 
00028 ////   all meta-program kinds for simian specific tasks
00029 template<class MPTYPE>
00030 class SimMetaProg : public MPTYPE {
00031 public:
00032    virtual ~SimMetaProg() {}
00033    
00034    typedef typename MPTYPE MPType;
00035 
00036    void     setVolume(VolumeSP vol) { _vol = vol; }
00037    VolumeSP getVolume() const       { return _vol;}
00038 
00039 protected:
00040    SimMetaProg() :_vol(0) {}
00041    SimMetaProg(const SimMetaProg &smp) :_vol(smp._vol) {}
00042    SimMetaProg &operator=(const SimMetaProg &smp) {}
00043 
00044    VolumeSP _vol;
00045 };
00046 
00047 //// kinds of simian meta programs
00048 //// here's how the hierarch looks at this point
00049 ////  SimBase <- MetaProg <- *PMetaProg <- SimMetaProg <- Sim*PMetaProg
00050 //// kind of a wierd way to extend functionality, but it works :)
00051 
00052 /// simian fragment meta-prog 
00053 typedef SimMetaProg<FPMetaProg> SimFPMetaProg;
00054 
00055 /// simian vertex meta-prog
00056 typedef SimMetaProg<VPMetaProg> SimVPMetaProg;
00057 
00058 
00059 #endif
00060 

Send questions, comments, and bug reports to:
jmk