Yurttas/PL/OOL/Cplusplus/F/05/03/00/t 00.cpp

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2   Copyright(C) 2002
 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, 2002.
11   author : Salih Yurttas.
12
13   t_00.cpp
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21#include "A.h"
22
23#include "out.cpp"
24
25template <class T1,
26          class T2,
27          class T3>
28void t_00(A<T1,T2,T3>& a,
29          T1 aa,
30          T2 ab,
31          T3 ac) {
32  out("a",
33      a);
34
35  a.set_a(aa);
36  a.set_b(ab);
37  a.set_c(ac);
38
39  cout << a.get_a() << endl;
40  cout << a.get_b() << endl;
41  cout << a.get_c() << endl;
42
43  cout << endl;
44
45  a.set_abc(aa);
46
47  out("a",
48      a);
49
50  a.set_abc(aa,ab,ac);
51
52  out("a",
53      a);
54
55  T1* t = a.get_abc();
56
57  for(int i=0; i<3; i++)
58    cout << t[i] << endl;
59
60  cout << endl;
61
62}