ltl: use "final" and "override" in the AST classes
* src/ltlast/atomic_prop.hh, src/ltlast/binop.hh, src/ltlast/bunop.hh, src/ltlast/constant.hh, src/ltlast/unop.hh: Here. * src/misc/common.hh: Disable final for swig3.0.
This commit is contained in:
parent
6f572ebcc8
commit
63da386a66
6 changed files with 18 additions and 15 deletions
|
|
@ -38,7 +38,7 @@ namespace spot
|
||||||
|
|
||||||
/// \ingroup ltl_ast
|
/// \ingroup ltl_ast
|
||||||
/// \brief Atomic propositions.
|
/// \brief Atomic propositions.
|
||||||
class SPOT_API atomic_prop : public formula
|
class SPOT_API atomic_prop final : public formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Build an atomic proposition with name \a name in
|
/// Build an atomic proposition with name \a name in
|
||||||
|
|
@ -46,7 +46,7 @@ namespace spot
|
||||||
static const atomic_prop*
|
static const atomic_prop*
|
||||||
instance(const std::string& name, environment& env);
|
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.
|
/// Get the name of the atomic proposition.
|
||||||
const std::string& name() const
|
const std::string& name() const
|
||||||
|
|
@ -61,7 +61,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a canonic representation of the atomic proposition
|
/// 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.
|
/// Number of instantiated atomic propositions. For debugging.
|
||||||
static unsigned instance_count();
|
static unsigned instance_count();
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace spot
|
||||||
|
|
||||||
/// \ingroup ltl_ast
|
/// \ingroup ltl_ast
|
||||||
/// \brief Binary operator.
|
/// \brief Binary operator.
|
||||||
class SPOT_API binop : public formula
|
class SPOT_API binop final: public formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Different kinds of binary opertaors
|
/// Different kinds of binary opertaors
|
||||||
|
|
@ -110,7 +110,7 @@ namespace spot
|
||||||
const formula* first,
|
const formula* first,
|
||||||
const formula* second);
|
const formula* second);
|
||||||
|
|
||||||
virtual void accept(visitor& v) const;
|
virtual void accept(visitor& v) const override;
|
||||||
|
|
||||||
/// Get the first operand.
|
/// Get the first operand.
|
||||||
const formula* first() const
|
const formula* first() const
|
||||||
|
|
@ -134,7 +134,7 @@ namespace spot
|
||||||
const char* op_name() const;
|
const char* op_name() const;
|
||||||
|
|
||||||
/// Return a canonic representation of the atomic proposition
|
/// 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.
|
/// Number of instantiated binary operators. For debugging.
|
||||||
static unsigned instance_count();
|
static unsigned instance_count();
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ namespace spot
|
||||||
|
|
||||||
/// \ingroup ltl_ast
|
/// \ingroup ltl_ast
|
||||||
/// \brief Bounded unary operator.
|
/// \brief Bounded unary operator.
|
||||||
class SPOT_API bunop : public formula
|
class SPOT_API bunop final : public formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum type { Star };
|
enum type { Star };
|
||||||
|
|
@ -85,7 +85,7 @@ namespace spot
|
||||||
unsigned min = 0,
|
unsigned min = 0,
|
||||||
unsigned max = unbounded);
|
unsigned max = unbounded);
|
||||||
|
|
||||||
virtual void accept(visitor& v) const;
|
virtual void accept(visitor& v) const override;
|
||||||
|
|
||||||
/// Get the sole operand of this operator.
|
/// Get the sole operand of this operator.
|
||||||
const formula* child() const
|
const formula* child() const
|
||||||
|
|
@ -120,7 +120,7 @@ namespace spot
|
||||||
const char* op_name() const;
|
const char* op_name() const;
|
||||||
|
|
||||||
/// Return a canonic representation of operation.
|
/// Return a canonic representation of operation.
|
||||||
virtual std::string dump() const;
|
virtual std::string dump() const override;
|
||||||
|
|
||||||
/// Number of instantiated unary operators. For debugging.
|
/// Number of instantiated unary operators. For debugging.
|
||||||
static unsigned instance_count();
|
static unsigned instance_count();
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ namespace spot
|
||||||
|
|
||||||
/// \ingroup ltl_ast
|
/// \ingroup ltl_ast
|
||||||
/// \brief A constant (True or False)
|
/// \brief A constant (True or False)
|
||||||
class SPOT_API constant : public formula
|
class SPOT_API constant final : public formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum type { False, True, EmptyWord };
|
enum type { False, True, EmptyWord };
|
||||||
virtual void accept(visitor& v) const;
|
virtual void accept(visitor& v) const override;
|
||||||
|
|
||||||
/// Return the value of the constant.
|
/// Return the value of the constant.
|
||||||
type val() const
|
type val() const
|
||||||
|
|
@ -47,7 +47,7 @@ namespace spot
|
||||||
/// Return the value of the constant as a string.
|
/// Return the value of the constant as a string.
|
||||||
const char* val_name() const;
|
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).
|
/// Get the sole instance of spot::ltl::constant::constant(True).
|
||||||
static constant* true_instance() { return &true_instance_; }
|
static constant* true_instance() { return &true_instance_; }
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ namespace spot
|
||||||
|
|
||||||
/// \ingroup ltl_ast
|
/// \ingroup ltl_ast
|
||||||
/// \brief Unary operators.
|
/// \brief Unary operators.
|
||||||
class SPOT_API unop : public formula
|
class SPOT_API unop final : public formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum type {
|
enum type {
|
||||||
|
|
@ -87,7 +87,7 @@ namespace spot
|
||||||
/// handle this one as well.
|
/// handle this one as well.
|
||||||
static const formula* instance(type op, const formula* child);
|
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.
|
/// Get the sole operand of this operator.
|
||||||
const formula* child() const
|
const formula* child() const
|
||||||
|
|
@ -105,7 +105,7 @@ namespace spot
|
||||||
const char* op_name() const;
|
const char* op_name() const;
|
||||||
|
|
||||||
/// Return a canonic representation of the atomic proposition
|
/// 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.
|
/// Number of instantiated unary operators. For debugging.
|
||||||
static unsigned instance_count();
|
static unsigned instance_count();
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,11 @@
|
||||||
|
|
||||||
// Swig 2.0 does not understand '= delete'. This already
|
// Swig 2.0 does not understand '= delete'. This already
|
||||||
// works with the development version of Swig 3.
|
// works with the development version of Swig 3.
|
||||||
|
// Swig 3.0.2 still does not understand 'final' when used
|
||||||
|
// at class definition.
|
||||||
#ifdef SWIG
|
#ifdef SWIG
|
||||||
#define SPOT_DELETED
|
#define SPOT_DELETED
|
||||||
|
#define final
|
||||||
#else
|
#else
|
||||||
#define SPOT_DELETED = delete
|
#define SPOT_DELETED = delete
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue