Ignore:
Timestamp:
Mar 11, 2010, 3:17:29 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
1e0785
Parents:
e9f2e1
Message:

Small improvements to singleton pattern

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/unittests/SingletonTest.cpp

    re9f2e1 r97f035  
    2929    count1++;
    3030  }
     31  // explicit copy constructor to catch if this is ever called
     32  SingletonStub1(const SingletonStub1&){
     33    CPPUNIT_FAIL    ( "Copy constructor of Singleton called" );
     34  }
    3135  virtual ~SingletonStub1(){
    3236    count2++;
     
    4751  SingletonStub2(){
    4852    count1++;
     53  }
     54  // explicit copy constructor to catch if thsi is ever called
     55  SingletonStub2(const SingletonStub2&){
     56    CPPUNIT_FAIL    ( "Copy constructor of Singleton called" );
    4957  }
    5058  virtual ~SingletonStub2(){
Note: See TracChangeset for help on using the changeset viewer.