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.
136 lines
4.0 KiB
XML
136 lines
4.0 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="PyObjectBase"
|
|
Name="TypePy"
|
|
Twin="BaseType"
|
|
TwinPointer="BaseType"
|
|
Include="Base/Type.h"
|
|
FatherInclude="Base/PyObjectBase.h"
|
|
Namespace="Base"
|
|
FatherNamespace="Base"
|
|
Delete="true">
|
|
<ForwardDeclarations>
|
|
namespace Base {
|
|
using BaseType = Type;
|
|
}</ForwardDeclarations>
|
|
<Documentation>
|
|
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
|
<DeveloperDocu>This is the Type class</DeveloperDocu>
|
|
<UserDocu>Base.BaseType class.
|
|
|
|
This class is not intended to create instances of itself, but to get information
|
|
from the different types and create instances of them.
|
|
Regarding instantiation, this is possible in cases that inherit from the
|
|
Base::BaseClass class and are not abstract classes.</UserDocu>
|
|
</Documentation>
|
|
<Methode Name="fromName" Static="true">
|
|
<Documentation>
|
|
<UserDocu>fromName(name) -> Base.BaseType
|
|
|
|
Returns a type object by name.
|
|
|
|
name : str</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="fromKey" Static="true">
|
|
<Documentation>
|
|
<UserDocu>fromKey(key) -> Base.BaseType
|
|
|
|
Returns a type id object by key.
|
|
|
|
key : int</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getNumTypes" Static="true">
|
|
<Documentation>
|
|
<UserDocu>getNumTypes() -> int
|
|
|
|
Returns the number of type ids created so far.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getBadType" Static="true">
|
|
<Documentation>
|
|
<UserDocu>getBadType() -> Base.BaseType
|
|
|
|
Returns an invalid type id.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getAllDerivedFrom" Static="true">
|
|
<Documentation>
|
|
<UserDocu>getAllDerivedFrom(type) -> list
|
|
|
|
Returns all descendants from the given type id.
|
|
|
|
type : str, Base.BaseType</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getParent" Const="true">
|
|
<Documentation>
|
|
<UserDocu>getParent() -> Base.BaseType
|
|
|
|
Returns the parent type id.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="isBad" Const="true">
|
|
<Documentation>
|
|
<UserDocu>isBad() -> bool
|
|
|
|
Checks if the type id is invalid.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="isDerivedFrom" Const="true">
|
|
<Documentation>
|
|
<UserDocu>isDerivedFrom(type) -> bool
|
|
|
|
Returns true if given type id is a father of this type id.
|
|
|
|
type : str, Base.BaseType</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getAllDerived" Const="true">
|
|
<Documentation>
|
|
<UserDocu>getAllDerived() -> list
|
|
|
|
Returns all descendants from this type id.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="createInstance">
|
|
<Documentation>
|
|
<UserDocu>createInstance() -> object
|
|
|
|
Creates an instance of this type id.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="createInstanceByName" Static="true">
|
|
<Documentation>
|
|
<UserDocu>createInstanceByName(name, load=False) -> object
|
|
|
|
Creates an instance of the named type id.
|
|
|
|
name : str
|
|
load : bool
|
|
Load named type id module.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Attribute Name="Name" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>The name of the type id.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Name" Type="String" />
|
|
</Attribute>
|
|
<Attribute Name="Key" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>The key of the type id.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Key" Type="Long" />
|
|
</Attribute>
|
|
<Attribute Name="Module" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Module in which this class is defined.</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Module" Type="String"/>
|
|
</Attribute>
|
|
</PythonExport>
|
|
</GenerateModel>
|