Yurttas/PL/OOL/Cplusplus/F/05/01/01/03/T A.h

 1/*
 2   Copyright(C) 2007
 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   : December 1, 2007.
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(const T0 v0=0,
29      const T1 v1=0);
30
31  T_A(const T_A<T0,T1>&);
32
33  T_A<T0,T1>& operator=(const T_A<T0,T1>&);
34
35  T0 get_a0() const;
36  T1 get_a1() const;
37
38  void set_a0(const T0);
39  void set_a1(const T1);
40
41  template<class U,class V>   // this syntax changed several times
42  friend ostream& operator<<(ostream&,
43                             const T_A<U,V>&);
44
45private:
46  T0 a0;
47  T1 a1;
48};
49#endif