* m4/gspnlib.m4: New file.

* configure.ac: Call AX_CHECK_GSPNLIB.
* Makefile.am (EXTRA_DIST): Add m4/gspnlib.m4.
* iface/gspn/Makefile.am (AM_CPPFLAGS): Add $(LIBGSPN_CPPFLAGS).
(libspotgspn_la_LIBADD, check_PROGRAMS, dottygspn_SOURCES,
dottygspn_LDADD): New variables.
* iface/gspn/gspn.hh (gspn_interface): New class.
(gspn_exeption): Take a string argument and adjust all callers.
(operator<<): Define for gspn_exeption.
* iface/gspn/gspn.cc (gspn_interface::gspn_interface,
gspn_interface::~gspn_interface): New.
* iface/gspn/gspnlib.h: Delete, it belongs to GSPN.
* iface/gspn/dottygspn.cc: New file.
This commit is contained in:
Alexandre Duret-Lutz 2003-07-16 12:56:38 +00:00
parent 49fd9579da
commit 4ac192ac1e
9 changed files with 137 additions and 120 deletions

View file

@ -4,6 +4,7 @@
// Try not to include gspnlib.h here, or it will polute the user's
// namespace with internal C symbols.
# include <iostream>
# include <string>
# include "tgba/tgba.hh"
# include "ltlast/atomic_prop.hh"
@ -12,24 +13,46 @@
namespace spot
{
class gspn_interface
{
public:
gspn_interface(int argc, char **argv);
~gspn_interface();
tgba* get_automata();
};
/// An exeption used to forward GSPN errors.
class gspn_exeption
{
public:
gspn_exeption(int err)
: err(err)
gspn_exeption(const std::string& where, int err)
: err_(err), where_(where)
{
}
int
get_err() const
{
return err;
return err_;
}
std::string
get_where() const
{
return where_;
}
private:
int err;
int err_;
std::string where_;
};
std::ostream& operator<<(std::ostream& os, const gspn_exeption& e)
{
os << e.get_where() << " exited with " << e.get_err();
return os;
}
class gspn_environment : public ltl::environment
{