The python export class for Command. More...

#include <CommandPy.h>

Public Types

typedef Command * PointerType
 
- Public Types inherited from Base::PersistencePy
typedef Persistence * PointerType
 
- Public Types inherited from Base::BaseClassPy
typedef BaseClass * PointerType
 
- Public Types inherited from Base::PyObjectBase
typedef void * PointerType
 
enum  Status { Valid = 0, Immutable = 1, Notify = 2, NoTrack = 3 }
 

Public Member Functions

 CommandPy (Command *pcObject, PyTypeObject *T=&Type)
 
virtual PyTypeObject * GetType (void)
 
virtual int PyInit (PyObject *args, PyObject *k)
 PyInit method Override this method to initialize a newly created instance of the class (Constructor) More...
 
std::string representation (void) const
 
- Public Member Functions inherited from Base::PersistencePy
 PersistencePy (Persistence *pcObject, PyTypeObject *T=&Type)
 
std::string representation (void) const
 
PyObject * dumpContent (PyObject *args, PyObject *kwd)
 implementer for the dumpContent() method More...
 
PyObject * restoreContent (PyObject *args)
 implementer for the restoreContent() method More...
 
Py::String getContent (void) const
 getter for the Content attribute More...
 
Py::Int getMemSize (void) const
 getter for the MemSize attribute More...
 
PyObject * getCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones) More...
 
int setCustomAttributes (const char *attr, PyObject *obj)
 setter for special attributes (e.g. More...
 
Persistence * getPersistencePtr (void) const
 getter for the object handled by this class More...
 
- Public Member Functions inherited from Base::BaseClassPy
 BaseClassPy (BaseClass *pcObject, PyTypeObject *T=&Type)
 
std::string representation (void) const
 
PyObject * isDerivedFrom (PyObject *args)
 implementer for the isDerivedFrom() method More...
 
PyObject * getAllDerivedFrom (PyObject *args)
 implementer for the getAllDerivedFrom() method More...
 
Py::String getTypeId (void) const
 getter for the TypeId attribute More...
 
Py::String getModule (void) const
 getter for the Module attribute More...
 
PyObject * getCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones) More...
 
int setCustomAttributes (const char *attr, PyObject *obj)
 setter for special attributes (e.g. More...
 
BaseClass * getBaseClassPtr (void) const
 getter for the object handled by this class More...
 
- Public Member Functions inherited from Base::PyObjectBase
PyObjectBase * DecRef (void)
 decref method wrapper (see python extending manual)
More...
 
PyObjectBase * IncRef (void)
 incref method wrapper (see python extending manual) More...
 
bool isConst ()
 
bool isNotTracking () const
 
bool isValid ()
 
 PyObjectBase (void *, PyTypeObject *T)
 Constructor Sets the Type of the object (for inheritance) and decrease the the reference count of the PyObject. More...
 
void setConst ()
 
void setInvalid ()
 
void setNotTracking (bool on=true)
 
void setShouldNotify (bool on)
 
bool shouldNotify () const
 
void startNotify ()
 

Static Public Member Functions

static PyObject * PyMake (struct _typeobject *, PyObject *, PyObject *)
 
- Static Public Member Functions inherited from Base::PersistencePy
static PyObject * PyMake (struct _typeobject *, PyObject *, PyObject *)
 
static PyObject * staticCallback_dumpContent (PyObject *self, PyObject *args, PyObject *kwd)
 callback for the dumpContent() method More...
 
static PyObject * staticCallback_restoreContent (PyObject *self, PyObject *args)
 callback for the restoreContent() method More...
 
static PyObject * staticCallback_getContent (PyObject *self, void *closure)
 getter callback for the Content attribute More...
 
static int staticCallback_setContent (PyObject *self, PyObject *value, void *closure)
 setter callback for the Content attribute More...
 
static PyObject * staticCallback_getMemSize (PyObject *self, void *closure)
 getter callback for the MemSize attribute More...
 
static int staticCallback_setMemSize (PyObject *self, PyObject *value, void *closure)
 setter callback for the MemSize attribute More...
 
- Static Public Member Functions inherited from Base::BaseClassPy
static PyObject * PyMake (struct _typeobject *, PyObject *, PyObject *)
 
static PyObject * staticCallback_isDerivedFrom (PyObject *self, PyObject *args)
 callback for the isDerivedFrom() method More...
 
static PyObject * staticCallback_getAllDerivedFrom (PyObject *self, PyObject *args)
 callback for the getAllDerivedFrom() method More...
 
static PyObject * staticCallback_getTypeId (PyObject *self, void *closure)
 getter callback for the TypeId attribute More...
 
static int staticCallback_setTypeId (PyObject *self, PyObject *value, void *closure)
 setter callback for the TypeId attribute More...
 
static PyObject * staticCallback_getModule (PyObject *self, void *closure)
 getter callback for the Module attribute More...
 
static int staticCallback_setModule (PyObject *self, PyObject *value, void *closure)
 setter callback for the Module attribute More...
 
- Static Public Member Functions inherited from Base::PyObjectBase
static void PyDestructor (PyObject *P)
 Wrapper for the Python destructor. More...
 

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of CommandPy. More...
 
static PyMethodDef Methods []
 Methods structure of CommandPy. More...
 
static PyTypeObject Type
 Type structure of CommandPy. More...
 
- Static Public Attributes inherited from Base::PersistencePy
static PyGetSetDef GetterSetter []
 Attribute structure of PersistencePy. More...
 
static PyMethodDef Methods []
 Methods structure of PersistencePy. More...
 
static PyTypeObject Type
 Type structure of PersistencePy. More...
 
- Static Public Attributes inherited from Base::BaseClassPy
static PyGetSetDef GetterSetter []
 Attribute structure of BaseClassPy. More...
 
static PyMethodDef Methods []
 Methods structure of BaseClassPy. More...
 
static PyTypeObject Type
 Type structure of BaseClassPy. More...
 
- Static Public Attributes inherited from Base::PyObjectBase
static PyMethodDef Methods []
 
static PyTypeObject Type
 Py_Header struct from python.h. More...
 

Protected Member Functions

 ~CommandPy ()
 
- Protected Member Functions inherited from Base::PersistencePy
 ~PersistencePy ()
 
- Protected Member Functions inherited from Base::BaseClassPy
 ~BaseClassPy ()
 
- Protected Member Functions inherited from Base::PyObjectBase
virtual ~PyObjectBase ()
 destructor More...
 

callbacks and implementers for the python object methods

PyObject * toGCode (PyObject *args)
 implementer for the toGCode() method More...
 
PyObject * setFromGCode (PyObject *args)
 implementer for the setFromGCode() method More...
 
PyObject * transform (PyObject *args)
 implementer for the transform() method More...
 
static PyObject * staticCallback_toGCode (PyObject *self, PyObject *args)
 callback for the toGCode() method More...
 
static PyObject * staticCallback_setFromGCode (PyObject *self, PyObject *args)
 callback for the setFromGCode() method More...
 
static PyObject * staticCallback_transform (PyObject *self, PyObject *args)
 callback for the transform() method More...
 

callbacks and implementers for the python object attributes

Py::String getName (void) const
 getter for the Name attribute More...
 
void setName (Py::String arg)
 setter for the Name attribute More...
 
Py::Dict getParameters (void) const
 getter for the Parameters attribute More...
 
void setParameters (Py::Dict arg)
 setter for the Parameters attribute More...
 
Py::Object getPlacement (void) const
 getter for the Placement attribute More...
 
void setPlacement (Py::Object arg)
 setter for the Placement attribute More...
 
PyObject * getCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones) More...
 
int setCustomAttributes (const char *attr, PyObject *obj)
 setter for special attributes (e.g. More...
 
Command * getCommandPtr (void) const
 getter for the object handled by this class More...
 
static PyObject * staticCallback_getName (PyObject *self, void *closure)
 getter callback for the Name attribute More...
 
static int staticCallback_setName (PyObject *self, PyObject *value, void *closure)
 setter callback for the Name attribute More...
 
static PyObject * staticCallback_getParameters (PyObject *self, void *closure)
 getter callback for the Parameters attribute More...
 
static int staticCallback_setParameters (PyObject *self, PyObject *value, void *closure)
 setter callback for the Parameters attribute More...
 
static PyObject * staticCallback_getPlacement (PyObject *self, void *closure)
 getter callback for the Placement attribute More...
 
static int staticCallback_setPlacement (PyObject *self, PyObject *value, void *closure)
 setter callback for the Placement attribute More...
 

Additional Inherited Members

- Protected Attributes inherited from Base::PyObjectBase
std::bitset< 32 > StatusBits
 

Detailed Description

The python export class for Command.

Member Typedef Documentation

◆ PointerType

typedef Command* Path::CommandPy::PointerType

Constructor & Destructor Documentation

◆ ~CommandPy()

CommandPy::~CommandPy ( )
protected

◆ CommandPy()

CommandPy::CommandPy ( Command *  pcObject,
PyTypeObject *  T = &Type 
)

Referenced by PyMake(), and transform().

Member Function Documentation

◆ getCommandPtr()

Command * CommandPy::getCommandPtr ( void  ) const

◆ getCustomAttributes()

PyObject * CommandPy::getCustomAttributes ( const char *  attr) const

getter method for special attributes (e.g. dynamic ones)

References getCommandPtr().

◆ getName()

Py::String CommandPy::getName ( void  ) const

getter for the Name attribute

References getCommandPtr().

Referenced by staticCallback_getName().

◆ getParameters()

Py::Dict CommandPy::getParameters ( void  ) const

getter for the Parameters attribute

References getCommandPtr().

Referenced by staticCallback_getParameters().

◆ getPlacement()

Py::Object CommandPy::getPlacement ( void  ) const

getter for the Placement attribute

References getCommandPtr().

Referenced by staticCallback_getPlacement().

◆ GetType()

virtual PyTypeObject* Path::CommandPy::GetType ( void  )
virtual

Reimplemented from Base::PersistencePy.

◆ PyInit()

int CommandPy::PyInit ( PyObject *  ,
PyObject *   
)
virtual

PyInit method Override this method to initialize a newly created instance of the class (Constructor)

Reimplemented from Base::PersistencePy.

References getCommandPtr(), Path::Command::Parameters, Path::Command::setFromGCode(), Path::Command::setFromPlacement(), and Base::PlacementPy::Type.

◆ PyMake()

PyObject * CommandPy::PyMake ( struct _typeobject *  ,
PyObject *  ,
PyObject *   
)
static

References CommandPy().

◆ representation()

◆ setCustomAttributes()

int CommandPy::setCustomAttributes ( const char *  attr,
PyObject *  obj 
)

setter for special attributes (e.g.

dynamic ones) Output: Success=1, Failure=-1, Ignore=0

References getCommandPtr(), and Path::Command::Parameters.

◆ setFromGCode()

PyObject * CommandPy::setFromGCode ( PyObject *  args)

implementer for the setFromGCode() method

References getCommandPtr(), and Path::Command::setFromGCode().

Referenced by staticCallback_setFromGCode().

◆ setName()

void CommandPy::setName ( Py::String  arg)

setter for the Name attribute

References getCommandPtr(), and Path::Command::Name.

Referenced by staticCallback_setName().

◆ setParameters()

void CommandPy::setParameters ( Py::Dict  arg)

setter for the Parameters attribute

References getCommandPtr(), and Path::Command::Parameters.

Referenced by staticCallback_setParameters().

◆ setPlacement()

void CommandPy::setPlacement ( Py::Object  arg)

◆ staticCallback_getName()

PyObject * CommandPy::staticCallback_getName ( PyObject *  self,
void *  closure 
)
static

◆ staticCallback_getParameters()

PyObject * CommandPy::staticCallback_getParameters ( PyObject *  self,
void *  closure 
)
static

◆ staticCallback_getPlacement()

PyObject * CommandPy::staticCallback_getPlacement ( PyObject *  self,
void *  closure 
)
static

◆ staticCallback_setFromGCode()

◆ staticCallback_setName()

int CommandPy::staticCallback_setName ( PyObject *  self,
PyObject *  value,
void *  closure 
)
static

◆ staticCallback_setParameters()

int CommandPy::staticCallback_setParameters ( PyObject *  self,
PyObject *  value,
void *  closure 
)
static

◆ staticCallback_setPlacement()

int CommandPy::staticCallback_setPlacement ( PyObject *  self,
PyObject *  value,
void *  closure 
)
static

◆ staticCallback_toGCode()

PyObject * CommandPy::staticCallback_toGCode ( PyObject *  self,
PyObject *  args 
)
static

◆ staticCallback_transform()

◆ toGCode()

PyObject * CommandPy::toGCode ( PyObject *  args)

implementer for the toGCode() method

References getCommandPtr().

Referenced by staticCallback_toGCode().

◆ transform()

PyObject * CommandPy::transform ( PyObject *  args)

Member Data Documentation

◆ GetterSetter

PyGetSetDef CommandPy::GetterSetter
static
Initial value:
= {
{"Name",
"The name of the command",
NULL
},
{"Parameters",
"The parameters of the command",
NULL
},
{"Placement",
"The coordinates of the endpoint of the command",
NULL
},
{NULL, NULL, NULL, NULL, NULL}
}

Attribute structure of CommandPy.

◆ Methods

PyMethodDef CommandPy::Methods
static
Initial value:
= {
{"toGCode",
reinterpret_cast<PyCFunction>( staticCallback_toGCode ),
METH_VARARGS,
"toGCode(): returns a GCode representation of the command"
},
{"setFromGCode",
reinterpret_cast<PyCFunction>( staticCallback_setFromGCode ),
METH_VARARGS,
"toGCode(): returns a GCode representation of the command"
},
{"transform",
reinterpret_cast<PyCFunction>( staticCallback_transform ),
METH_VARARGS,
"transform(Placement): returns a copy of this command transformed by the given placement"
},
{NULL, NULL, 0, NULL}
}

Methods structure of CommandPy.

◆ Type


The documentation for this class was generated from the following files:
  • build/webdoc/src/Mod/Path/App/CommandPy.h
  • src/Mod/Path/App/CommandPyImp.cpp
  • build/webdoc/src/Mod/Path/App/CommandPy.cpp
static int staticCallback_setParameters(PyObject *self, PyObject *value, void *closure)
setter callback for the Parameters attribute
Definition: CommandPy.cpp:433
static PyObject * staticCallback_transform(PyObject *self, PyObject *args)
callback for the transform() method
Definition: CommandPy.cpp:288
static PyObject * staticCallback_toGCode(PyObject *self, PyObject *args)
callback for the toGCode() method
Definition: CommandPy.cpp:129
static int staticCallback_setName(PyObject *self, PyObject *value, void *closure)
setter callback for the Name attribute
Definition: CommandPy.cpp:389
static PyObject * staticCallback_setFromGCode(PyObject *self, PyObject *args)
callback for the setFromGCode() method
Definition: CommandPy.cpp:205
static PyObject * staticCallback_getName(PyObject *self, void *closure)
getter callback for the Name attribute
Definition: CommandPy.cpp:371
static PyObject * staticCallback_getPlacement(PyObject *self, void *closure)
getter callback for the Placement attribute
Definition: CommandPy.cpp:459
static PyObject * staticCallback_getParameters(PyObject *self, void *closure)
getter callback for the Parameters attribute
Definition: CommandPy.cpp:415
static int staticCallback_setPlacement(PyObject *self, PyObject *value, void *closure)
setter callback for the Placement attribute
Definition: CommandPy.cpp:477