MCPcopy Create free account
hub / github.com/Singular/Singular / close

Method close

gfanlib/gfanlib_polymakefile.cpp:154–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153
154void PolymakeFile::close()
155{
156 FILE *f=fopen(fileName.c_str(),"w");
157 assert(f);
158
159 if(isXml)
160 {
161 fprintf(f,"<properties>\n");
162
163 for(list<PolymakeProperty>::const_iterator i=properties.begin();i!=properties.end();i++)
164 {
165 fprintf(f,"<property name=\"%s\">\n",i->name.c_str());
166 fprintf(f,"%s",i->value.c_str());
167 fprintf(f,"</property>\n");
168 }
169 fprintf(f,"</properties>\n");
170 }
171 else
172 {
173 fprintf(f,"_application %s\n",application.c_str());
174 fprintf(f,"_version 2.2\n");
175 fprintf(f,"_type %s\n",type.c_str());
176
177 for(list<PolymakeProperty>::const_iterator i=properties.begin();i!=properties.end();i++)
178 {
179 fprintf(f,"\n%s\n",i->name.c_str());
180 fprintf(f,"%s",i->value.c_str());
181 }
182 }
183 fclose(f);
184}
185
186
187void PolymakeFile::writeStream(ostream &file)

Callers 15

printTableFunction · 0.80
findGenNewFunction · 0.80
leaveGuiMethod · 0.80
convert_file_PBFunction · 0.80
convert_file_SingularFunction · 0.80
convert_file_MagmaFunction · 0.80
readFileFunction · 0.80
omxmlreader.pyFile · 0.80
fetch_tbz2_dataFunction · 0.80
saveMethod · 0.80

Calls 4

assertFunction · 0.85
c_strMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 2

leaveGuiMethod · 0.64