You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
py::class_<mx::NodeDef, mx::NodeDefPtr, mx::InterfaceElement>(mod, "NodeDef", "A node definition element within a Document.\n\nA NodeDef provides the declaration of a node interface, which may then be instantiated as a Node.")
18
+
.def("setNodeString", &mx::NodeDef::setNodeString, "Set the node string of the NodeDef.")
19
+
.def("hasNodeString", &mx::NodeDef::hasNodeString, "Return true if the given NodeDef has a node string.")
20
+
.def("getNodeString", &mx::NodeDef::getNodeString, "Return the node string of the NodeDef.")
21
+
.def("setNodeGroup", &mx::NodeDef::setNodeGroup, "Set the node group of the NodeDef.")
22
+
.def("hasNodeGroup", &mx::NodeDef::hasNodeGroup, "Return true if the given NodeDef has a node group.")
23
+
.def("getNodeGroup", &mx::NodeDef::getNodeGroup, "Return the node group of the NodeDef.")
24
+
.def("getImplementation", &mx::NodeDef::getImplementation, "Return the Implementation, if any, with the given name.")
py::arg("target") = mx::EMPTY_STRING, "Return the Implementation, if any, with the given name.")
27
+
.def("isVersionCompatible", &mx::NodeDef::isVersionCompatible, "Return true if the given version string is compatible with this NodeDef.\n\nThis may be used to test, for example, whether a NodeDef and Node may be used together.")
py::class_<mx::Implementation, mx::ImplementationPtr, mx::InterfaceElement>(mod, "Implementation", "An implementation element within a Document.\n\nAn Implementation is used to associate external source code with a specific NodeDef, providing a definition for the node that may either be universal or restricted to a specific target.")
40
+
.def("setFile", &mx::Implementation::setFile, "Set the file string for the Implementation.")
41
+
.def("hasFile", &mx::Implementation::hasFile, "Return true if the given Implementation has a file string.")
42
+
.def("getFile", &mx::Implementation::getFile, "Return the file string for the Implementation.")
43
+
.def("setFunction", &mx::Implementation::setFunction, "Set the function string for the Implementation.")
44
+
.def("hasFunction", &mx::Implementation::hasFunction, "Return true if the given Implementation has a function string.")
45
+
.def("getFunction", &mx::Implementation::getFunction, "Return the function string for the Implementation.")
46
+
.def("setNodeDef", &mx::Implementation::setNodeDef, "Set the NodeDef element referenced by the Implementation.")
47
+
.def("getNodeDef", &mx::Implementation::getNodeDef, "Returns a nodedef for a given transform.")
48
+
.def("setNodeGraph", &mx::Implementation::setNodeGraph, "Set the nodegraph string for the Implementation.")
49
+
.def("hasNodeGraph", &mx::Implementation::hasNodeGraph, "Return true if the given Implementation has a nodegraph string.")
50
+
.def("getNodeGraph", &mx::Implementation::getNodeGraph, "Return the NodeGraph, if any, with the given name.")
py::class_<mx::TypeDef, mx::TypeDefPtr, mx::Element>(mod, "TypeDef", "A type definition element within a Document.")
56
+
.def("setSemantic", &mx::TypeDef::setSemantic, "Set the variable semantic of this port.")
57
+
.def("hasSemantic", &mx::TypeDef::hasSemantic, "Return true if the given TypeDef has a semantic string.")
58
+
.def("getSemantic", &mx::TypeDef::getSemantic, "Return the variable semantic of this port.")
59
+
.def("setContext", &mx::TypeDef::setContext, "Set the context string of the TypeDef.")
60
+
.def("hasContext", &mx::TypeDef::hasContext, "Return true if the given TypeDef has a context string.")
61
+
.def("getContext", &mx::TypeDef::getContext, "Return the context string of the TypeDef.")
62
62
.def("addMember", &mx::TypeDef::addMember,
63
-
py::arg("name") = mx::EMPTY_STRING)
64
-
.def("getMember", &mx::TypeDef::getMember)
63
+
py::arg("name") = mx::EMPTY_STRING, "Add a Member to the TypeDef.\n\nArgs:\n name: The name of the new Member. If no name is specified, then a unique name will automatically be generated.\n\nReturns:\n A shared pointer to the new Member.")
64
+
.def("getMember", &mx::TypeDef::getMember, "Return the Member, if any, with the given name.")
65
65
.def("getMembers", &mx::TypeDef::getMembers)
66
-
.def("removeMember", &mx::TypeDef::removeMember)
66
+
.def("removeMember", &mx::TypeDef::removeMember, "Remove the Member, if any, with the given name.")
py::class_<mx::UnitDef, mx::UnitDefPtr, mx::Element>(mod, "UnitDef", "A unit definition element within a Document.")
78
+
.def("setUnitType", &mx::UnitDef::setUnitType, "Set the element's unittype string.")
79
+
.def("hasUnitType", &mx::UnitDef::hasUnitType, "Return true if the given element has a unittype string.")
80
+
.def("getUnitType", &mx::UnitDef::getUnitType, "Return the unit type string.")
81
+
.def("addUnit", &mx::UnitDef::addUnit, "Add a Unit to the UnitDef.\n\nArgs:\n name: The name of the new Unit. An exception is thrown if the name provided is an empty string.\n\nReturns:\n A shared pointer to the new Unit.")
82
+
.def("getUnit", &mx::UnitDef::getUnit, "Return the unit type for the value on this port.")
83
+
.def("getUnits", &mx::UnitDef::getUnits, "Return a vector of all Unit elements in the UnitDef.")
py::class_<mx::AttributeDef, mx::AttributeDefPtr, mx::TypedElement>(mod, "AttributeDef", "An attribute definition element within a Document.")
92
+
.def("setAttrName", &mx::AttributeDef::setAttrName, "Set the element's attrname string.")
93
+
.def("hasAttrName", &mx::AttributeDef::hasAttrName, "Return true if this element has an attrname string.")
94
+
.def("getAttrName", &mx::AttributeDef::getAttrName, "Return the element's attrname string.")
95
+
.def("setValueString", &mx::AttributeDef::setValueString, "Set the value string of an element.")
96
+
.def("hasValueString", &mx::AttributeDef::hasValueString, "Return true if the given element has a value string.")
97
+
.def("getValueString", &mx::AttributeDef::getValueString, "Return value string.")
98
+
.def("setExportable", &mx::AttributeDef::setExportable, "Set the exportable boolean for the element.")
99
+
.def("getExportable", &mx::AttributeDef::getExportable, "Return the exportable boolean for the element.\n\nDefaults to false if exportable is not set.")
py::class_<mx::TargetDef, mx::TargetDefPtr, mx::TypedElement>(mod, "TargetDef", "A definition of an implementation target.")
103
+
.def("getMatchingTargets", &mx::TargetDef::getMatchingTargets, "Return a vector of target names that is matching this targetdef either by itself of by its inheritance.\n\nThe vector is ordered by priority starting with this targetdef itself and then upwards in the inheritance hierarchy.")
0 commit comments