jengelh-datetimespielwiese
Last change
on this file since 362fc67 was
362fc67,
checked in by Martin Lee <martinlee84@…>, 11 years ago
|
chg: remove $Id$
|
-
Property mode set to
100644
|
File size:
923 bytes
|
Line | |
---|
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 */ |
---|
Note: See
TracBrowser
for help on using the repository browser.