The python export class for Quantity. More...
#include <QuantityPy.h>
Public Types | |
typedef Quantity * | 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... | |
QuantityPy (Quantity *pcObject, PyTypeObject *T=&Type) | |
std::string | representation (void) const |
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 QuantityPy. More... | |
static PyMethodDef | Methods [] |
Methods structure of QuantityPy. More... | |
static PyNumberMethods | Number [] |
static PyTypeObject | Type |
Type structure of QuantityPy. More... | |
Static Public Attributes inherited from Base::PyObjectBase | |
static PyMethodDef | Methods [] |
static PyTypeObject | Type |
Py_Header struct from python.h. More... | |
Protected Member Functions | |
~QuantityPy () | |
Protected Member Functions inherited from Base::PyObjectBase | |
virtual | ~PyObjectBase () |
destructor More... | |
callbacks and implementers for the python object methods | |
static PyObject * | staticCallback_getUserPreferred (PyObject *self, PyObject *args) |
callback for the getUserPreferred() method More... | |
static PyObject * | staticCallback_getValueAs (PyObject *self, PyObject *args) |
callback for the getValueAs() method More... | |
PyObject * | getUserPreferred (PyObject *args) |
implementer for the getUserPreferred() method More... | |
PyObject * | getValueAs (PyObject *args) |
implementer for the getValueAs() method More... | |
callbacks and implementers for the python object attributes | |
static PyObject * | staticCallback_getValue (PyObject *self, void *closure) |
getter callback for the Value attribute More... | |
static int | staticCallback_setValue (PyObject *self, PyObject *value, void *closure) |
setter callback for the Value attribute More... | |
static PyObject * | staticCallback_getUnit (PyObject *self, void *closure) |
getter callback for the Unit attribute More... | |
static int | staticCallback_setUnit (PyObject *self, PyObject *value, void *closure) |
setter callback for the Unit attribute More... | |
static PyObject * | staticCallback_getUserString (PyObject *self, void *closure) |
getter callback for the UserString attribute More... | |
static int | staticCallback_setUserString (PyObject *self, PyObject *value, void *closure) |
setter callback for the UserString attribute More... | |
static PyObject * | staticCallback_getFormat (PyObject *self, void *closure) |
getter callback for the Format attribute More... | |
static int | staticCallback_setFormat (PyObject *self, PyObject *value, void *closure) |
setter callback for the Format attribute More... | |
Py::Float | getValue (void) const |
getter for the Value attribute More... | |
void | setValue (Py::Float arg) |
setter for the Value attribute More... | |
Py::Object | getUnit (void) const |
getter for the Unit attribute More... | |
void | setUnit (Py::Object arg) |
setter for the Unit attribute More... | |
Py::String | getUserString (void) const |
getter for the UserString attribute More... | |
Py::Dict | getFormat (void) const |
getter for the Format attribute More... | |
void | setFormat (Py::Dict arg) |
setter for the Format 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... | |
Quantity * | getQuantityPtr (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 Quantity.
Member Typedef Documentation
◆ PointerType
typedef Quantity* Base::QuantityPy::PointerType |
Constructor & Destructor Documentation
◆ ~QuantityPy()
|
protected |
◆ QuantityPy()
Member Function Documentation
◆ getCustomAttributes()
PyObject * QuantityPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
References Base::Quantity::AngMinute, Base::Quantity::AngSecond, Base::Quantity::mTorr, Base::Quantity::PoundForce, QuantityPy(), Base::Quantity::Torr, and Base::Quantity::yTorr.
◆ getFormat()
Py::Dict QuantityPy::getFormat | ( | void | ) | const |
getter for the Format attribute
References Base::Quantity::getFormat(), and getQuantityPtr().
Referenced by staticCallback_getFormat().
◆ getQuantityPtr()
Quantity * QuantityPy::getQuantityPtr | ( | void | ) | const |
getter for the object handled by this class
Referenced by App::expressionFromPy(), getFormat(), getUnit(), getUserPreferred(), getUserString(), getValue(), getValueAs(), number_absolute_handler(), number_add_handler(), number_divide_handler(), number_multiply_handler(), number_negative_handler(), number_nonzero_handler(), number_positive_handler(), number_power_handler(), number_remainder_handler(), number_subtract_handler(), PyInit(), App::pyObjectToAny(), App::pyToQuantity(), representation(), richCompare(), setFormat(), setUnit(), and setValue().
◆ GetType()
|
virtual |
Reimplemented from Base::PyObjectBase.
◆ getUnit()
Py::Object QuantityPy::getUnit | ( | void | ) | const |
getter for the Unit attribute
References getQuantityPtr().
Referenced by getValueAs(), Base::UnitPy::PyInit(), and staticCallback_getUnit().
◆ getUserPreferred()
implementer for the getUserPreferred() method
References getQuantityPtr(), and Base::Quantity::getUserString().
Referenced by staticCallback_getUserPreferred().
◆ getUserString()
Py::String QuantityPy::getUserString | ( | void | ) | const |
getter for the UserString attribute
References getQuantityPtr().
Referenced by staticCallback_getUserString().
◆ getValue()
Py::Float QuantityPy::getValue | ( | void | ) | const |
getter for the Value attribute
References getQuantityPtr().
Referenced by staticCallback_getValue().
◆ getValueAs()
implementer for the getValueAs() method
References getQuantityPtr(), getUnit(), Base::Quantity::getUnit(), Base::Quantity::isQuantity(), Base::Quantity::isValid(), Base::Quantity::parse(), QuantityPy(), Base::Quantity::setInvalid(), Base::Quantity::setUnit(), Base::Quantity::setValue(), Type, and Base::UnitPy::Type.
Referenced by Base::MatrixPy::rotateX(), Base::MatrixPy::rotateY(), Base::MatrixPy::rotateZ(), and staticCallback_getValueAs().
◆ number_absolute_handler()
callback for the number_absolute_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ number_add_handler()
callback for the number_add_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ 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
References getQuantityPtr(), QuantityPy(), and Type.
◆ number_divmod_handler()
callback for the number_divmod_handler
◆ number_float_handler()
callback for the number_float_handler
References Type.
◆ number_hex_handler()
callback for the number_hex_handler
◆ number_int_handler()
callback for the number_int_handler
References Type.
◆ number_invert_handler()
callback for the number_invert_handler
◆ number_long_handler()
callback for the number_long_handler
References Type.
◆ number_lshift_handler()
callback for the number_lshift_handler
◆ number_multiply_handler()
callback for the number_multiply_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ number_negative_handler()
callback for the number_negative_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ number_nonzero_handler()
|
static |
callback for the number_nonzero_handler
References getQuantityPtr(), Base::Quantity::getValue(), and Type.
◆ number_oct_handler()
callback for the number_oct_handler
◆ number_or_handler()
callback for the number_or_handler
◆ number_positive_handler()
callback for the number_positive_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ number_power_handler()
|
static |
callback for the number_power_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ number_remainder_handler()
callback for the number_remainder_handler
References getQuantityPtr(), Base::Quantity::getValue(), QuantityPy(), and Type.
◆ number_rshift_handler()
callback for the number_rshift_handler
◆ number_subtract_handler()
callback for the number_subtract_handler
References getQuantityPtr(), QuantityPy(), and Type.
◆ 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 getQuantityPtr(), Base::Quantity::parse(), Base::UnitPy::Type, and Type.
◆ PyMake()
References QuantityPy().
◆ representation()
std::string QuantityPy::representation | ( | void | ) | const |
References getQuantityPtr(), Base::Unit::getString(), Base::Quantity::getUnit(), and Base::Quantity::getValue().
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 getQuantityPtr(), and Type.
◆ setCustomAttributes()
int QuantityPy::setCustomAttributes | ( | const char * | attr, |
PyObject * | obj | ||
) |
setter for special attributes (e.g.
dynamic ones) Output: Success=1, Failure=-1, Ignore=0
◆ setFormat()
void QuantityPy::setFormat | ( | Py::Dict | arg | ) |
setter for the Format attribute
References Base::Quantity::getFormat(), getQuantityPtr(), Base::Quantity::setFormat(), and Base::QuantityFormat::toFormat().
Referenced by PathScripts.PostUtils.GCodeHighlighter::highlightBlock(), PathScripts.PathInspect.GCodeHighlighter::highlightBlock(), and staticCallback_setFormat().
◆ setUnit()
void QuantityPy::setUnit | ( | Py::Object | arg | ) |
setter for the Unit attribute
References getQuantityPtr(), PyType_Object::o, Base::Quantity::setUnit(), and Base::UnitPy::Type.
Referenced by staticCallback_setUnit().
◆ setValue()
void QuantityPy::setValue | ( | Py::Float | arg | ) |
setter for the Value attribute
References getQuantityPtr(), and Base::Quantity::setValue().
Referenced by staticCallback_setValue().
◆ staticCallback_getFormat()
getter callback for the Format attribute
References Base::BaseExceptionFreeCADError, getFormat(), and Base::PyObjectBase::isValid().
◆ staticCallback_getUnit()
getter callback for the Unit attribute
References Base::BaseExceptionFreeCADError, getUnit(), and Base::PyObjectBase::isValid().
◆ staticCallback_getUserPreferred()
callback for the getUserPreferred() method
References Base::BaseExceptionFreeCADError, Base::Console(), Base::ConsoleSingleton::Error(), getUserPreferred(), and Base::PyObjectBase::isValid().
◆ staticCallback_getUserString()
getter callback for the UserString attribute
References Base::BaseExceptionFreeCADError, getUserString(), and Base::PyObjectBase::isValid().
◆ staticCallback_getValue()
getter callback for the Value attribute
References Base::BaseExceptionFreeCADError, getValue(), and Base::PyObjectBase::isValid().
◆ staticCallback_getValueAs()
callback for the getValueAs() method
References Base::BaseExceptionFreeCADError, Base::Console(), Base::ConsoleSingleton::Error(), getValueAs(), and Base::PyObjectBase::isValid().
◆ staticCallback_setFormat()
|
static |
setter callback for the Format attribute
References Base::BaseExceptionFreeCADError, Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and setFormat().
◆ staticCallback_setUnit()
setter callback for the Unit attribute
References Base::BaseExceptionFreeCADError, Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and setUnit().
◆ staticCallback_setUserString()
|
static |
setter callback for the UserString attribute
References Base::PyObjectBase::isValid().
◆ staticCallback_setValue()
|
static |
setter callback for the Value attribute
References Base::BaseExceptionFreeCADError, Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and setValue().
Member Data Documentation
◆ GetterSetter
|
static |
Attribute structure of QuantityPy.
◆ Methods
|
static |
Methods structure of QuantityPy.
◆ Number
|
static |
◆ Type
|
static |
Type structure of QuantityPy.
Referenced by ArchPanel.CommandPanelSheet::Activated(), ArchStructure.StructSelectionObserver::addSelection(), ArchSite.Compass::buildCoordinates(), ArchComponent.Component::execute(), DraftLayer.LayerContainer::execute(), App::expressionFromPy(), getValueAs(), ArchSchedule.CommandArchSchedule::IsActive(), ArchAxis.CommandArchGrid::IsActive(), number_absolute_handler(), number_add_handler(), number_divide_handler(), number_float_handler(), number_int_handler(), number_long_handler(), number_multiply_handler(), number_negative_handler(), number_nonzero_handler(), number_positive_handler(), number_power_handler(), number_remainder_handler(), number_subtract_handler(), draftobjects.draft_annotation.DraftAnnotation::onDocumentRestored(), Sketcher::ConstraintPy::PyInit(), PyInit(), Base::UnitPy::PyInit(), App::pyObjectToAny(), App::pyToQuantity(), richCompare(), Base::MatrixPy::rotateX(), Base::MatrixPy::rotateY(), Base::MatrixPy::rotateZ(), Sketcher::SketchObjectPy::setDatum(), ArchReference.ArchReference::setProperties(), DraftLayer.Layer::setProperties(), and Base::UnitsApi::sSchemaTranslate().
The documentation for this class was generated from the following files:
- build/webdoc/src/Base/QuantityPy.h
- src/Base/QuantityPyImp.cpp
- build/webdoc/src/Base/QuantityPy.cpp