~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to test-suite/syntheticoperators.cc

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-05-04 11:15:49 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (20.3.1 squeeze) (21.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100504111549-1apjh2g5sndki4te
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
 
 * $Id: syntheticoperators.cc,v 1.1 2003/07/10 01:31:51 robertc Exp $
 
3
 * $Id$
4
4
 *
5
5
 * AUTHOR: Robert Collins
6
6
 *
20
20
 *  it under the terms of the GNU General Public License as published by
21
21
 *  the Free Software Foundation; either version 2 of the License, or
22
22
 *  (at your option) any later version.
23
 
 *  
 
23
 *
24
24
 *  This program is distributed in the hope that it will be useful,
25
25
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
26
26
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
27
 *  GNU General Public License for more details.
28
 
 *  
 
28
 *
29
29
 *  You should have received a copy of the GNU General Public License
30
30
 *  along with this program; if not, write to the Free Software
31
31
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
36
36
#include "squid.h"
37
37
#include "stmem.h"
38
38
#include "mem_node.h"
 
39
 
 
40
#if HAVE_IOSTREAM
39
41
#include <iostream>
 
42
#endif
40
43
 
41
 
class HasExplicit {
42
 
  public:
 
44
class HasExplicit
 
45
{
 
46
public:
43
47
    HasExplicit();
44
48
    ~HasExplicit();
45
49
    HasExplicit(HasExplicit const &);
47
51
    static int const &Instances();
48
52
    static int const &Assignments();
49
53
    static void Assignments(int const &);
50
 
  private:
 
54
private:
51
55
    static void AddInstance();
52
56
    static void RemoveInstance();
53
57
    static void Assignment();
58
62
int HasExplicit::Instances_(0);
59
63
int HasExplicit::Assignments_(0);
60
64
 
61
 
HasExplicit::HasExplicit() {
 
65
HasExplicit::HasExplicit()
 
66
{
62
67
    AddInstance();
63
68
}
64
69
 
65
 
HasExplicit::~HasExplicit() {
 
70
HasExplicit::~HasExplicit()
 
71
{
66
72
    RemoveInstance();
67
73
}
68
74
 
69
 
HasExplicit::HasExplicit(HasExplicit const &) {
 
75
HasExplicit::HasExplicit(HasExplicit const &)
 
76
{
70
77
    AddInstance();
71
78
}
72
79
 
73
80
HasExplicit &
74
 
HasExplicit::operator= (HasExplicit const &) {
 
81
HasExplicit::operator= (HasExplicit const &)
 
82
{
75
83
    Assignment();
76
84
    return *this;
77
85
}
138
146
    assert (HasExplicit::Assignments() == 0);
139
147
}
140
148
 
141
 
class SyntheticOwnsExplicit {
142
 
  public:
 
149
class SyntheticOwnsExplicit
 
150
{
 
151
public:
143
152
    HasExplicit aMember;
144
153
};
145
154