The python export class for Persistence. More...

#include <PersistencePy.h>

Public Types

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

virtual PyTypeObject * GetType (void)
 
 PersistencePy (Persistence *pcObject, PyTypeObject *T=&Type)
 
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::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::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 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

 ~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 * dumpContent (PyObject *args, PyObject *kwd)
 implementer for the dumpContent() method More...
 
PyObject * restoreContent (PyObject *args)
 implementer for the restoreContent() method More...
 
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...
 

callbacks and implementers for the python object attributes

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...
 
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...
 

Additional Inherited Members

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

Detailed Description

The python export class for Persistence.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~PersistencePy()

PersistencePy::~PersistencePy ( )
protected

◆ PersistencePy()

PersistencePy::PersistencePy ( Persistence *  pcObject,
PyTypeObject *  T = &Type 
)

Member Function Documentation

◆ dumpContent()

PyObject * PersistencePy::dumpContent ( PyObject *  args,
PyObject *  kwd 
)

implementer for the dumpContent() method

References Base::Persistence::dumpToStream(), and getPersistencePtr().

Referenced by staticCallback_dumpContent().

◆ getContent()

Py::String PersistencePy::getContent ( void  ) const

◆ getCustomAttributes()

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

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

◆ getMemSize()

Py::Int PersistencePy::getMemSize ( void  ) const

getter for the MemSize attribute

References getPersistencePtr().

Referenced by staticCallback_getMemSize().

◆ getPersistencePtr()

Persistence * PersistencePy::getPersistencePtr ( void  ) const

getter for the object handled by this class

Referenced by dumpContent(), getContent(), getMemSize(), and restoreContent().

◆ GetType()

virtual PyTypeObject* Base::PersistencePy::GetType ( void  )
virtual

Reimplemented from Base::BaseClassPy.

Reimplemented in Gui::ViewProviderLinkPy, TechDraw::DrawTilePy, TechDraw::DrawTileWeldPy, TechDraw::DrawViewDimExtentPy, TechDraw::DrawWeldSymbolPy, Data::ComplexGeoDataPy, App::DocumentObjectGroupPy, App::DocumentObjectPy, App::DocumentPy, App::ExtensionContainerPy, App::GeoFeaturePy, App::PartPy, App::PropertyContainerPy, Gui::DocumentPy, Gui::ViewProviderDocumentObjectPy, Gui::ViewProviderPy, Fem::FemMeshPy, Fem::FemPostPipelinePy, FemGui::ViewProviderFemMeshPy, Mesh::MeshFeaturePy, Mesh::MeshPy, MeshGui::ViewProviderMeshPy, Part::BodyBasePy, Part::Part2DObjectPy, Part::PartFeaturePy, Part::TopoShapeCompoundPy, Part::TopoShapeCompSolidPy, Part::TopoShapeEdgePy, Part::TopoShapeFacePy, Part::TopoShapePy, Part::TopoShapeShellPy, Part::TopoShapeSolidPy, Part::TopoShapeVertexPy, Part::TopoShapeWirePy, PartDesign::BodyPy, PartDesign::FeaturePy, PartDesignGui::ViewProviderPy, Path::CommandPy, Path::FeatureAreaPy, Path::FeaturePathCompoundPy, Path::PathPy, Path::ToolPy, Path::TooltablePy, Points::PointsPy, Robot::Robot6AxisPy, Robot::RobotObjectPy, Robot::TrajectoryPy, Robot::WaypointPy, Sketcher::ConstraintPy, Sketcher::SketchObjectPy, Sketcher::SketchObjectSFPy, Sketcher::SketchPy, Spreadsheet::PropertyColumnWidthsPy, Spreadsheet::PropertyRowHeightsPy, Spreadsheet::PropertySheetPy, Spreadsheet::SheetPy, TechDraw::DrawGeomHatchPy, TechDraw::DrawHatchPy, TechDraw::DrawLeaderLinePy, TechDraw::DrawPagePy, TechDraw::DrawParametricTemplatePy, TechDraw::DrawProjGroupItemPy, TechDraw::DrawProjGroupPy, TechDraw::DrawRichAnnoPy, TechDraw::DrawSVGTemplatePy, TechDraw::DrawTemplatePy, TechDraw::DrawViewAnnotationPy, TechDraw::DrawViewClipPy, TechDraw::DrawViewCollectionPy, TechDraw::DrawViewDimensionPy, TechDraw::DrawViewPartPy, TechDraw::DrawViewPy, and TechDraw::DrawViewSymbolPy.

◆ PyInit()

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

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

Reimplemented from Base::BaseClassPy.

Reimplemented in Gui::ViewProviderLinkPy, TechDraw::DrawTilePy, TechDraw::DrawTileWeldPy, TechDraw::DrawViewDimExtentPy, TechDraw::DrawWeldSymbolPy, Data::ComplexGeoDataPy, App::DocumentObjectGroupPy, App::DocumentObjectPy, App::DocumentPy, App::ExtensionContainerPy, App::GeoFeaturePy, App::PartPy, App::PropertyContainerPy, Gui::DocumentPy, Gui::ViewProviderDocumentObjectPy, Gui::ViewProviderPy, Fem::FemMeshPy, Fem::FemPostPipelinePy, FemGui::ViewProviderFemMeshPy, Mesh::MeshFeaturePy, Mesh::MeshPy, MeshGui::ViewProviderMeshPy, Part::BodyBasePy, Part::Part2DObjectPy, Part::PartFeaturePy, Part::TopoShapeCompoundPy, Part::TopoShapeCompSolidPy, Part::TopoShapeEdgePy, Part::TopoShapeFacePy, Part::TopoShapePy, Part::TopoShapeShellPy, Part::TopoShapeSolidPy, Part::TopoShapeVertexPy, Part::TopoShapeWirePy, PartDesign::BodyPy, PartDesign::FeaturePy, PartDesignGui::ViewProviderPy, Path::CommandPy, Path::FeatureAreaPy, Path::FeaturePathCompoundPy, Path::PathPy, Path::ToolPy, Path::TooltablePy, Points::PointsPy, Robot::Robot6AxisPy, Robot::RobotObjectPy, Robot::TrajectoryPy, Robot::WaypointPy, Sketcher::ConstraintPy, Sketcher::SketchObjectPy, Sketcher::SketchObjectSFPy, Sketcher::SketchPy, Spreadsheet::PropertyColumnWidthsPy, Spreadsheet::PropertyRowHeightsPy, Spreadsheet::PropertySheetPy, Spreadsheet::SheetPy, TechDraw::DrawGeomHatchPy, TechDraw::DrawHatchPy, TechDraw::DrawLeaderLinePy, TechDraw::DrawPagePy, TechDraw::DrawParametricTemplatePy, TechDraw::DrawProjGroupItemPy, TechDraw::DrawProjGroupPy, TechDraw::DrawRichAnnoPy, TechDraw::DrawSVGTemplatePy, TechDraw::DrawTemplatePy, TechDraw::DrawViewAnnotationPy, TechDraw::DrawViewClipPy, TechDraw::DrawViewCollectionPy, TechDraw::DrawViewDimensionPy, TechDraw::DrawViewPartPy, TechDraw::DrawViewPy, and TechDraw::DrawViewSymbolPy.

◆ PyMake()

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

◆ representation()

◆ restoreContent()

PyObject * PersistencePy::restoreContent ( PyObject *  args)

◆ setCustomAttributes()

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

setter for special attributes (e.g.

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

◆ staticCallback_dumpContent()

PyObject * PersistencePy::staticCallback_dumpContent ( PyObject *  self,
PyObject *  args,
PyObject *  kwd 
)
static

◆ staticCallback_getContent()

PyObject * PersistencePy::staticCallback_getContent ( PyObject *  self,
void *  closure 
)
static

getter callback for the Content attribute

References Base::BaseExceptionFreeCADError, getContent(), and Base::PyObjectBase::isValid().

◆ staticCallback_getMemSize()

PyObject * PersistencePy::staticCallback_getMemSize ( PyObject *  self,
void *  closure 
)
static

getter callback for the MemSize attribute

References Base::BaseExceptionFreeCADError, getMemSize(), and Base::PyObjectBase::isValid().

◆ staticCallback_restoreContent()

◆ staticCallback_setContent()

int PersistencePy::staticCallback_setContent ( PyObject *  self,
PyObject *  value,
void *  closure 
)
static

setter callback for the Content attribute

References Base::PyObjectBase::isValid().

◆ staticCallback_setMemSize()

int PersistencePy::staticCallback_setMemSize ( PyObject *  self,
PyObject *  value,
void *  closure 
)
static

setter callback for the MemSize attribute

References Base::PyObjectBase::isValid().

Member Data Documentation

◆ GetterSetter

PyGetSetDef PersistencePy::GetterSetter
static
Initial value:
= {
{"Content",
"Content of the object in XML representation",
NULL
},
{"MemSize",
"Memory size of the object in byte",
NULL
},
{NULL, NULL, NULL, NULL, NULL}
}

Attribute structure of PersistencePy.

◆ Methods

PyMethodDef PersistencePy::Methods
static
Initial value:
= {
{"dumpContent",
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_dumpContent )),
METH_VARARGS|METH_KEYWORDS,
"Dumps the content of the object, both the XML representation as well as the additional datafiles \nrequired, into a byte representation. It will be returned as byte array.\ndumpContent() -- returns a byte array with full content\ndumpContent(Compression=1-9) -- Sets the data compression from 0 (no) to 9 (max)\n "
},
{"restoreContent",
reinterpret_cast<PyCFunction>( staticCallback_restoreContent ),
METH_VARARGS,
"Restore the content of the object from a byte representation as stored by \"dumpContent\".\nIt could be restored from any python object implementing the buffer protocol.\nrestoreContent(buffer) -- restores from the given byte array\n "
},
{NULL, NULL, 0, NULL}
}

Methods structure of PersistencePy.

◆ Type


The documentation for this class was generated from the following files:
  • build/webdoc/src/Base/PersistencePy.h
  • src/Base/PersistencePyImp.cpp
  • build/webdoc/src/Base/PersistencePy.cpp
static PyObject * staticCallback_dumpContent(PyObject *self, PyObject *args, PyObject *kwd)
callback for the dumpContent() method
Definition: PersistencePy.cpp:115
static PyObject * staticCallback_getContent(PyObject *self, void *closure)
getter callback for the Content attribute
Definition: PersistencePy.cpp:274
static int staticCallback_setMemSize(PyObject *self, PyObject *value, void *closure)
setter callback for the MemSize attribute
Definition: PersistencePy.cpp:324
static PyObject * staticCallback_restoreContent(PyObject *self, PyObject *args)
callback for the restoreContent() method
Definition: PersistencePy.cpp:191
static int staticCallback_setContent(PyObject *self, PyObject *value, void *closure)
setter callback for the Content attribute
Definition: PersistencePy.cpp:292
static PyObject * staticCallback_getMemSize(PyObject *self, void *closure)
getter callback for the MemSize attribute
Definition: PersistencePy.cpp:306