Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

T_I_Histo.h

Go to the documentation of this file.
00001 #ifndef _H_T__I_HISTO_H_
00002 
00003 #if 0
00004         //
00005         // Persistent case.
00006         //
00007         #define _H_P__I_HISTO_H_ 1
00008         #include "HTL/P_macros.h"
00009 #else
00010         //
00011         // Transient case.
00012         //
00013         #define _H_T__I_HISTO_H_ 1
00014         #include "HTL/T_macros.h" // From transient directory.
00015 #endif
00016 
00017 #include "HTL/I_Histo.h" // From Common.
00018 
00019 
00020 /* When using H_T__REF(I_Histo) in different classes, VC++ fails to
00021 recognize it as a same type, hence the following typedef:
00022 (Used for clone_ and add1_ like operations)
00023 */
00024 class T_I_Histo;
00025 typedef H_T__REF(I_Histo) T_REF_I_Histo;
00026 
00028 class T_I_Histo
00029         : H_T_DURABLE  public I_Histo
00030 {
00031 public:
00033   H_IID_IMPLEMENT( T_I_Histo );
00035   typedef T_I_Histo     Like_Current;
00037   typedef H_T__REF(I_Histo)     Ref_Like_Current;
00038 protected:
00039   T_I_Histo() {}
00041   virtual ~T_I_Histo() {}
00042 public:
00044   virtual void set_name( const char *a_name ) = 0;
00045 public:
00051   Ref_Like_Current clone( int copy_data = 1 )
00052     { return clone_( copy_data ); }
00054   Ref_Like_Current clone( H_T_CLUSTER1(a_place), int copy_data = 1 ) 
00055     { return clone_( a_place, copy_data ); }
00056 protected:
00057   virtual T_REF_I_Histo clone_( int copy_data = 1 ) = 0;
00058   virtual T_REF_I_Histo clone_( H_T_CLUSTER1(a_place),
00059                                             int copy_data = 1 ) = 0;
00060 public:
00063   Ref_Like_Current add( const Ref_Like_Current &other )
00064     { return add1_( *( (Ref_Like_Current &) other ) ); }
00065 
00067   void add( const I_Histo &other ) { add_( other ); }
00068 
00071   Ref_Like_Current sub( const Ref_Like_Current &other )
00072     { return sub1_( *( (Ref_Like_Current &) other ) ); }
00073 
00075   void sub( const I_Histo &other ) { sub_( other ); }
00076 
00079   Ref_Like_Current mul( const Ref_Like_Current &other )
00080     { return mul1_( *( (Ref_Like_Current &) other ) ); }
00081 
00083   void mul( const I_Histo &other ) { mul_( other ); }
00084 
00087   Ref_Like_Current div( const Ref_Like_Current &other )
00088     { return div1_( *( (Ref_Like_Current &) other ) ); }
00089 
00091   void div( const I_Histo &other ) { div_( other ); }
00092 
00094   Ref_Like_Current binomial_div( const Ref_Like_Current &other )
00095     { return binomial_div1_( *( (Ref_Like_Current &) other ) ); }
00096 
00098   void binomial_div( const I_Histo &other ) { binomial_div_( other ); }
00099 
00101         void add( double x ) { add_( x ); }
00103         void sub( double x ) { sub_( x ); }
00105         void mul( double x ) { mul_( x ); }
00107         void div( double x ) { div_( x ); }
00108 protected:
00109   virtual void add_( const I_Histo &other ) = 0;
00110   virtual T_REF_I_Histo add1_( const I_Histo &other ) = 0;
00111 
00112   virtual void sub_( const I_Histo &other ) = 0;
00113   virtual T_REF_I_Histo sub1_( const I_Histo &other ) = 0;
00114 
00115   virtual void mul_( const I_Histo &other ) = 0;
00116   virtual T_REF_I_Histo mul1_( const I_Histo &other ) = 0;
00117 
00118   virtual void div_( const I_Histo &other ) = 0;
00119   virtual T_REF_I_Histo div1_( const I_Histo &other ) = 0;
00120 
00121   virtual void binomial_div_( const I_Histo &other ) = 0;
00122   virtual T_REF_I_Histo binomial_div1_( const I_Histo &other )
00123     = 0;
00124 
00125   virtual void add_( double x ) = 0;
00126   virtual void sub_( double x ) = 0;
00127   virtual void mul_( double x ) = 0;
00128   virtual void div_( double x ) = 0;
00129 };
00130 
00131 #endif
00132 


Anaphe documentation generated by Doxygen (www.doxygen.org)