/[marvin]/marvin/src/libsip/type/type.hh
ViewVC logotype

Diff of /marvin/src/libsip/type/type.hh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by hannibal, Tue Aug 12 20:42:33 2003 UTC revision 1.6 by vishnou, Tue Aug 26 15:29:07 2003 UTC
# Line 38  Line 38 
38  * E-mail :  * E-mail :
39  *  *
40  *******************************************************************/  *******************************************************************/
41    /**
42     ** \file type.hh
43     ** Define the abstract class type
44     */
45    
46  #ifndef TYPE_HH  #ifndef TYPE_HH
47  #define TYPE_HH  #define TYPE_HH
48    
# Line 48  Line 53 
53  #define minimum(a,b) (((a)<(b))?(a):(b))  #define minimum(a,b) (((a)<(b))?(a):(b))
54  #define PI     3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679  #define PI     3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
55    
56    /** \brief Abstract type
57     **
58     ** \b Example: contsignal inherite of this class
59    */
60    
61  class Type {  class Type {
62  private:  private:
63    Signal *_signal;    Signal *_signal;
64  public:  public:
65    // Constructeur    // Constructeur
66     /** \name Ctor & dtor.                                                      
67       ** \{ */
68    
69      /** \brief Construct a new type of signal
70       */
71    Type();    Type();
72    Type(double *data);    Type(double *data);
73    Type(double *data, int length);    Type(double *data, int length);
74      /** \} */
75    
76    // Operations    // Operations
77    Signal *get_signal(){ return _signal; }    /** \name Operations
78       ** \{ */
79    void set_signal(Signal *signal){ _signal = signal; }    void set_signal(Signal *signal){ _signal = signal; }
   double &operator [] ( int val );  
   double operator [] ( int val ) const;  
80    void operator = ( double *src );    void operator = ( double *src );
81      /** \} */
82    
83    
84      /** \name Accessors.                                                        
85       ** \{ */
86      Signal *get_signal(){ return _signal; }
87    int length();    int length();
88    
89      /** \brief Accessor on data. Work just like for a signal
90       ** \param the value to get
91       */
92      double &operator [] ( int val );
93      double operator [] ( int val ) const;
94      /** \} */
95  };  };
96    
97  #endif  #endif

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26