spielwiese
Last change
on this file since 6ab5981 was
6ab5981,
checked in by Jens Schmidt <schmidt@…>, 26 years ago
|
o header fixed
git-svn-id: file:///usr/local/Singular/svn/trunk@411 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
845 bytes
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | /* $Id: ftmpl_array.h,v 1.5 1997-06-19 13:11:13 schmidt Exp $ */ |
---|
3 | |
---|
4 | #ifndef INCL_ARRAY_H |
---|
5 | #define INCL_ARRAY_H |
---|
6 | |
---|
7 | #include <factoryconf.h> |
---|
8 | |
---|
9 | #ifndef NOSTREAMIO |
---|
10 | #include <iostream.h> |
---|
11 | #endif /* NOSTREAMIO */ |
---|
12 | |
---|
13 | template <class T> |
---|
14 | class Array { |
---|
15 | private: |
---|
16 | T * data; |
---|
17 | int _min; |
---|
18 | int _max; |
---|
19 | int _size; |
---|
20 | public: |
---|
21 | Array(); |
---|
22 | Array( const Array<T>& ); |
---|
23 | Array( int size ); |
---|
24 | Array( int min, int max ); |
---|
25 | ~Array(); |
---|
26 | Array<T>& operator= ( const Array<T>& ); |
---|
27 | T& operator[] ( int i ) const; |
---|
28 | int size() const; |
---|
29 | int min() const; |
---|
30 | int max() const; |
---|
31 | #ifndef NOSTREAMIO |
---|
32 | void print ( ostream& ) const; |
---|
33 | #endif /* NOSTREAMIO */ |
---|
34 | }; |
---|
35 | |
---|
36 | #ifndef NOSTREAMIO |
---|
37 | template <class T> |
---|
38 | ostream& operator<< ( ostream & os, const Array<T> & a ); |
---|
39 | #endif /* NOSTREAMIO */ |
---|
40 | |
---|
41 | #endif /* ! INCL_ARRAY_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.