Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/Math/Array.hpp

Go to the documentation of this file.
00001 // Definition of class Array pseudo-template
00002 
00003 #ifndef __J2K__ARRAY_HPP__
00004 #define __J2K__ARRAY_HPP__
00005 
00006 #include <j2k/Fred/Basic.hpp>
00007 #include <j2k/Fred/Boolean.hpp>
00008 #include <j2k/Fred/StdTypes.hpp>
00009 
00010 #define MC_ClassDef_Array( NAME, ELEM )                                  \
00011 class Array_##NAME                                                       \
00012 {                                                                        \
00013 public:                                                                  \
00014    Array_##NAME##();                                                     \
00015    Array_##NAME##( UINT sz );                                            \
00016    Array_##NAME##( const Array_##NAME##& src );                          \
00017    virtual ~Array_##NAME##();                                            \
00018                                                                          \
00019    void Reset();                                                         \
00020    void setSize( UINT arraySize );                                       \
00021    UINT getSize() const;                                                 \
00022                                                                          \
00023    const Array_##NAME##& operator=( const Array_##NAME##& right );       \
00024                                                                          \
00025    BOOL operator==( const Array_##NAME##& right ) const;                 \
00026                                                                          \
00027    /* Determine if two arrays are not equal (uses operator==). */        \
00028    inline BOOL operator!=( const Array_##NAME##& right ) const {         \
00029      return !( *this == right );                                         \
00030    }                                                                     \
00031                                                                          \
00032           ELEM##&  operator[]( UINT );                                   \
00033    const  ELEM##&  operator[]( UINT ) const;                             \
00034    static UINT     getArrayCount();                                      \
00035                                                                          \
00036    friend ostream&  operator<<( ostream&, const Array_##NAME##& );       \
00037    friend istream&  operator>>( istream&, Array_##NAME##& );             \
00038                                                                          \
00039 protected:                                                               \
00040    UINT   size;                                                          \
00041    ELEM*  ptr;                                                           \
00042    static UINT arrayCount;                                               \
00043 };                                                                       
00044 
00045 #endif
00046 

Generated on Sun Oct 14 18:46:12 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001