Simple array class. More...
Public Member Functions | |
| OptppArray< T > & | append (const T &rhs) | 
| add a new entry.   | |
| bool | bcast (int sender) | 
| accessors that return error codes if there are problems with parallel processing   | |
| bool | get (int i, T &value) const | 
| accessors that return error codes upon bounds violations (if NOBOUNDSCHECK is not set):   | |
| int | length () const | 
| const OptppArray< T > & | operator= (const OptppArray< T > &other) | 
| explicit assignment needed to prevent memory corruption   | |
| const T & | operator[] (int i) const | 
| T & | operator[] (int i) | 
| simple accessors.   | |
| OptppArray (const OptppArray< T > &other) | |
| explicit copy constructor needed to prevent memory corruption   | |
| OptppArray (int n, const T &t) | |
| OptppArray (int n, const T *cOptppArray) | |
| OptppArray (int n) | |
| OptppArray () | |
| Default Constructor.   | |
| bool | put (int i, const T &value) | 
| bool | recv (int tag, int src) | 
| int | reserve () const | 
| return numbered of reserved slots in OptppArray   | |
| void | reserve (int n) | 
| reserve n slots in OptppArray   | |
| void | resize (int newN) | 
| resize the OptppArray   | |
| bool | send (int tag, int dest) | 
| ~OptppArray () | |
| explicit copy destructor needed to prevent memory corruption   | |
Simple array class.
Bounds checking is ON by default. To turn it off (for optimal performance) do -DNOBOUNDSCHECK on the compilation command line.
Parallel support for primitive types relies on template specialization. If your compiler supports template specialization, define TEMPLATE_SPECIALIZATION and use the code here. Otherwise, use the workaround routines in BadCompilerHacks.[cpp,h]. IRIX CC 7.2 and egcs both support specialization. IRIX CC 7.1 appears not to (though the documentation says otherwise).
Definition at line 29 of file OptppArray.h.
| OPTPP::OptppArray< T >::OptppArray | ( | ) |  [inline] | 
        
Default Constructor.
Definition at line 220 of file OptppArray.h.
| OPTPP::OptppArray< T >::OptppArray | ( | int | n | ) |  [inline] | 
        
| n | an integer argument | 
Definition at line 227 of file OptppArray.h.
| OPTPP::OptppArray< T >::OptppArray | ( | int | n, | |
| const T * | cOptppArray | |||
| ) |  [inline] | 
        
| n | an integer argument | |
| cOptppArray | a pointer to class T | 
Definition at line 242 of file OptppArray.h.
| OPTPP::OptppArray< T >::OptppArray | ( | int | n, | |
| const T & | t | |||
| ) |  [inline] | 
        
| n | an integer argument | |
| t | a reference to class T | 
Definition at line 258 of file OptppArray.h.
| OPTPP::OptppArray< T >::~OptppArray | ( | ) |  [inline] | 
        
explicit copy destructor needed to prevent memory corruption
Definition at line 291 of file OptppArray.h.
| OPTPP::OptppArray< T >::OptppArray | ( | const OptppArray< T > & | other | ) |  [inline] | 
        
explicit copy constructor needed to prevent memory corruption
Definition at line 276 of file OptppArray.h.
| OptppArray< T > & OPTPP::OptppArray< T >::append | ( | const T & | rhs | ) |  [inline] | 
        
add a new entry.
Definition at line 297 of file OptppArray.h.
References OPTPP::OptppArray< T >::resize().
| bool OPTPP::OptppArray< T >::bcast | ( | int | sender | ) | 
accessors that return error codes if there are problems with parallel processing
| bool OPTPP::OptppArray< T >::get | ( | int | i, | |
| T & | value | |||
| ) |  const [inline] | 
        
accessors that return error codes upon bounds violations (if NOBOUNDSCHECK is not set):
Definition at line 398 of file OptppArray.h.
| int OPTPP::OptppArray< T >::length | ( | ) |  const [inline] | 
        
Definition at line 339 of file OptppArray.h.
| const OptppArray< T > & OPTPP::OptppArray< T >::operator= | ( | const OptppArray< T > & | other | ) |  [inline] | 
        
explicit assignment needed to prevent memory corruption
Definition at line 305 of file OptppArray.h.
| T & OPTPP::OptppArray< T >::operator[] | ( | int | i | ) |  [inline] | 
        
simple accessors.
If NOBOUNDSCHECK is not set and a bounds error occurs, crash. In cases where error handling is to be used, and exceptions are not supported, use get and put instead.
Definition at line 368 of file OptppArray.h.
| int OPTPP::OptppArray< T >::reserve | ( | ) |  const [inline] | 
        
return numbered of reserved slots in OptppArray
Definition at line 363 of file OptppArray.h.
Referenced by OPTPP::OptppArray< T >::resize().
| void OPTPP::OptppArray< T >::reserve | ( | int | n | ) |  [inline] | 
        
reserve n slots in OptppArray
Definition at line 344 of file OptppArray.h.
| void OPTPP::OptppArray< T >::resize | ( | int | newN | ) |  [inline] | 
        
resize the OptppArray
Definition at line 328 of file OptppArray.h.
References OPTPP::OptppArray< T >::reserve().
Referenced by OPTPP::OptppArray< T >::append().
 1.6.3