c++11: work around Swig 2.0

* src/misc/common.hh: Conditionally define SPOT_DELETED to = delete.
* src/ltlvisit/simplify.hh, src/ta/taexplicit.hh, src/ta/taproduct.hh,
src/tgba/bdddict.hh, src/tgba/taatgba.hh, src/tgba/tgbabddconcrete.hh,
src/tgba/tgbaexplicit.hh, src/tgba/tgbaproduct.hh, src/tgba/tgbasgba.hh,
src/tgba/tgbatba.hh, src/tgba/tgbaunion.hh, src/tgba/wdbacomp.cc: Use
SPOT_DELETED.
* wrap/python/spot.i: Include common.hh.
* wrap/python/Makefile.am: Remove useless definition of SPOT_API
and BUDDY_API.
This commit is contained in:
Alexandre Duret-Lutz 2013-12-16 11:57:31 +01:00
parent 9cfc9f0f3f
commit c88e22d0ba
15 changed files with 39 additions and 30 deletions

View file

@ -175,8 +175,8 @@ namespace spot
private: private:
ltl_simplifier_cache* cache_; ltl_simplifier_cache* cache_;
// Copy disallowed. // Copy disallowed.
ltl_simplifier(const ltl_simplifier&) = delete; ltl_simplifier(const ltl_simplifier&) SPOT_DELETED;
void operator=(const ltl_simplifier&) = delete; void operator=(const ltl_simplifier&) SPOT_DELETED;
bool owndict; bool owndict;
}; };

View file

@ -64,4 +64,13 @@
#endif #endif
#define SPOT_API_VAR extern SPOT_API #define SPOT_API_VAR extern SPOT_API
// Swig 2.0 does not understand '= delete'. This already
// works with the development version of Swig 3.
#ifdef SWIG
#define SPOT_DELETED
#else
#define SPOT_DELETED = delete
#endif
#endif // SPOT_MISC_COMMON_HH #endif // SPOT_MISC_COMMON_HH

View file

@ -132,8 +132,8 @@ namespace spot
private: private:
// Disallow copy. // Disallow copy.
ta_explicit(const ta_explicit& other) = delete; ta_explicit(const ta_explicit& other) SPOT_DELETED;
ta_explicit& operator=(const ta_explicit& other) = delete; ta_explicit& operator=(const ta_explicit& other) SPOT_DELETED;
const tgba* tgba_; const tgba* tgba_;
bdd all_acceptance_conditions_; bdd all_acceptance_conditions_;

View file

@ -202,8 +202,8 @@ namespace spot
const kripke* kripke_; const kripke* kripke_;
// Disallow copy. // Disallow copy.
ta_product(const ta_product&) = delete; ta_product(const ta_product&) SPOT_DELETED;
ta_product& operator=(const ta_product&) = delete; ta_product& operator=(const ta_product&) SPOT_DELETED;
}; };

View file

@ -239,8 +239,8 @@ namespace spot
private: private:
// Disallow copy. // Disallow copy.
bdd_dict(const bdd_dict& other) = delete; bdd_dict(const bdd_dict& other) SPOT_DELETED;
bdd_dict& operator=(const bdd_dict& other) = delete; bdd_dict& operator=(const bdd_dict& other) SPOT_DELETED;
}; };

View file

@ -78,8 +78,8 @@ namespace spot
private: private:
// Disallow copy. // Disallow copy.
taa_tgba(const taa_tgba& other) = delete; taa_tgba(const taa_tgba& other) SPOT_DELETED;
taa_tgba& operator=(const taa_tgba& other) = delete; taa_tgba& operator=(const taa_tgba& other) SPOT_DELETED;
}; };
/// Set of states deriving from spot::state. /// Set of states deriving from spot::state.

View file

@ -91,8 +91,8 @@ namespace spot
bdd init_; ///< Initial state. bdd init_; ///< Initial state.
private: private:
// Disallow copy. // Disallow copy.
tgba_bdd_concrete(const tgba_bdd_concrete&) = delete; tgba_bdd_concrete(const tgba_bdd_concrete&) SPOT_DELETED;
tgba_bdd_concrete& operator=(const tgba_bdd_concrete&) = delete; tgba_bdd_concrete& operator=(const tgba_bdd_concrete&) SPOT_DELETED;
}; };
} }

View file

@ -709,8 +709,8 @@ namespace spot
private: private:
// Disallow copy. // Disallow copy.
tgba_explicit(const tgba_explicit<State>& other) = delete; tgba_explicit(const tgba_explicit<State>& other) SPOT_DELETED;
tgba_explicit& operator=(const tgba_explicit& other) = delete; tgba_explicit& operator=(const tgba_explicit& other) SPOT_DELETED;
}; };
template <typename State> template <typename State>
@ -739,8 +739,8 @@ namespace spot
private: private:
// Disallow copy. // Disallow copy.
sba_explicit(const sba_explicit<State>& other) = delete; sba_explicit(const sba_explicit<State>& other) SPOT_DELETED;
sba_explicit& operator=(const sba_explicit& other) = delete; sba_explicit& operator=(const sba_explicit& other) SPOT_DELETED;
}; };

View file

@ -126,8 +126,8 @@ namespace spot
private: private:
// Disallow copy. // Disallow copy.
tgba_product(const tgba_product&) = delete; tgba_product(const tgba_product&) SPOT_DELETED;
tgba_product& operator=(const tgba_product&) = delete; tgba_product& operator=(const tgba_product&) SPOT_DELETED;
}; };
/// \brief A lazy product with different initial states. /// \brief A lazy product with different initial states.

View file

@ -66,8 +66,8 @@ namespace spot
bool emulate_acc_cond_; bool emulate_acc_cond_;
bdd acceptance_condition_; bdd acceptance_condition_;
// Disallow copy. // Disallow copy.
tgba_sgba_proxy(const tgba_sgba_proxy&) = delete; tgba_sgba_proxy(const tgba_sgba_proxy&) SPOT_DELETED;
tgba_sgba_proxy& operator=(const tgba_sgba_proxy&) = delete; tgba_sgba_proxy& operator=(const tgba_sgba_proxy&) SPOT_DELETED;
}; };
} }

View file

@ -120,8 +120,8 @@ namespace spot
mutable void* uniq_map_; mutable void* uniq_map_;
// Disallow copy. // Disallow copy.
tgba_tba_proxy(const tgba_tba_proxy&) = delete; tgba_tba_proxy(const tgba_tba_proxy&) SPOT_DELETED;
tgba_tba_proxy& operator=(const tgba_tba_proxy&) = delete; tgba_tba_proxy& operator=(const tgba_tba_proxy&) SPOT_DELETED;
}; };
/// \ingroup tgba_on_the_fly_algorithms /// \ingroup tgba_on_the_fly_algorithms

View file

@ -151,8 +151,8 @@ namespace spot
bdd all_acceptance_conditions_; bdd all_acceptance_conditions_;
bdd neg_acceptance_conditions_; bdd neg_acceptance_conditions_;
// Disallow copy. // Disallow copy.
tgba_union(const tgba_union&) = delete; tgba_union(const tgba_union&) SPOT_DELETED;
tgba_union& operator=(const tgba_union&) = delete; tgba_union& operator=(const tgba_union&) SPOT_DELETED;
}; };

View file

@ -271,8 +271,8 @@ namespace spot
bdd the_acceptance_cond_; bdd the_acceptance_cond_;
// Disallow copy. // Disallow copy.
tgba_wdba_comp_proxy(const tgba_wdba_comp_proxy&) = delete; tgba_wdba_comp_proxy(const tgba_wdba_comp_proxy&) SPOT_DELETED;
tgba_wdba_comp_proxy& operator=(const tgba_wdba_comp_proxy&) = delete; tgba_wdba_comp_proxy& operator=(const tgba_wdba_comp_proxy&) SPOT_DELETED;
}; };
} }

View file

@ -40,8 +40,7 @@ _spot_la_LDFLAGS = -avoid-version -module
_spot_la_LIBADD = $(top_builddir)/src/libspot.la _spot_la_LIBADD = $(top_builddir)/src/libspot.la
$(srcdir)/spot_wrap.cxx: $(srcdir)/spot.i $(srcdir)/spot_wrap.cxx: $(srcdir)/spot.i
$(SWIG) -c++ -python -DSPOT_API= -I$(srcdir) \ $(SWIG) -c++ -python -I$(srcdir) -I$(top_srcdir)/src $(srcdir)/spot.i
-I$(top_srcdir)/src $(srcdir)/spot.i
$(srcdir)/spot.py: $(srcdir)/spot.i $(srcdir)/spot.py: $(srcdir)/spot.i
$(MAKE) $(AM_MAKEFLAGS) spot_wrap.cxx $(MAKE) $(AM_MAKEFLAGS) spot_wrap.cxx
@ -53,7 +52,7 @@ _buddy_la_SOURCES = $(srcdir)/buddy_wrap.cxx
_buddy_la_LDFLAGS = -avoid-version -module $(BUDDY_LDFLAGS) _buddy_la_LDFLAGS = -avoid-version -module $(BUDDY_LDFLAGS)
$(srcdir)/buddy_wrap.cxx: $(srcdir)/buddy.i $(srcdir)/buddy_wrap.cxx: $(srcdir)/buddy.i
$(SWIG) -c++ -python -DBUDDY_API= $(BUDDY_CPPFLAGS) $(srcdir)/buddy.i $(SWIG) -c++ -python $(BUDDY_CPPFLAGS) $(srcdir)/buddy.i
$(srcdir)/buddy.py: $(srcdir)/buddy.i $(srcdir)/buddy.py: $(srcdir)/buddy.i
$(MAKE) $(AM_MAKEFLAGS) buddy_wrap.cxx $(MAKE) $(AM_MAKEFLAGS) buddy_wrap.cxx

View file

@ -155,6 +155,7 @@ using namespace spot;
%rename(FalseVal) False; %rename(FalseVal) False;
%rename(TrueVal) True; %rename(TrueVal) True;
%include "misc/common.hh"
%include "misc/version.hh" %include "misc/version.hh"
%include "misc/minato.hh" %include "misc/minato.hh"
%include "misc/optionmap.hh" %include "misc/optionmap.hh"