Line data Source code
1 : /*******************************************************************************
2 : * *
3 : * Cosmos:(C)oncept et (O)utils (S)tatistique pour les (Mo)deles *
4 : * (S)tochastiques *
5 : * *
6 : * Copyright (C) 2009-2012 LSV & LACL *
7 : * Authors: Paolo Ballarini BenoƮt Barbot & Hilal Djafri *
8 : * Website: http://www.lsv.ens-cachan.fr/Software/cosmos *
9 : * *
10 : * This program is free software; you can redistribute it and/or modify *
11 : * it under the terms of the GNU General Public License as published by *
12 : * the Free Software Foundation; either version 3 of the License, or *
13 : * (at your option) any later version. *
14 : * *
15 : * This program is distributed in the hope that it will be useful, *
16 : * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 : * GNU General Public License for more details. *
19 : * *
20 : * You should have received a copy of the GNU General Public License along *
21 : * with this program; if not, write to the Free Software Foundation, Inc., *
22 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
23 : * file unfolder.hpp created by Benoit Barbot on 10/01/14. *
24 : *******************************************************************************
25 : */
26 :
27 : #ifndef __Cosmos__unfolder__
28 : #define __Cosmos__unfolder__
29 :
30 : #include <iostream>
31 : #include <string>
32 : #include <sstream>
33 : #include <fstream>
34 :
35 :
36 : #include "Gspn-Reader.hpp"
37 :
38 1 : class unfolder: public GspnType {
39 : public:
40 1 : unfolder(GspnType& g):GspnType(g),nbPlace(0),nbTrans(0),nbArc(0){};
41 :
42 : void export_grml(std::ofstream &fout);
43 : private:
44 : //void export_init_grml(ofstream &fout);
45 :
46 : void export_place_grml(std::ofstream &fout,const place &p);
47 : void export_transition_grml(std::ofstream &fout,const transition&t);
48 : void export_arc_grml(std::ofstream &fout,const transition &t);
49 : void export_coltoken(std::ofstream &fout,const std::vector<color> &vec,const coloredToken &coltoken,const transition &t,const place &p, bool );
50 : void export_multcoltok(std::ofstream &fout,const std::vector<color> &vec,const transition &t,const place &p, bool ,const arc);
51 : //size_t next_uid;
52 : void print_arc(std::ofstream&,size_t,size_t,size_t, bool, const expr&);
53 :
54 : std::string cleanstr(const std::string &) const;
55 : std::string str_of_vect(const std::vector<color> &v,const std::string &smid) const;
56 :
57 : size_t nbPlace,nbTrans,nbArc;
58 : };
59 : #endif /* defined(__Cosmos__unfolder__) */
|