source: ThirdParty/CodePatterns/src/Patterns/unittests/stubs/CommonStub.cpp

Candidate_v1.6.1
Last change on this file was 41e8e2, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '084729c5923f0123e695fbe2548b393288c1f13d' as 'ThirdParty/CodePatterns'

  • Property mode set to 100644
File size: 967 bytes
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2010 University of Bonn. All rights reserved.
5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
6 */
7
8/*
9 * CommonStub.cpp
10 *
11 * Created on: Jan 4, 2011
12 * Author: heber
13 */
14
15// include config.h
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
20#include "CommonStub.hpp"
21
22namespace teststubs {
23 Iclass::~Iclass() {};
24
25 Aclass::Aclass() :
26 counter(0)
27 {};
28
29 Aclass::~Aclass() {};
30
31 void Aclass::count() {
32 ++counter;
33 }
34
35 int Aclass::getcount() const {
36 return counter;
37 };
38
39 void Aclass::setcount(int const _counter) {
40 counter = _counter;
41 };
42
43
44 Bclass::Bclass() :
45 counter(0.)
46 {};
47
48 Bclass::~Bclass() {};
49
50 void Bclass::count() {
51 counter+=1.;
52 }
53
54 int Bclass::getcount() const {
55 return (int)counter;
56 };
57
58 void Bclass::setcount(int const _counter) {
59 counter = (double)_counter;
60 };
61};
Note: See TracBrowser for help on using the repository browser.