Parent Directory
|
Revision Log
Revision 1.4 - (view) (download) (as text)
1 : | hwang | 1.1 | #include <stdio.h> |
2 : | #include <string> | ||
3 : | |||
4 : | #include "RecoReadout/RecoElem.hh" | ||
5 : | #include "RecoReadout/Reaction.hh" | ||
6 : | #include "MExplorer/xduGen.hh" | ||
7 : | |||
8 : | efrank | 1.4 | #include "RecoElemSBW/SbmlFactory.hh" |
9 : | |||
10 : | hwang | 1.1 | |
11 : | |||
12 : | using namespace std; | ||
13 : | |||
14 : | //************************************************************************ | ||
15 : | void printList (RecoElem& elem); | ||
16 : | //************************************************************************ | ||
17 : | |||
18 : | |||
19 : | |||
20 : | |||
21 : | //************************************************************************ | ||
22 : | int | ||
23 : | main(int argc, char* argv[] ) { | ||
24 : | //************************************************************************ | ||
25 : | |||
26 : | |||
27 : | efrank | 1.4 | if (argc != 2) { |
28 : | hwang | 1.1 | printf("usage: readSBML <filename>\n"); |
29 : | return 1; | ||
30 : | } | ||
31 : | |||
32 : | |||
33 : | efrank | 1.4 | RecoElem* elem = SbmlFactory( argv[1] ); |
34 : | hwang | 1.1 | |
35 : | cout << "************************" << endl; | ||
36 : | printList(*elem); | ||
37 : | cout << "************************" << endl; | ||
38 : | |||
39 : | efrank | 1.4 | std::string path=""; |
40 : | hwang | 1.1 | xduGen( *elem, path ); |
41 : | |||
42 : | return 0; | ||
43 : | } | ||
44 : | |||
45 : | |||
46 : | |||
47 : | |||
48 : | //************************************************************************ | ||
49 : | void printList (RecoElem& elem) | ||
50 : | //************************************************************************ | ||
51 : | { | ||
52 : | |||
53 : | // I don't think there's any subelements. Model w/ one subelement, and 1 kid | ||
54 : | |||
55 : | vector<RecoElem>& subElem = elem.getSubElements(); | ||
56 : | vector<Reaction>& rxns = elem.getReactions(); | ||
57 : | |||
58 : | int nrxns= rxns.size (); | ||
59 : | int nkids= subElem.size (); | ||
60 : | |||
61 : | cout << "MY NAME: " << elem.getName() << endl; | ||
62 : | cout << " No. of reactions " << nrxns << endl; | ||
63 : | cout << " No. of kids: " << nkids << endl; | ||
64 : | |||
65 : | |||
66 : | for (int l=0; l< nrxns ; l++) { | ||
67 : | efrank | 1.2 | cout << rxns[l].asString( ) << endl; |
68 : | hwang | 1.1 | } |
69 : | |||
70 : | |||
71 : | for (int i=0; i<nkids; i++){ | ||
72 : | cout << "in deeper **** " << endl; | ||
73 : | printList(subElem[i]); | ||
74 : | cout << "back up *** " << endl; | ||
75 : | } | ||
76 : | |||
77 : | return; | ||
78 : | } |
MCS Webmaster | ViewVC Help |
Powered by ViewVC 1.0.3 |