MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / addFile

Method addFile

src/Base/Writer.cpp:294–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294std::string Writer::addFile(const char* Name, const Base::Persistence* Object)
295{
296 // always check isForceXML() before requesting a file!
297 // assert(!isForceXML()); Changes introduced in 1.0 differ from LS3 (TNP), so this assertion is
298 // not valid anymore.
299
300 FileEntry temp;
301 temp.FileName = Name ? Name : "";
302 if (FileNameManager.containsName(temp.FileName)) {
303 temp.FileName = FileNameManager.makeUniqueName(temp.FileName);
304 }
305 temp.Object = Object;
306
307 FileList.push_back(temp);
308 FileNameManager.addExactName(temp.FileName);
309
310 // return the unique file name
311 return temp.FileName;
312}
313
314void Writer::incInd()
315{

Callers 6

SaveMethod · 0.45
SaveMethod · 0.45
RestoreMethod · 0.45
SaveMethod · 0.45
RestoreMethod · 0.45
ActionSelectorMethod · 0.45

Calls 4

containsNameMethod · 0.80
makeUniqueNameMethod · 0.80
addExactNameMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected