Yurttas/PL/OOL/Cplusplus/F/05/01/02/04/03/T A.h
Jump to navigation
Jump to search
1/*
2 Copyright(C) 1998
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : January 1, 1998.
11 author : Salih Yurttas.
12
13 T_A.h
14*/
15
16#ifndef T_A_H
17#define T_A_H
18
19#include <iostream>
20
21using namespace std;
22
23template<class T0,
24 class T1>
25class T_A {
26public:
27 T_A();
28
29 T_A(const T_A<T0,T1>&);
30
31 T_A<T0,T1>& operator=(const T_A<T0,T1>&);
32
33 virtual ~T_A();
34
35 virtual int get_s() const;
36
37 virtual T0 get_d0(const int) const;
38
39 virtual T0* get_d0() const;
40
41 virtual void set_d0(const T0 d0_value=0);
42
43 virtual T1 get_d1(const int) const;
44
45 virtual T1* get_d1() const;
46
47 virtual void set_d1(const T1 d1_value=0);
48
49 virtual void set_d0_d1(const int size=0,
50 const T0 d0_value=0,
51 const T1 d1_value=0);
52
53 template<class U, class V> // this syntax changed several times
54 friend ostream& operator<<(ostream&,
55 const T_A<U,V>&);
56
57protected:
58 int s;
59 T0* d0;
60 T1* d1;
61};
62#endif