common.hh

Go to the documentation of this file.
00001 // Copyright (C) 2008 Laboratoire de Recherche et Développement
00002 // de l'Epita (LRDE).
00003 //
00004 // This file is part of Spot, a model checking library.
00005 //
00006 // Spot is free software; you can redistribute it and/or modify it
00007 // under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 2 of the License, or
00009 // (at your option) any later version.
00010 //
00011 // Spot is distributed in the hope that it will be useful, but WITHOUT
00012 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00013 // or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
00014 // License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with Spot; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00019 // 02111-1307, USA.
00020 
00021 #ifndef SPOT_IFACE_NIPS_COMMON_HH
00022 # define SPOT_IFACE_NIPS_COMMON_HH
00023 
00024 # include <string>
00025 # include <iosfwd>
00026 
00027 namespace spot
00028 {
00029 
00031   class nips_exception
00032   {
00033   public:
00034     nips_exception(const std::string& where, int err)
00035       : err_(err), where_(where), err_defined_(true)
00036     {
00037     }
00038 
00039     nips_exception(const std::string& where)
00040       : err_(-1), where_(where), err_defined_(false)
00041     {
00042     }
00043 
00044     int
00045     get_err() const
00046     {
00047       return err_;
00048     }
00049 
00050     std::string
00051     get_where() const
00052     {
00053       return where_;
00054     }
00055 
00056     int
00057     get_err_defined() const
00058     {
00059       return err_defined_;
00060     }
00061 
00062   private:
00063     int err_;
00064     std::string where_;
00065     bool err_defined_;
00066   };
00067 
00068   std::ostream& operator<<(std::ostream& os, const nips_exception& e);
00069 }
00070 
00071 #endif // SPOT_IFACE_NIPS_COMMON_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Tue Feb 1 2011 12:00:52 for spot by doxygen 1.7.1