Wavelet and Image class library  1.3.2
ReferenceVector.hh
Go to the documentation of this file.
00001 /*
00002  * class ReferenceVector
00003  *
00004  * $Date$
00005  * $Revision$
00006  *
00007  */
00008 
00009 #ifndef REFERENCE_VECTOR_HH__
00010 #define REFERENCE_VECTOR_HH__
00011 
00012 #include "WImage/miscdefs.h"
00013 
00022 /*abstract*/
00023 class
00024 ReferenceVector
00025 {
00026 public:
00027 
00029   ReferenceVector (void) {
00030     m_vroot = 0;
00031   }
00033   virtual ~ReferenceVector (void) {};
00034 
00036   inline int root (void) { return m_vroot; }
00037 
00040   virtual bool sanity (void) = 0;
00043   virtual void update (void) = 0;
00044 
00051   virtual void go (int root) = 0;
00052 
00059   virtual coeff at (int pos) = 0;
00060 
00067   virtual void to (int pos, coeff val) = 0;
00072   virtual int size (void) = 0;
00073 
00078   inline void copy (ReferenceVector &other)
00079   {
00080     for (int i = 0; i < this->size () && i < other.size (); i++)
00081       {
00082         this->to (i, other.at (i));
00083       }
00084   }
00085 
00086 #ifdef USE_DEPRECATED_API
00087 
00091   inline void copy (ReferenceVector *other) { copy (*other); }
00092 #endif
00093 protected:
00096   int m_vroot;
00097 }; /* class ReferenceVector */
00098 
00101 #endif /* REFERENCE_VECTOR_HH__ */
00102 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines