X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fnegation.h;h=ce2f7873d6aed3eeff7304e67abe7598b5c274c7;hb=34273ebb7de0a2150061c4e2bfa764e11ce740f7;hp=c01763d1c8eed6fa399090c27210e51c54553a20;hpb=7353dc087872cdb93bd57cbaf2b6f0dcc21f9a03;p=libs%2Fmath.git diff --git a/source/geometry/negation.h b/source/geometry/negation.h index c01763d..ce2f787 100644 --- a/source/geometry/negation.h +++ b/source/geometry/negation.h @@ -18,6 +18,9 @@ private: public: Negation(const Shape &); + Negation(const Negation &); + Negation &operator=(const Negation &); + ~Negation(); virtual Negation *clone() const; @@ -34,6 +37,25 @@ inline Negation::Negation(const Shape &s): shape(s.clone()) { } +template +inline Negation::Negation(const Negation &other): + shape(other.shape->clone()) +{ } + +template +inline Negation &Negation::operator=(const Negation &other) +{ + delete shape; + shape = other.shape->clone(); + return *this; +} + +template +inline Negation::~Negation() +{ + delete shape; +} + template inline Negation *Negation::clone() const {