Yurttas/PL/OOL/Cplusplus/F/05/03/00/A.h

From ZCubes Wiki
Revision as of 22:43, 6 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="cpp" line start="1" enclose="div">/* Copyright(C) 2007 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. Perm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 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   A.h
14*/
15
16
17#ifndef A_H
18#define A_H
19
20#include <iostream>
21
22using namespace std;
23
24template <class T1,
25          class T2,
26          class T3>
27class A {
28public:
29  A(const T1 i=0,
30    const T2 j=0,
31    const T3 k=0);
32
33  T1 get_a() const;
34  T2 get_b() const;
35  T3 get_c() const;
36
37  T1* get_abc() const;
38
39  void set_a(const T1);
40  void set_b(const T2);
41  void set_c(const T3);
42  void set_abc(const T1);
43  void set_abc(const T1,
44               const T2,
45               const T3);
46
47  template<class U,            // this syntax changed several times
48           class V,
49           class W>
50  friend ostream& operator<<(ostream&,
51                             const A<U,V,W>&);
52
53private:
54  T1 a;
55  T2 b;
56  T3 c;
57};
58#endif