ftmpl_array.h
Go to the documentation of this file.
1 /* emacs edit mode for this file is -*- C++ -*- */
2 
3 #ifndef INCL_ARRAY_H
4 #define INCL_ARRAY_H
5 
6 // #include <factory/factoryconf.h>
7 
8 #ifndef NOSTREAMIO
9 #ifdef HAVE_IOSTREAM
10 #include <iostream>
11 #define OSTREAM std::ostream
12 #elif defined(HAVE_IOSTREAM_H)
13 #include <iostream.h>
14 #define OSTREAM ostream
15 #endif
16 #endif /* NOSTREAMIO */
17 
18 template <class T>
19 class Array {
20 private:
21  T * data;
22  int _min;
23  int _max;
24  int _size;
25 public:
26  Array();
27  Array( const Array<T>& );
28  Array( int size );
29  Array( int min, int max );
30  ~Array();
31  Array<T>& operator= ( const Array<T>& );
32  T& operator[] ( int i ) const;
33  int size() const;
34  int min() const;
35  int max() const;
36 #ifndef NOSTREAMIO
37  void print ( OSTREAM& ) const;
38 #endif /* NOSTREAMIO */
39 };
40 
41 #ifndef NOSTREAMIO
42 template <class T>
43 OSTREAM& operator<< ( OSTREAM & os, const Array<T> & a );
44 #endif /* NOSTREAMIO */
45 
46 #endif /* ! INCL_ARRAY_H */
const poly a
Definition: syzextra.cc:212
#define OSTREAM
Definition: ftmpl_array.h:11
void print(OSTREAM &) const
Definition: ftmpl_array.cc:138
int size() const
Definition: ftmpl_array.cc:92
T * data
Definition: ftmpl_array.h:21
T & operator[](int i) const
Definition: ftmpl_array.cc:85
Array< T > & operator=(const Array< T > &)
Definition: ftmpl_array.cc:63
Array()
Definition: ftmpl_array.cc:6
int i
Definition: cfEzgcd.cc:123
int _size
Definition: ftmpl_array.h:24
int min() const
Definition: ftmpl_array.cc:98
int max() const
Definition: ftmpl_array.cc:104
~Array()
Definition: ftmpl_array.cc:57
int _max
Definition: ftmpl_array.h:23
static jList * T
Definition: janet.cc:37
int _min
Definition: ftmpl_array.h:22