
* mln/trace/all.hh, * mln/trace/entering.hh, * mln/trace/essential.hh, * mln/trace/exiting.hh, * mln/trace/quiet.hh, * mln/trace/resume.hh, * mln/trace/stop.hh, * mln/trace/warning.hh: Remove. --- milena/ChangeLog | 13 +++++ milena/mln/trace/all.hh | 52 ------------------ milena/mln/trace/entering.hh | 89 ------------------------------- milena/mln/trace/essential.hh | 36 ------------ milena/mln/trace/exiting.hh | 118 ----------------------------------------- milena/mln/trace/quiet.hh | 84 ----------------------------- milena/mln/trace/resume.hh | 60 --------------------- milena/mln/trace/stop.hh | 63 ---------------------- milena/mln/trace/warning.hh | 64 ---------------------- 9 files changed, 13 insertions(+), 566 deletions(-) delete mode 100644 milena/mln/trace/all.hh delete mode 100644 milena/mln/trace/entering.hh delete mode 100644 milena/mln/trace/essential.hh delete mode 100644 milena/mln/trace/exiting.hh delete mode 100644 milena/mln/trace/quiet.hh delete mode 100644 milena/mln/trace/resume.hh delete mode 100644 milena/mln/trace/stop.hh delete mode 100644 milena/mln/trace/warning.hh diff --git a/milena/ChangeLog b/milena/ChangeLog index 6937e7c..ecc35ee 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,18 @@ 2013-03-18 Guillaume Lazzara <z@lrde.epita.fr> + Remove deprecated trace system. + + * mln/trace/all.hh, + * mln/trace/entering.hh, + * mln/trace/essential.hh, + * mln/trace/exiting.hh, + * mln/trace/quiet.hh, + * mln/trace/resume.hh, + * mln/trace/stop.hh, + * mln/trace/warning.hh: Remove. + +2013-03-18 Guillaume Lazzara <z@lrde.epita.fr> + * tests/unit_test/unit-tests.mk: Regen. 2013-03-18 Guillaume Lazzara <z@lrde.epita.fr> diff --git a/milena/mln/trace/all.hh b/milena/mln/trace/all.hh deleted file mode 100644 index 9d45262..0000000 --- a/milena/mln/trace/all.hh +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_ALL_HH -# define MLN_TRACE_ALL_HH - -/*! \file - * - * \brief File that includes all trace-related routines. - */ - - -namespace mln -{ - - /// Namespace of routines related to the trace mechanism. - namespace trace {} - -} // end of namespace mln - - -# include <mln/trace/quiet.hh> -# include <mln/trace/entering.hh> -# include <mln/trace/exiting.hh> -# include <mln/trace/stop.hh> -# include <mln/trace/resume.hh> -# include <mln/trace/warning.hh> - - -#endif // ! MLN_TRACE_ALL_HH diff --git a/milena/mln/trace/entering.hh b/milena/mln/trace/entering.hh deleted file mode 100644 index d901971..0000000 --- a/milena/mln/trace/entering.hh +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_ENTERING_HH -# define MLN_TRACE_ENTERING_HH - -/// \file -/// -/// Definition of the trace entering procedure. - -# include <string> -# include <iostream> -# include <stack> -# include <ctime> - -# include <mln/trace/quiet.hh> - - -namespace mln -{ - - namespace trace - { - - void entering(const std::string& scope); - - extern std::stack<std::clock_t> start_times; - extern std::stack<std::string> scopes; // For testing purpose - // (entering/exiting scope matching). - - -# ifndef MLN_INCLUDE_ONLY - -# ifndef MLN_WO_GLOBAL_VARS - - std::stack<std::clock_t> start_times; - std::stack<std::string> scopes; - -# endif // !MLN_WO_GLOBAL_VARS - - inline - void entering(const std::string& scope) - { - if (quiet) - return; - - start_times.push(std::clock()); - scopes.push(scope); - - if ((tab != 0) && (internal::max_tab == tab)) - std::cout << std::endl; - - for (unsigned i = 0; i < tab; ++i) - std::cout << " "; - std::cout << scope << " {"; - - internal::max_tab = ++tab; - } - -# endif // ! MLN_INCLUDE_ONLY - - } // end of namespace mln::trace - -} // end of namespace mln - - -#endif // ! MLN_TRACE_ENTERING_HH diff --git a/milena/mln/trace/essential.hh b/milena/mln/trace/essential.hh deleted file mode 100644 index f0f5686..0000000 --- a/milena/mln/trace/essential.hh +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_ESSENTIAL_HH -# define MLN_TRACE_ESSENTIAL_HH - -/*! \file - * - * \brief File that includes essential trace-related routines. - */ - -# include <mln/trace/all.hh> - -#endif // ! MLN_TRACE_ESSENTIAL_HH diff --git a/milena/mln/trace/exiting.hh b/milena/mln/trace/exiting.hh deleted file mode 100644 index 43c6962..0000000 --- a/milena/mln/trace/exiting.hh +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_EXITING_HH -# define MLN_TRACE_EXITING_HH - -/// \file -/// -/// Definition of the trace exiting procedure. - -# include <string> -# include <iostream> -# include <stack> - -# include <mln/core/contract.hh> -# include <mln/trace/quiet.hh> - -namespace mln -{ - - namespace trace - { - - void exiting(const std::string& scope); - - - extern std::stack<std::clock_t> start_times; - extern std::stack<std::string> scopes; // For testing purpose - // (entering/exiting scope matching). - -# ifndef MLN_INCLUDE_ONLY - - inline - void exiting(const std::string& scope) - { - if (quiet) - return; - - if (scopes.empty()) - { - std::cerr << "error: missing 'entering' scope (exiting is '" << scope << "')" << std::endl; - quiet = true; - } - else - { - if (scopes.top() != scope) - { - std::cerr << "error: bad matching scope (entering is '" << scopes.top() - << "' v. exiting is '" << scope << "')" << std::endl; - quiet = true; - } - scopes.pop(); - } - - bool has_inner_trace = (internal::max_tab == tab); - --tab; - - if (!has_inner_trace) - for (unsigned i = 0; i < tab; ++i) - std::cout << " "; - - std::cout << "} "; - - if (!has_inner_trace) - std::cout << scope << " "; - - mln_assertion(! start_times.empty()); - std::clock_t now = std::clock(); - - if (start_times.top() > now) - { - std::cerr << "warning: bad timer in trace handling" << std::endl; - // FIXME: So what? - } - - if (start_times.top() < now) - { - std::cout << "- " - << ((float(now) - float(start_times.top())) / CLOCKS_PER_SEC) - << "s "; - } - - start_times.pop(); - - if (has_inner_trace || (internal::max_tab - tab > 1)) - std::cout << std::endl; - } - -# endif // ! MLN_INCLUDE_ONLY - - } // end of namespace mln::trace - -} // end of namespace mln - - -#endif // ! MLN_TRACE_EXITING_HH diff --git a/milena/mln/trace/quiet.hh b/milena/mln/trace/quiet.hh deleted file mode 100644 index f76e8d2..0000000 --- a/milena/mln/trace/quiet.hh +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_QUIET_HH -# define MLN_TRACE_QUIET_HH - -/*! \file - * - * \brief Definition of the trace quiet Boolean value. - */ - -# include <ctime> -# include <sys/time.h> - -namespace mln -{ - - namespace trace - { - - extern bool quiet; - extern unsigned tab ; - extern bool full_trace; - - - namespace internal - { - - extern unsigned max_tab ; - extern timeval start_time; - extern bool is_quiet; - - } // end of namespace mln::trace::internal - - -# ifndef MLN_INCLUDE_ONLY - -# ifndef MLN_WO_GLOBAL_VARS - - bool quiet = true; - unsigned tab = 0; - bool full_trace = false; - - - namespace internal - { - - unsigned max_tab = 0; - timeval start_time; - bool is_quiet = quiet; - } // end of namespace mln::trace::internal - -# endif // !MLN_WO_GLOBAL_VARS - -# endif // !MLN_INCLUDE_ONLY - - } // end of namespace mln::trace - -} // end of namespace mln - - -#endif // ! MLN_TRACE_QUIET_HH diff --git a/milena/mln/trace/resume.hh b/milena/mln/trace/resume.hh deleted file mode 100644 index ec2c983..0000000 --- a/milena/mln/trace/resume.hh +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_RESUME_HH -# define MLN_TRACE_RESUME_HH - -/// \file -/// -/// Resume traces. -/// \sa mln::trace::stop - -# include <mln/trace/quiet.hh> - - -namespace mln -{ - - namespace trace - { - - void resume(); - -# ifndef MLN_INCLUDE_ONLY - - inline - void resume() - { - quiet = internal::is_quiet; - } - -# endif // ! MLN_INCLUDE_ONLY - - } // end of namespace mln::trace - -} // end of namespace mln - - -#endif // ! MLN_TRACE_RESUME_HH diff --git a/milena/mln/trace/stop.hh b/milena/mln/trace/stop.hh deleted file mode 100644 index 2001c28..0000000 --- a/milena/mln/trace/stop.hh +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_STOP_HH -# define MLN_TRACE_STOP_HH - -/// \file -/// Stop printing traces except if trace::full_trace is enabled. -/// \sa mln::trace::resume - -# include <iostream> - -# include <mln/trace/quiet.hh> - - -namespace mln -{ - - namespace trace - { - - void stop(); - -# ifndef MLN_INCLUDE_ONLY - - inline - void stop() - { - internal::is_quiet = quiet; - if (!full_trace) - quiet = true; - } - -# endif // ! MLN_INCLUDE_ONLY - - } // end of namespace mln::trace - -} // end of namespace mln - - -#endif // ! MLN_TRACE_STOP_HH diff --git a/milena/mln/trace/warning.hh b/milena/mln/trace/warning.hh deleted file mode 100644 index 01a82a2..0000000 --- a/milena/mln/trace/warning.hh +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2008, 2009, 2010 EPITA Research and Development -// Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#ifndef MLN_TRACE_WARNING_HH -# define MLN_TRACE_WARNING_HH - -/// \file -/// -/// Display warning message in trace output. - -# include <iostream> -# include <string> - -# include <mln/trace/quiet.hh> - - -namespace mln -{ - - namespace trace - { - - void warning(const std::string& message); - - -# ifndef MLN_INCLUDE_ONLY - - inline - void warning(const std::string& message) - { - std::cerr << "Warning: " << message << std::endl; - } - -# endif // ! MLN_INCLUDE_ONLY - - } // end of namespace mln::trace - -} // end of namespace mln - - -#endif // ! MLN_TRACE_WARNING_HH -- 1.7.2.5