diff --git a/src/ltlast/atomic_prop.hh b/src/ltlast/atomic_prop.hh index 6262f2245..c7714e8a5 100644 --- a/src/ltlast/atomic_prop.hh +++ b/src/ltlast/atomic_prop.hh @@ -38,7 +38,7 @@ namespace spot /// \ingroup ltl_ast /// \brief Atomic propositions. - class SPOT_API atomic_prop : public formula + class SPOT_API atomic_prop final : public formula { public: /// Build an atomic proposition with name \a name in @@ -46,7 +46,7 @@ namespace spot static const atomic_prop* instance(const std::string& name, environment& env); - virtual void accept(visitor& visitor) const; + virtual void accept(visitor& visitor) const override; /// Get the name of the atomic proposition. const std::string& name() const @@ -61,7 +61,7 @@ namespace spot } /// Return a canonic representation of the atomic proposition - virtual std::string dump() const; + virtual std::string dump() const override; /// Number of instantiated atomic propositions. For debugging. static unsigned instance_count(); diff --git a/src/ltlast/binop.hh b/src/ltlast/binop.hh index ccecef3ab..4fbd74aa7 100644 --- a/src/ltlast/binop.hh +++ b/src/ltlast/binop.hh @@ -40,7 +40,7 @@ namespace spot /// \ingroup ltl_ast /// \brief Binary operator. - class SPOT_API binop : public formula + class SPOT_API binop final: public formula { public: /// Different kinds of binary opertaors @@ -110,7 +110,7 @@ namespace spot const formula* first, const formula* second); - virtual void accept(visitor& v) const; + virtual void accept(visitor& v) const override; /// Get the first operand. const formula* first() const @@ -134,7 +134,7 @@ namespace spot const char* op_name() const; /// Return a canonic representation of the atomic proposition - virtual std::string dump() const; + virtual std::string dump() const override; /// Number of instantiated binary operators. For debugging. static unsigned instance_count(); diff --git a/src/ltlast/bunop.hh b/src/ltlast/bunop.hh index d3b157c1b..30205d500 100644 --- a/src/ltlast/bunop.hh +++ b/src/ltlast/bunop.hh @@ -35,7 +35,7 @@ namespace spot /// \ingroup ltl_ast /// \brief Bounded unary operator. - class SPOT_API bunop : public formula + class SPOT_API bunop final : public formula { public: enum type { Star }; @@ -85,7 +85,7 @@ namespace spot unsigned min = 0, unsigned max = unbounded); - virtual void accept(visitor& v) const; + virtual void accept(visitor& v) const override; /// Get the sole operand of this operator. const formula* child() const @@ -120,7 +120,7 @@ namespace spot const char* op_name() const; /// Return a canonic representation of operation. - virtual std::string dump() const; + virtual std::string dump() const override; /// Number of instantiated unary operators. For debugging. static unsigned instance_count(); diff --git a/src/ltlast/constant.hh b/src/ltlast/constant.hh index 96d018c70..4081fd7f5 100644 --- a/src/ltlast/constant.hh +++ b/src/ltlast/constant.hh @@ -32,11 +32,11 @@ namespace spot /// \ingroup ltl_ast /// \brief A constant (True or False) - class SPOT_API constant : public formula + class SPOT_API constant final : public formula { public: enum type { False, True, EmptyWord }; - virtual void accept(visitor& v) const; + virtual void accept(visitor& v) const override; /// Return the value of the constant. type val() const @@ -47,7 +47,7 @@ namespace spot /// Return the value of the constant as a string. const char* val_name() const; - virtual std::string dump() const; + virtual std::string dump() const override; /// Get the sole instance of spot::ltl::constant::constant(True). static constant* true_instance() { return &true_instance_; } diff --git a/src/ltlast/unop.hh b/src/ltlast/unop.hh index 6b56966d3..d8b51a918 100644 --- a/src/ltlast/unop.hh +++ b/src/ltlast/unop.hh @@ -36,7 +36,7 @@ namespace spot /// \ingroup ltl_ast /// \brief Unary operators. - class SPOT_API unop : public formula + class SPOT_API unop final : public formula { public: enum type { @@ -87,7 +87,7 @@ namespace spot /// handle this one as well. static const formula* instance(type op, const formula* child); - virtual void accept(visitor& v) const; + virtual void accept(visitor& v) const override; /// Get the sole operand of this operator. const formula* child() const @@ -105,7 +105,7 @@ namespace spot const char* op_name() const; /// Return a canonic representation of the atomic proposition - virtual std::string dump() const; + virtual std::string dump() const override; /// Number of instantiated unary operators. For debugging. static unsigned instance_count(); diff --git a/src/misc/common.hh b/src/misc/common.hh index 08b336cb3..76c2a1b98 100644 --- a/src/misc/common.hh +++ b/src/misc/common.hh @@ -78,8 +78,11 @@ // Swig 2.0 does not understand '= delete'. This already // works with the development version of Swig 3. +// Swig 3.0.2 still does not understand 'final' when used +// at class definition. #ifdef SWIG #define SPOT_DELETED + #define final #else #define SPOT_DELETED = delete #endif