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

Method getExportName

src/App/DocumentObject.cpp:381–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381std::string DocumentObject::getExportName(bool forced) const
382{
383 if (!isAttachedToDocument()) {
384 return {};
385 }
386
387 if (!forced && !isExporting()) {
388 return *pcNameInDocument;
389 }
390
391 // '@' is an invalid character for an internal name, which ensures the
392 // following returned name will be unique in any document. Saving external
393 // object like that shall only happens in Document::exportObjects(). We
394 // shall strip out this '@' and the following document name during restoring.
395 return *pcNameInDocument + '@' + getDocument()->getName();
396}
397
398bool DocumentObject::isAttachedToDocument() const
399{

Callers 12

writeObjectTypeMethod · 0.80
writeObjectDataMethod · 0.80
toPersistentStringMethod · 0.80
importSubNamesMethod · 0.80
SaveMethod · 0.80
exportSubNameMethod · 0.80
tryImportMethod · 0.80
tryImportSubNameMethod · 0.80
SaveMethod · 0.80
exportObjectsMethod · 0.80
getObjInfoRayMethod · 0.80
onDeleteMethod · 0.80

Calls 2

getDocumentFunction · 0.50
getNameMethod · 0.45

Tested by

no test coverage detected