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

Revision as of 23:39, 6 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="cpp" line start="1" enclose="div">/* Copyright(C) 1998 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. Perm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 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   : September 1, 1998.
11   author : Salih Yurttas.
12
13   T_A.cpp
14*/
15
16
17#include "T_A.h"
18
19template<class T0,class T1>
20T_A<T0,T1>::
21T_A(const T0 v0,
22    const T1 v1) : a0(v0),
23                   a1(v1) {
24}
25
26template<class T0,class T1>
27T_A<T0,T1>::
28T_A(const T_A<T0,T1>& a) : a0(a.a0),
29                           a1(a.a1) {
30}
31
32template<class T0,class T1>
33T_A<T0,T1>&
34T_A<T0,T1>::
35operator=(const T_A<T0,T1>& a) {
36  a0 = a.a0;
37  a1 = a.a1;
38  return *this;
39}
40
41template<class T0,class T1>
42T0
43T_A<T0,T1>::
44get_a0() const {
45  return a0;
46}
47
48template<class T0,class T1>
49T1
50T_A<T0,T1>::
51get_a1() const {
52  return a1;
53}
54
55template<class T0,class T1>
56void
57T_A<T0,T1>::
58set_a0(const T0 v) {
59  a0 = v;
60}
61
62template<class T0,class T1>
63void
64T_A<T0,T1>::
65set_a1(const T1 v) {
66  a1 = v;
67}
68
69template<class T0,class T1>
70ostream&
71operator<<(ostream& os,
72           const T_A<T0,T1>& a) {
73  os << a.a0 << endl;
74  os << a.a1 << endl;
75  os << endl;
76
77  return os;
78}