spielwiese
Last change
on this file since 341696 was
341696,
checked in by Hans Schönemann <hannes@…>, 14 years ago
|
Adding Id property to all files
git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
923 bytes
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | /* $Id$ */ |
---|
3 | |
---|
4 | #ifndef INCL_ARRAY_H |
---|
5 | #define INCL_ARRAY_H |
---|
6 | |
---|
7 | #include <factoryconf.h> |
---|
8 | |
---|
9 | #ifndef NOSTREAMIO |
---|
10 | #ifdef HAVE_IOSTREAM |
---|
11 | #include <iostream> |
---|
12 | #define OSTREAM std::ostream |
---|
13 | #elif defined(HAVE_IOSTREAM_H) |
---|
14 | #include <iostream.h> |
---|
15 | #define OSTREAM ostream |
---|
16 | #endif |
---|
17 | #endif /* NOSTREAMIO */ |
---|
18 | |
---|
19 | template <class T> |
---|
20 | class Array { |
---|
21 | private: |
---|
22 | T * data; |
---|
23 | int _min; |
---|
24 | int _max; |
---|
25 | int _size; |
---|
26 | public: |
---|
27 | Array(); |
---|
28 | Array( const Array<T>& ); |
---|
29 | Array( int size ); |
---|
30 | Array( int min, int max ); |
---|
31 | ~Array(); |
---|
32 | Array<T>& operator= ( const Array<T>& ); |
---|
33 | T& operator[] ( int i ) const; |
---|
34 | int size() const; |
---|
35 | int min() const; |
---|
36 | int max() const; |
---|
37 | #ifndef NOSTREAMIO |
---|
38 | void print ( OSTREAM& ) const; |
---|
39 | #endif /* NOSTREAMIO */ |
---|
40 | }; |
---|
41 | |
---|
42 | #ifndef NOSTREAMIO |
---|
43 | template <class T> |
---|
44 | OSTREAM& operator<< ( OSTREAM & os, const Array<T> & a ); |
---|
45 | #endif /* NOSTREAMIO */ |
---|
46 | |
---|
47 | #endif /* ! INCL_ARRAY_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.