Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

defineVI.h

Go to the documentation of this file.
00001 #ifndef defineVI_h
00002 #define defineVI_h
00003 //-------------------------------------
00005 /*! 
00006 <ul>
00007         <li> A derived class of defineVI can check at run-time if it has been already defined or not.
00008         If not, it can execute the \c define() method and define itself. 
00009         <li> Lets consider the example of multialgorithms, that used other algorithms.
00010         At compile time maybe some algorithms are not beed defined yet. The class
00011         is therefore not defined at compile time. At run time, when the
00012         \c initialize() (of algorithmVI) method is executed the first time,
00013         the derived class will them execute its \c define() method and define its algorithms. 
00014         Setting the \c setDefine() to true, the define() method will not be executed again. 
00015         <li> This class is useful to retreive at one, pointers that will keep their address
00016         constant during the live of the class.
00017 </ul>
00018 */
00019 //-------------------------------------
00020 // JA Hernando, Santa Cruz, CA, 05/15/00
00021 //-------------------------------------
00022 //#####################################
00023 class defineVI
00024 //#####################################
00025 {
00026 protected:
00027 
00029         defineVI() {setDefine(false);}
00031         virtual ~defineVI() {};
00032 
00034         virtual void define() = 0;
00035 
00037         void setDefine(bool t)  {m_define = t;}
00039         bool defined() const {return m_define;}
00040 
00041 private:
00042 
00044         bool m_define;
00045 };
00046 #endif

Generated at Fri Aug 18 12:57:38 2000 for centella framework by doxygen 1.1.3 written by Dimitri van Heesch, © 1997-2000