The python export class for Unit. More...
#include <UnitPy.h>
Public Types | |
typedef Unit * | 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) |
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 |
UnitPy (Unit *pcObject, PyTypeObject *T=&Type) | |
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 PyObject * | richCompare (PyObject *v, PyObject *w, int op) |
callbacks and implementers for the python object number protocol | |
static PyObject * | number_add_handler (PyObject *self, PyObject *other) |
callback for the number_add_handler More... | |
static PyObject * | number_subtract_handler (PyObject *self, PyObject *other) |
callback for the number_subtract_handler More... | |
static PyObject * | number_multiply_handler (PyObject *self, PyObject *other) |
callback for the number_multiply_handler More... | |
static PyObject * | number_divide_handler (PyObject *self, PyObject *other) |
callback for the number_divide_handler More... | |
static PyObject * | number_remainder_handler (PyObject *self, PyObject *other) |
callback for the number_remainder_handler More... | |
static PyObject * | number_divmod_handler (PyObject *self, PyObject *other) |
callback for the number_divmod_handler More... | |
static PyObject * | number_power_handler (PyObject *self, PyObject *other, PyObject *modulo) |
callback for the number_power_handler More... | |
static PyObject * | number_negative_handler (PyObject *self) |
callback for the number_negative_handler More... | |
static PyObject * | number_positive_handler (PyObject *self) |
callback for the number_positive_handler More... | |
static PyObject * | number_absolute_handler (PyObject *self) |
callback for the number_absolute_handler More... | |
static int | number_nonzero_handler (PyObject *self) |
callback for the number_nonzero_handler More... | |
static PyObject * | number_invert_handler (PyObject *self) |
callback for the number_invert_handler More... | |
static PyObject * | number_lshift_handler (PyObject *self, PyObject *other) |
callback for the number_lshift_handler More... | |
static PyObject * | number_rshift_handler (PyObject *self, PyObject *other) |
callback for the number_rshift_handler More... | |
static PyObject * | number_and_handler (PyObject *self, PyObject *other) |
callback for the number_and_handler More... | |
static PyObject * | number_xor_handler (PyObject *self, PyObject *other) |
callback for the number_xor_handler More... | |
static PyObject * | number_or_handler (PyObject *self, PyObject *other) |
callback for the number_or_handler More... | |
static int | number_coerce_handler (PyObject **self, PyObject **other) |
callback for the number_coerce_handler More... | |
static PyObject * | number_int_handler (PyObject *self) |
callback for the number_int_handler More... | |
static PyObject * | number_long_handler (PyObject *self) |
callback for the number_long_handler More... | |
static PyObject * | number_float_handler (PyObject *self) |
callback for the number_float_handler More... | |
static PyObject * | number_oct_handler (PyObject *self) |
callback for the number_oct_handler More... | |
static PyObject * | number_hex_handler (PyObject *self) |
callback for the number_hex_handler 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 UnitPy. More... | |
static PyMethodDef | Methods [] |
Methods structure of UnitPy. More... | |
static PyNumberMethods | Number [] |
static PyTypeObject | Type |
Type structure of UnitPy. More... | |
Static Public Attributes inherited from Base::PyObjectBase | |
static PyMethodDef | Methods [] |
static PyTypeObject | Type |
Py_Header struct from python.h. More... | |
Protected Member Functions | |
~UnitPy () | |
Protected Member Functions inherited from Base::PyObjectBase | |
virtual | ~PyObjectBase () |
destructor More... | |
callbacks and implementers for the python object attributes | |
static PyObject * | staticCallback_getType (PyObject *self, void *closure) |
getter callback for the Type attribute More... | |
static int | staticCallback_setType (PyObject *self, PyObject *value, void *closure) |
setter callback for the Type attribute More... | |
static PyObject * | staticCallback_getSignature (PyObject *self, void *closure) |
getter callback for the Signature attribute More... | |
static int | staticCallback_setSignature (PyObject *self, PyObject *value, void *closure) |
setter callback for the Signature attribute More... | |
Py::String | getType (void) const |
getter for the Type attribute More... | |
Py::Tuple | getSignature (void) const |
getter for the Signature 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... | |
Unit * | getUnitPtr (void) const |
getter for the object handled by this class More... | |
Additional Inherited Members | |
Protected Attributes inherited from Base::PyObjectBase | |
std::bitset< 32 > | StatusBits |
Detailed Description
The python export class for Unit.
Member Typedef Documentation
◆ PointerType
typedef Unit* Base::UnitPy::PointerType |
Constructor & Destructor Documentation
◆ ~UnitPy()
|
protected |
◆ UnitPy()
Referenced by number_add_handler(), number_multiply_handler(), number_subtract_handler(), and PyMake().
Member Function Documentation
◆ getCustomAttributes()
PyObject * UnitPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
◆ getSignature()
Py::Tuple UnitPy::getSignature | ( | void | ) | const |
getter for the Signature attribute
References Base::UnitSignature::AmountOfSubstance, Base::UnitSignature::Angle, Base::UnitSignature::ElectricCurrent, Base::Unit::getSignature(), getUnitPtr(), Base::UnitSignature::Length, Base::UnitSignature::LuminousIntensity, Base::UnitSignature::Mass, Base::UnitSignature::ThermodynamicTemperature, and Base::UnitSignature::Time.
Referenced by staticCallback_getSignature().
◆ GetType()
|
virtual |
Reimplemented from Base::PyObjectBase.
◆ getType()
Py::String UnitPy::getType | ( | void | ) | const |
getter for the Type attribute
References getUnitPtr().
Referenced by staticCallback_getType(), PathScripts.PathToolEdit.ToolEditor::updateToolType(), and PathScripts.PathToolEdit.ToolEditor::updateUI().
◆ getUnitPtr()
Unit * UnitPy::getUnitPtr | ( | void | ) | const |
getter for the object handled by this class
Referenced by getSignature(), getType(), number_add_handler(), number_multiply_handler(), number_subtract_handler(), PyInit(), representation(), richCompare(), and App::PropertyQuantity::setPyObject().
◆ number_absolute_handler()
callback for the number_absolute_handler
◆ number_add_handler()
callback for the number_add_handler
References getUnitPtr(), Type, and UnitPy().
◆ number_and_handler()
callback for the number_and_handler
◆ number_coerce_handler()
callback for the number_coerce_handler
◆ number_divide_handler()
callback for the number_divide_handler
◆ number_divmod_handler()
callback for the number_divmod_handler
◆ number_float_handler()
callback for the number_float_handler
◆ number_hex_handler()
◆ number_int_handler()
◆ number_invert_handler()
callback for the number_invert_handler
◆ number_long_handler()
callback for the number_long_handler
◆ number_lshift_handler()
callback for the number_lshift_handler
◆ number_multiply_handler()
callback for the number_multiply_handler
References getUnitPtr(), Type, and UnitPy().
◆ number_negative_handler()
callback for the number_negative_handler
◆ number_nonzero_handler()
|
static |
callback for the number_nonzero_handler
◆ number_oct_handler()
◆ number_or_handler()
callback for the number_or_handler
◆ number_positive_handler()
callback for the number_positive_handler
◆ number_power_handler()
|
static |
callback for the number_power_handler
◆ number_remainder_handler()
callback for the number_remainder_handler
◆ number_rshift_handler()
callback for the number_rshift_handler
◆ number_subtract_handler()
callback for the number_subtract_handler
References getUnitPtr(), Type, and UnitPy().
◆ number_xor_handler()
callback for the number_xor_handler
◆ PyInit()
PyInit method Override this method to initialize a newly created instance of the class (Constructor)
Reimplemented from Base::PyObjectBase.
References Base::QuantityPy::getUnit(), Base::Quantity::getUnit(), getUnitPtr(), Base::Quantity::parse(), Base::QuantityPy::Type, and Type.
◆ PyMake()
References UnitPy().
◆ representation()
std::string UnitPy::representation | ( | void | ) | const |
References Base::UnitSignature::AmountOfSubstance, Base::UnitSignature::Angle, Base::UnitSignature::ElectricCurrent, Base::Unit::getSignature(), Base::Unit::getString(), Base::Unit::getTypeString(), getUnitPtr(), Base::UnitSignature::Length, Base::UnitSignature::LuminousIntensity, Base::UnitSignature::Mass, Base::UnitSignature::ThermodynamicTemperature, and Base::UnitSignature::Time.
Referenced by config_control_design.pcurve::wr1(), config_control_design.degenerate_pcurve::wr1(), automotive_design.motion_link_relationship::wr1(), automotive_design.pcurve::wr1(), automotive_design.degenerate_pcurve::wr1(), config_control_design.pcurve::wr2(), config_control_design.degenerate_pcurve::wr2(), automotive_design.pcurve::wr2(), and automotive_design.degenerate_pcurve::wr2().
◆ richCompare()
References getUnitPtr(), and Type.
◆ setCustomAttributes()
int UnitPy::setCustomAttributes | ( | const char * | attr, |
PyObject * | obj | ||
) |
setter for special attributes (e.g.
dynamic ones) Output: Success=1, Failure=-1, Ignore=0
◆ staticCallback_getSignature()
getter callback for the Signature attribute
References Base::BaseExceptionFreeCADError, getSignature(), and Base::PyObjectBase::isValid().
◆ staticCallback_getType()
getter callback for the Type attribute
References Base::BaseExceptionFreeCADError, getType(), and Base::PyObjectBase::isValid().
◆ staticCallback_setSignature()
|
static |
setter callback for the Signature attribute
References Base::PyObjectBase::isValid().
◆ staticCallback_setType()
setter callback for the Type attribute
References Base::PyObjectBase::isValid().
Member Data Documentation
◆ GetterSetter
|
static |
Attribute structure of UnitPy.
◆ Methods
|
static |
Methods structure of UnitPy.
◆ Number
|
static |
◆ Type
|
static |
Referenced by ArchPanel.CommandPanelSheet::Activated(), ArchStructure.StructSelectionObserver::addSelection(), ArchSite.Compass::buildCoordinates(), ArchComponent.Component::execute(), DraftLayer.LayerContainer::execute(), Base::QuantityPy::getValueAs(), ArchSchedule.CommandArchSchedule::IsActive(), ArchAxis.CommandArchGrid::IsActive(), number_add_handler(), number_multiply_handler(), number_subtract_handler(), draftobjects.draft_annotation.DraftAnnotation::onDocumentRestored(), PyInit(), Base::QuantityPy::PyInit(), richCompare(), ArchReference.ArchReference::setProperties(), DraftLayer.Layer::setProperties(), and Base::QuantityPy::setUnit().
The documentation for this class was generated from the following files:
- build/webdoc/src/Base/UnitPy.h
- src/Base/UnitPyImp.cpp
- build/webdoc/src/Base/UnitPy.cpp