Skip to content

Commit

Permalink
#21 risolto il bug per cui erano sempre presenti le misure
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabeber committed Apr 27, 2021
1 parent d261af0 commit 2a8a56f
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 124 deletions.
36 changes: 33 additions & 3 deletions build/CMakeFiles/mainEntry.dir/CXX.includecache
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,45 @@

#IncludeRegexTransform:

../include/pistone.h
../include/biella.h
string
-

../include/manovella.h
string
-

/home/luca/compito_1/src/pistone.cpp
../include/meccanismo.h
pistone.h
/home/luca/compito_1/src/pistone.h
../include/pistone.h
biella.h
../include/biella.h
svg.h
../include/svg.h
manovella.h
../include/manovella.h

../include/pistone.h
string
-

../include/svg.h
string
-

/home/luca/compito_1/main.cpp
iostream
-
cstring
-
pistone.h
/home/luca/compito_1/pistone.h
biella.h
/home/luca/compito_1/biella.h
svg.h
/home/luca/compito_1/svg.h
manovella.h
/home/luca/compito_1/manovella.h
meccanismo.h
/home/luca/compito_1/meccanismo.h

Binary file modified build/CMakeFiles/mainEntry.dir/main.cpp.o
Binary file not shown.
Binary file modified build/CMakeFiles/mainEntry.dir/src/svg.cpp.o
Binary file not shown.
Binary file modified build/mainEntry
Binary file not shown.
2 changes: 1 addition & 1 deletion include/svg.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ void svg_to_file(std::string filename, std::string str_svg);
*
* @return stringa che contiene il svg presente nel file
*/
std::string read_svg(std::string filename);
std::string svg_read(std::string filename);

#endif //SVG_H
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ int main() {
std::cout<<"Inserisci un valore valido"<<std::endl;
break;
}

s = "<!--\n Sono presenti " + std::to_string(n) + " meccanismi\n-->\n";

for (int i=0; i<n; i++){
s += "<!--\n Meccanismo " + std::to_string(i+1) + "\n-->\n";
s += meccanismo_svg(arr[i],1);
s += meccanismo_svg(arr[i],misure);
meccanismo_del(arr[i]);
}
delete arr;
Expand Down
116 changes: 0 additions & 116 deletions mec.svg

This file was deleted.

143 changes: 143 additions & 0 deletions meccanismo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/svg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ void svg_to_file (string filename, string str_svg){
// scrivo all'interno del file la stringa svg
MyFile << str_svg;

cout << "Il file " << filename << " e` stato creato ed e' stato scritto al suo interno" << endl;

MyFile.close();
}

string read_svg (string filename){
string svg_read (string filename){

std::ifstream t(filename);
std::stringstream buffer;
Expand All @@ -48,7 +50,6 @@ string read_svg (string filename){
string s = buffer.str();

cout << "Il file " << filename << " e` stato letto" << endl;
cout << s << endl;

return s;
}

0 comments on commit 2a8a56f

Please sign in to comment.