"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/testclone.cpp" between
muscle8.20.zip and muscle8.30.zip

About: MUSCLE (Multi User Server Client Linking Environment) is a messaging server and networking API. The included server program ("muscled") lets its clients message each other, and/or store information in its serverside hierarchical database.

testclone.cpp  (muscle8.20):testclone.cpp  (muscle8.30)
skipping to change at line 14 skipping to change at line 14
#include "system/SetupSystem.h" #include "system/SetupSystem.h"
#include "util/Cloneable.h" #include "util/Cloneable.h"
#include "util/String.h" #include "util/String.h"
using namespace muscle; using namespace muscle;
class TestCloneable : public Cloneable class TestCloneable : public Cloneable
{ {
public: public:
TestCloneable(const String & title) : _title(title) {/* empty */} explicit TestCloneable(const String & title) : _title(title) {/* empty */}
TestCloneable(const TestCloneable & rhs) : _title(rhs._title) {/* empty */} TestCloneable(const TestCloneable & rhs) : _title(rhs._title) {/* empty */}
virtual String GetTitle() const {return _title;} virtual String GetTitle() const {return _title;}
DECLARE_STANDARD_CLONE_METHOD(TestCloneable); DECLARE_STANDARD_CLONE_METHOD(TestCloneable);
private: private:
String _title; String _title;
}; };
class SubclassOfTestCloneable : public TestCloneable class SubclassOfTestCloneable : public TestCloneable
{ {
public: public:
SubclassOfTestCloneable(const String & title) : TestCloneable(title) {/* empt explicit SubclassOfTestCloneable(const String & title) : TestCloneable(title)
y */} {/* empty */}
SubclassOfTestCloneable(const TestCloneable & rhs) : TestCloneable(rhs) {/* e explicit SubclassOfTestCloneable(const TestCloneable & rhs) : TestCloneable(r
mpty */} hs) {/* empty */}
virtual String GetTitle() const {return TestCloneable::GetTitle().Prepend("Su bclassOf");} virtual String GetTitle() const {return TestCloneable::GetTitle().Prepend("Su bclassOf");}
DECLARE_STANDARD_CLONE_METHOD(SubclassOfTestCloneable); DECLARE_STANDARD_CLONE_METHOD(SubclassOfTestCloneable);
}; };
class BrokenSubclassOfTestCloneable : public TestCloneable class BrokenSubclassOfTestCloneable : public TestCloneable
{ {
public: public:
BrokenSubclassOfTestCloneable(const String & title) : TestCloneable(title) {/ explicit BrokenSubclassOfTestCloneable(const String & title) : TestCloneable(
* empty */} title) {/* empty */}
BrokenSubclassOfTestCloneable(const TestCloneable & rhs) : TestCloneable(rhs) explicit BrokenSubclassOfTestCloneable(const TestCloneable & rhs) : TestClone
{/* empty */} able(rhs) {/* empty */}
virtual String GetTitle() const {return TestCloneable::GetTitle().Prepend("Br okenSubclassOf");} virtual String GetTitle() const {return TestCloneable::GetTitle().Prepend("Br okenSubclassOf");}
//Deliberately commented out, since I want to test to make sure this error ge ts caught at runtime //Deliberately commented out, since I want to test to make sure this error ge ts caught at runtime
//DECLARE_STANDARD_CLONE_METHOD(SubclassOfTestCloneable); //DECLARE_STANDARD_CLONE_METHOD(SubclassOfTestCloneable);
}; };
// This function is here just to ensure things are done polymorphically // This function is here just to ensure things are done polymorphically
TestCloneable * CloneTester(const TestCloneable * c) TestCloneable * CloneTester(const TestCloneable * c)
{ {
 End of changes. 3 change blocks. 
9 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)