saveDocument frees resources and sets the document status to SAVED.
|
free(document->xmlFilename); |
|
document->xmlFilename = (char*) malloc(sizeof(char) * (strlen(xmlFilename) + 1)); |
|
strcpy(document->xmlFilename, xmlFilename); |
|
|
|
document->status = SAVED; |
As a consequence, a saved document cannot be edited anymore:
|
if (document->status == SAVED) { |
|
printMsg(MESSAGETYPE_ERROR, "Error: Can not add element to document. Document already saved.\n"); |
|
return ALREADY_SAVED; |
|
} |
This is counter-intuitive, because there is also tixiCloseDocument and having intermediate saves in a long simulation run is a valid use case.
Thanks @CLiersch for pointing this out.
saveDocumentfrees resources and sets the document status toSAVED.tixi/src/tixiInternal.c
Lines 1233 to 1237 in 470570d
As a consequence, a saved document cannot be edited anymore:
tixi/src/tixiImpl.c
Lines 1231 to 1234 in 470570d
This is counter-intuitive, because there is also
tixiCloseDocumentand having intermediate saves in a long simulation run is a valid use case.Thanks @CLiersch for pointing this out.