ltlast: move all accessor methods to headers to help the optimizer

* src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh,
src/ltlast/automatop.cc, src/ltlast/automatop.hh, src/ltlast/binop.cc,
src/ltlast/binop.hh, src/ltlast/bunop.cc, src/ltlast/bunop.hh,
src/ltlast/constant.cc, src/ltlast/constant.hh, src/ltlast/multop.cc,
src/ltlast/multop.hh, src/ltlast/unop.cc, src/ltlast/unop.hh: Move all
one-line accessors methods like nth(), child(), op()... from *.cc files
to their respective *.hh files.
This commit is contained in:
Alexandre Duret-Lutz 2014-02-12 10:39:38 +01:00
parent 9020ac8bef
commit 2c05a9fdb6
14 changed files with 119 additions and 163 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2012, 2013 Laboratoire de Recherche et
// Copyright (C) 2008, 2009, 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE)
//
// This file is part of Spot, a model checking library.
@ -52,18 +52,31 @@ namespace spot
virtual void accept(visitor& v) const;
/// Get the number of argument.
unsigned size() const;
/// Get the number of arguments.
unsigned size() const
{
return children_->size();
}
/// \brief Get the nth argument.
///
/// Starting with \a n = 0.
const formula* nth(unsigned n) const;
const formula* nth(unsigned n) const
{
return (*children_)[n];
}
/// Get the NFA of this operator.
const spot::ltl::nfa::ptr get_nfa() const;
const spot::ltl::nfa::ptr get_nfa() const
{
return nfa_;
}
/// Whether the automaton is negated.
bool is_negated() const;
bool is_negated() const
{
return negated_;
}
/// Return a canonic representation of the atomic proposition
std::string dump() const;