Yurttas/PL/OOL/Cplusplus/F/05/01/02/04/00/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
17#ifndef T_A_H
18#define T_A_H
19
20#include <iostream>
21
22using namespace std;
23
24template<class T0,
25 class T1>
26class T_A {
27public:
28 T_A();
29
30 T_A(const T_A<T0,T1>&);
31
32 T_A<T0,T1>& operator=(const T_A<T0,T1>&);
33
34 virtual ~T_A();
35
36 virtual int get_s() const;
37
38 virtual T0 get_d0(const int) const;
39
40 virtual T0* get_d0() const;
41
42 virtual void set_d0(const T0 d0_value=0);
43
44 virtual T1 get_d1(const int) const;
45
46 virtual T1* get_d1() const;
47
48 virtual void set_d1(const T1 d1_value=0);
49
50 virtual void set_d0_d1(const int size=0,
51 const T0 d0_value=0,
52 const T1 d1_value=0);
53
54 template<class U, class V> // this syntax changed several times
55 friend ostream& operator<<(ostream&,
56 const T_A<U,V>&);
57
58protected:
59 int s;
60 T0* d0;
61 T1* d1;
62};
63#endif