1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
9
FatherInclude="Base/PyObjectBase.h"
11
FatherNamespace="Base"
15
using BaseType = Type;
16
}</ForwardDeclarations>
18
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
19
<DeveloperDocu>This is the Type class</DeveloperDocu>
20
<UserDocu>BaseTypePy class.
22
This class provides functionality related to type management in the Base module. It's not intended for direct instantiation but for accessing type information and creating instances of various types. Instantiation is possible for classes that inherit from the Base::BaseClass class and are not abstract.</UserDocu>
24
<Methode Name="fromName" Static="true">
26
<UserDocu>fromName(name) -> Base.BaseType
28
Returns a type object by name.
33
<Methode Name="fromKey" Static="true">
35
<UserDocu>fromKey(key) -> Base.BaseType
37
Returns a type id object by key.
42
<Methode Name="getNumTypes" Static="true">
44
<UserDocu>getNumTypes() -> int
46
Returns the number of type ids created so far.</UserDocu>
49
<Methode Name="getBadType" Static="true">
51
<UserDocu>getBadType() -> Base.BaseType
53
Returns an invalid type id.</UserDocu>
56
<Methode Name="getAllDerivedFrom" Static="true">
58
<UserDocu>getAllDerivedFrom(type) -> list
60
Returns all descendants from the given type id.
62
type : str, Base.BaseType</UserDocu>
65
<Methode Name="getParent" Const="true">
67
<UserDocu>getParent() -> Base.BaseType
69
Returns the parent type id.</UserDocu>
72
<Methode Name="isBad" Const="true">
74
<UserDocu>isBad() -> bool
76
Checks if the type id is invalid.</UserDocu>
79
<Methode Name="isDerivedFrom" Const="true">
81
<UserDocu>isDerivedFrom(type) -> bool
83
Returns true if given type id is a father of this type id.
85
type : str, Base.BaseType</UserDocu>
88
<Methode Name="getAllDerived" Const="true">
90
<UserDocu>getAllDerived() -> list
92
Returns all descendants from this type id.</UserDocu>
95
<Methode Name="createInstance">
97
<UserDocu>createInstance() -> object
99
Creates an instance of this type id.</UserDocu>
102
<Methode Name="createInstanceByName" Static="true">
104
<UserDocu>createInstanceByName(name, load=False) -> object
106
Creates an instance of the named type id.
110
Load named type id module.</UserDocu>
113
<Attribute Name="Name" ReadOnly="true">
115
<UserDocu>The name of the type id.</UserDocu>
117
<Parameter Name="Name" Type="String" />
119
<Attribute Name="Key" ReadOnly="true">
121
<UserDocu>The key of the type id.</UserDocu>
123
<Parameter Name="Key" Type="Long" />
125
<Attribute Name="Module" ReadOnly="true">
127
<UserDocu>Module in which this class is defined.</UserDocu>
129
<Parameter Name="Module" Type="String"/>