Now all escaping required for the C++ code generation is done when the .cpp/.h files are generated. Previously, only newlines were escaped automatically. This was a) inconsistent and b) leaked c++ details into the xml data. In addition, the escaping is now done in one central place, harmonizing the three previous implementations. Pre-existing c++ escape sequences in the XML files have been replaced by their literal equivalent so that the resulting python doc sting remains unchanged.
55 lines
2.1 KiB
XML
55 lines
2.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
|
<PythonExport
|
|
Father="BaseClassPy"
|
|
Name="PersistencePy"
|
|
Twin="Persistence"
|
|
TwinPointer="Persistence"
|
|
Include="Base/Persistence.h"
|
|
FatherInclude="Base/BaseClassPy.h"
|
|
Namespace="Base"
|
|
FatherNamespace="Base">
|
|
<Documentation>
|
|
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
|
<DeveloperDocu>This is the Persistence class</DeveloperDocu>
|
|
<UserDocu>Base.Persistence class.
|
|
|
|
Class to dump and restore the content of an object.</UserDocu>
|
|
</Documentation>
|
|
<Attribute Name="Content" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Content of the object in XML representation.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Content" Type="String" />
|
|
</Attribute>
|
|
<Attribute Name="MemSize" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Memory size of the object in bytes.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="MemSize" Type="Int"/>
|
|
</Attribute>
|
|
<Methode Name="dumpContent" Keyword="true" Const="true">
|
|
<Documentation>
|
|
<UserDocu>dumpContent(Compression=3) -> bytearray
|
|
|
|
Dumps the content of the object, both the XML representation and the additional
|
|
data files required, into a byte representation.
|
|
|
|
Compression : int
|
|
Set the data compression level in the range [0,9]. Set to 0 for no compression.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="restoreContent">
|
|
<Documentation>
|
|
<UserDocu>restoreContent(obj) -> None
|
|
|
|
Restore the content of the object from a byte representation as stored by `dumpContent`.
|
|
It could be restored from any Python object implementing the buffer protocol.
|
|
|
|
obj : buffer
|
|
Object with buffer protocol support.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
</PythonExport>
|
|
</GenerateModel>
|