10 typedef list
<Layout
> layoutlist
;
12 // return a list of all layouts in the file
13 // TODO better memory management
14 layoutlist
getAllLayouts(const string
&file
) {
19 while(f
.stream().good()) {
20 getline(f
.stream(), line
);
21 if(line
== "# Evolved Layout ") {
24 while(lines
-- && f
.stream().good()) {
25 getline(f
.stream(), line
);
37 layoutlist
getAllLayoutsInTextFilesIn(const string
&folder
= "results") {
38 throw new string("Not Implemented");
43 int main(int argc
, char **argv
) {
46 cerr
<< "Usage: " << argv
[0] << " <filename>" << endl
;
51 layoutlist l
= getAllLayouts(file
);
54 for(layoutlist::const_iterator it
= l
.begin();
55 it
!= l
.end(); ++it
) {
56 cout
<< "Evolved: " << endl
<< it
->toString() << endl
;