* src/ltlvisit/clone.hh, src/ltlvisit/clone.cc: New files.
* src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them. * src/ltlvisit/lunabbrev.hh, src/ltlvisit/lunabbrev.cc: Inherit from clone_visitor and remove all useless methods (now inherited).
This commit is contained in:
parent
0c7a2412a4
commit
ae7fdeba59
6 changed files with 125 additions and 50 deletions
37
src/ltlvisit/clone.hh
Normal file
37
src/ltlvisit/clone.hh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#ifndef SPOT_LTLVISIT_CLONE_HH
|
||||
# define SPOT_LTLVISIT_CLONE_HH
|
||||
|
||||
#include "ltlast/formula.hh"
|
||||
#include "ltlast/visitor.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
namespace ltl
|
||||
{
|
||||
// This visitor is public, because it's convenient
|
||||
// to derive from it and override part of its methods.
|
||||
class clone_visitor : public const_visitor
|
||||
{
|
||||
public:
|
||||
clone_visitor();
|
||||
virtual ~clone_visitor();
|
||||
|
||||
formula* result() const;
|
||||
|
||||
void visit(const atomic_prop* ap);
|
||||
void visit(const unop* uo);
|
||||
void visit(const binop* bo);
|
||||
void visit(const multop* mo);
|
||||
void visit(const constant* c);
|
||||
|
||||
virtual formula* recurse(const formula* f);
|
||||
|
||||
protected:
|
||||
formula* result_;
|
||||
};
|
||||
|
||||
formula* clone(const formula* f);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SPOT_LTLVISIT_LUNABBREV_HH
|
||||
Loading…
Add table
Add a link
Reference in a new issue