00001 // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), 00002 // département Systèmes Répartis Coopératifs (SRC), Université Pierre 00003 // et Marie Curie. 00004 // 00005 // This file is part of the Spot tutorial. Spot is a model checking 00006 // library. 00007 // 00008 // Spot is free software; you can redistribute it and/or modify it 00009 // under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation; either version 2 of the License, or 00011 // (at your option) any later version. 00012 // 00013 // Spot is distributed in the hope that it will be useful, but WITHOUT 00014 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00015 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 00016 // License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with Spot; see the file COPYING. If not, write to the Free 00020 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00021 // 02111-1307, USA. 00022 00023 #ifndef MARKING_HH 00024 #define MARKING_HH 00025 00026 #include <vector> 00027 #include <iostream> 00028 00030 class marking { 00031 public: 00032 marking(const marking& m); 00033 00035 marking(int size=0); 00036 00038 void insert(int p, int n); 00039 00041 void append(int n); 00042 00046 int get(int p) const; 00047 00049 int size() const; 00050 00053 bool operator<=(const marking& m) const; 00054 00057 bool operator>=(const marking& m) const; 00058 00060 void plus(const marking& m, marking& res) const; 00061 00065 void minus(const marking& m, marking& res) const; 00066 00068 void print(std::ostream& os) const; 00069 00071 const std::vector<int>& get_vector() const; 00072 00073 protected: 00074 std::vector<int> ma; 00075 }; 00076 00077 #endif