From 81c84a38992ce8e38106d86ce85ac3e88ed91a31 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 7 Jul 2009 04:23:05 +0000 Subject: Add shallow copy semantics to Camera's, Object's, and Scene's. --- libdimensionxx/dimensionxx/objects.hpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'libdimensionxx/dimensionxx/objects.hpp') diff --git a/libdimensionxx/dimensionxx/objects.hpp b/libdimensionxx/dimensionxx/objects.hpp index 89aab14..5b43dc4 100644 --- a/libdimensionxx/dimensionxx/objects.hpp +++ b/libdimensionxx/dimensionxx/objects.hpp @@ -30,7 +30,14 @@ namespace Dimension { public: Sphere(); - virtual ~Sphere(); + ~Sphere(); + + Object* copy() const; + + private: + // Copying prohibited, but used internally + Sphere(const Sphere& sphere); + Sphere& operator=(const Sphere&); }; // A cube @@ -38,7 +45,14 @@ namespace Dimension { public: Cube(); - virtual ~Cube(); + ~Cube(); + + Object* copy() const; + + private: + // Copying prohibited, but used internally + Cube(const Cube& cube); + Cube& operator=(const Cube&); }; } -- cgit v1.2.3