X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fprops%2Fcondition.hxx;h=c70e86d74d77ea356f041fb2b430df61d379d0ac;hb=2e93b06ac0874f1cee1e22dc30777a0066ef289b;hp=01ad8faa4d7f2f4c321a41c31fdba9a81049adc2;hpb=2e078aff7d3c926d8e7fa13ccc180fc5497dd0d5;p=simgear.git diff --git a/simgear/props/condition.hxx b/simgear/props/condition.hxx index 01ad8faa..c70e86d7 100644 --- a/simgear/props/condition.hxx +++ b/simgear/props/condition.hxx @@ -13,6 +13,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////// @@ -28,7 +29,7 @@ * * This class should migrate to somewhere more general. */ -class SGCondition +class SGCondition : public SGReferenced { public: SGCondition (); @@ -63,12 +64,11 @@ private: class SGNotCondition : public SGCondition { public: - // transfer pointer ownership SGNotCondition (SGCondition * condition); virtual ~SGNotCondition (); virtual bool test () const; private: - SGCondition * _condition; + SGSharedPtr _condition; }; @@ -87,7 +87,7 @@ public: // transfer pointer ownership virtual void addCondition (SGCondition * condition); private: - vector _conditions; + std::vector > _conditions; }; @@ -106,7 +106,7 @@ public: // transfer pointer ownership virtual void addCondition (SGCondition * condition); private: - vector _conditions; + std::vector > _conditions; }; @@ -146,7 +146,7 @@ private: * invoke the test() method whenever it needs to decide whether to * active itself, draw itself, and so on. */ -class SGConditional +class SGConditional : public SGReferenced { public: SGConditional (); @@ -156,7 +156,7 @@ public: virtual const SGCondition * getCondition () const { return _condition; } virtual bool test () const; private: - SGCondition * _condition; + SGSharedPtr _condition; };