Py::Object Class Reference

#include <Objects.hxx>

Inheritance diagram for Py::Object:
Py::Boolean Py::Callable Py::Char Py::Complex Py::ExtensionExceptionType Py::ExtensionObject< T > Py::Float Py::GeometryT< T, PyT, valuePtr > Py::Int Py::Long Py::MapBase< T > Py::Module Py::PythonClassObject< T > Py::SeqBase< T > Py::Type Py::Vector Py::SeqBase< Char >

List of all members.

Public Member Functions

virtual bool accepts (PyObject *pyob) const
std::string as_string () const
Object callMemberFunction (const std::string &function_name, const Tuple &args, const Dict &kw) const
Object callMemberFunction (const std::string &function_name, const Tuple &args) const
Object callMemberFunction (const std::string &function_name) const
void decrement_reference_count ()
void delAttr (const std::string &s)
void delItem (const Object &key)
List dir () const
Object getAttr (const std::string &s) const
Object getItem (const Object &key) const
bool hasAttr (const std::string &s) const
long hashValue () const
void increment_reference_count ()
bool is (const Object &other) const
bool is (PyObject *pother) const
bool isBoolean () const
bool isCallable () const
bool isDict () const
bool isInstance () const
bool isList () const
bool isMapping () const
bool isNone () const
bool isNumeric () const
bool isSequence () const
bool isString () const
bool isTrue () const
bool isTuple () const
bool isType (const Type &t) const
bool isUnicode () const
 Object (const Object &ob)
 Object (PyObject *pyob=Py::_None(), bool owned=false)
bool operator!= (const Object &o2) const
PyObjectoperator* () const
bool operator< (const Object &o2) const
bool operator<= (const Object &o2) const
Objectoperator= (PyObject *rhsp)
Objectoperator= (const Object &rhs)
bool operator== (const Object &o2) const
bool operator> (const Object &o2) const
bool operator>= (const Object &o2) const
PyObjectptr () const
Py_ssize_t reference_count () const
String repr () const
void setAttr (const std::string &s, const Object &value)
String str () const
Type type () const
virtual ~Object ()

Protected Member Functions

void release ()
void set (PyObject *pyob, bool owned=false)
void validate ()

Detailed Description

Definition at line 144 of file Python2/Objects.hxx.


Constructor & Destructor Documentation

Py::Object::Object ( PyObject pyob = Py::_None(),
bool  owned = false 
) [inline, explicit]

Definition at line 177 of file Python2/Objects.hxx.

References Py::_XINCREF(), draftTools::p, and validate.

Referenced by Py::String::decode().

Py::Object::Object ( const Object ob  )  [inline]

Definition at line 187 of file Python2/Objects.hxx.

References Py::_XINCREF(), draftTools::p, and validate.

virtual Py::Object::~Object (  )  [inline, virtual]

Definition at line 208 of file Python2/Objects.hxx.


Member Function Documentation

virtual bool Py::Object::accepts ( PyObject pyob  )  const [inline, virtual]
std::string Py::Object::as_string (  )  const

Definition at line 58 of file Python2/cxxsupport.cxx.

References str().

Referenced by Base::Uuid::CreateUuid().

Object Py::Object::callMemberFunction ( const std::string &  function_name,
const Tuple args,
const Dict kw 
) const [inline]

Definition at line 3305 of file Python2/Objects.hxx.

References Py::Callable::apply(), and getAttr().

Object Py::Object::callMemberFunction ( const std::string &  function_name,
const Tuple args 
) const [inline]

Definition at line 3299 of file Python2/Objects.hxx.

References Py::Callable::apply(), and getAttr().

Object Py::Object::callMemberFunction ( const std::string &  function_name  )  const [inline]

Definition at line 3292 of file Python2/Objects.hxx.

References Py::Callable::apply(), and getAttr().

void Py::Object::decrement_reference_count (  )  [inline]

Definition at line 225 of file Python2/Objects.hxx.

References Py::_XDECREF(), and draftTools::p.

void Py::Object::delAttr ( const std::string &  s  )  [inline]

Definition at line 377 of file Python2/Objects.hxx.

References draftTools::p.

void Py::Object::delItem ( const Object key  )  [inline]

Definition at line 386 of file Python2/Objects.hxx.

List Py::Object::dir (  )  const

Definition at line 63 of file Python2/cxxsupport.cxx.

Object Py::Object::getAttr ( const std::string &  s  )  const [inline]

Definition at line 268 of file Python2/Objects.hxx.

References draftTools::p.

Referenced by Gui::TaskView::TaskDialogPython::accept(), Gui::Application::activateWorkbench(), Fem::FemMeshPy::addHypothesis(), App::DocumentPy::addObject(), Gui::ViewProviderPythonFeatureImp::attach(), callMemberFunction(), Gui::ViewProviderPythonFeatureImp::claimChildren(), Gui::TaskView::TaskDialogPython::clicked(), Base::Uuid::CreateUuid(), App::FeaturePythonImp::execute(), App::PropertyPythonObject::fromString(), Gui::ViewProviderPythonFeatureImp::getDefaultDisplayMode(), Gui::ViewProviderPythonFeatureImp::getDisplayModes(), Gui::ViewProviderPythonFeatureImp::getIcon(), Gui::TaskView::TaskDialogPython::getStandardButtons(), getSWIGVersionFromModule(), App::DocumentObjectPy::getViewObject(), Gui::TaskView::TaskDialogPython::helpRequested(), initCompleteGui(), Gui::PythonCommand::isActive(), Gui::TaskView::TaskDialogPython::isAllowedAlterDocument(), Gui::TaskView::TaskDialogPython::isAllowedAlterSelection(), Gui::TaskView::TaskDialogPython::isAllowedAlterView(), Gui::TaskView::TaskDialogPython::needsFullSpace(), Gui::ViewProviderPythonFeatureImp::onChanged(), App::FeaturePythonImp::onChanged(), Gui::TaskView::TaskDialogPython::open(), Gui::TaskView::TaskDialogPython::reject(), Gui::Application::sAddWorkbenchHandler(), Gui::ViewProviderPythonFeatureImp::setDisplayMode(), Gui::ViewProviderPythonFeatureImp::setEdit(), Gui::Application::setupContextMenu(), Gui::TaskView::TaskWatcherPython::shouldShow(), Gui::TaskView::TaskDialogPython::TaskDialogPython(), Gui::TaskView::TaskWatcherPython::TaskWatcherPython(), App::PropertyPythonObject::toString(), Gui::ViewProviderPythonFeatureImp::unsetEdit(), Gui::ViewProviderPythonFeatureImp::updateData(), Gui::Application::workbenchIcon(), Gui::Application::workbenchMenuText(), and Gui::Application::workbenchToolTip().

Object Py::Object::getItem ( const Object key  )  const [inline]

Definition at line 277 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::hasAttr ( const std::string &  s  )  const [inline]
long Py::Object::hashValue (  )  const [inline]

Definition at line 282 of file Python2/Objects.hxx.

References draftTools::p.

void Py::Object::increment_reference_count (  )  [inline]

Definition at line 220 of file Python2/Objects.hxx.

References Py::_XINCREF(), and draftTools::p.

bool Py::Object::is ( const Object other  )  const [inline]

Definition at line 298 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::is ( PyObject pother  )  const [inline]
bool Py::Object::isBoolean (  )  const [inline]

Definition at line 365 of file Python2/Objects.hxx.

References Py::_Boolean_Check(), and draftTools::p.

bool Py::Object::isCallable (  )  const [inline]

Definition at line 308 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::isDict (  )  const [inline]

Definition at line 318 of file Python2/Objects.hxx.

References Py::_Dict_Check(), and draftTools::p.

bool Py::Object::isInstance (  )  const [inline]

Definition at line 313 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::isList (  )  const [inline]

Definition at line 323 of file Python2/Objects.hxx.

References Py::_List_Check(), and draftTools::p.

bool Py::Object::isMapping (  )  const [inline]

Definition at line 328 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::isNone (  )  const [inline]

Definition at line 303 of file Python2/Objects.hxx.

References Py::_None(), and draftTools::p.

Referenced by App::DocumentPy::addObject().

bool Py::Object::isNumeric (  )  const [inline]

Definition at line 333 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::isSequence (  )  const [inline]

Definition at line 338 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::isString (  )  const [inline]
bool Py::Object::isTrue (  )  const [inline]

Definition at line 343 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::isTuple (  )  const [inline]
bool Py::Object::isType ( const Type t  )  const

Definition at line 68 of file Python2/cxxsupport.cxx.

References ptr(), and type().

Referenced by Mesh::MeshPy::crossSections(), and Robot::WaypointPy::setPos().

bool Py::Object::isUnicode (  )  const [inline]
bool Py::Object::operator!= ( const Object o2  )  const [inline]

Definition at line 402 of file Python2/Objects.hxx.

References k, and draftTools::p.

PyObject* Py::Object::operator* (  )  const [inline]

Definition at line 214 of file Python2/Objects.hxx.

References draftTools::p.

bool Py::Object::operator< ( const Object o2  )  const [inline]

Definition at line 424 of file Python2/Objects.hxx.

References k, and draftTools::p.

bool Py::Object::operator<= ( const Object o2  )  const [inline]

Definition at line 417 of file Python2/Objects.hxx.

References k, and draftTools::p.

Object& Py::Object::operator= ( PyObject rhsp  )  [inline]
Object& Py::Object::operator= ( const Object rhs  )  [inline]

Definition at line 194 of file Python2/Objects.hxx.

bool Py::Object::operator== ( const Object o2  )  const [inline]

Definition at line 395 of file Python2/Objects.hxx.

References k, and draftTools::p.

bool Py::Object::operator> ( const Object o2  )  const [inline]

Definition at line 431 of file Python2/Objects.hxx.

References k, and draftTools::p.

bool Py::Object::operator>= ( const Object o2  )  const [inline]

Definition at line 410 of file Python2/Objects.hxx.

References k, and draftTools::p.

PyObject* Py::Object::ptr (  )  const [inline]

Definition at line 233 of file Python2/Objects.hxx.

References draftTools::p.

Referenced by Gui::View3DInventorPy::addEventCallback(), Gui::View3DInventorPy::addEventCallbackPivy(), Mesh::MeshPy::addFacets(), Sandbox::DocumentProtectorPy::addObject(), Py::List::append(), Py::Callable::apply(), Py::String::as_std_string(), Py::PythonClass< PythonBaseClass >::check(), Py::PythonExtension< StdMeshers_Deflection1DPy >::check(), TestGui::UnitTestDialogPy::clearErrorList(), Py::SeqBase< Char >::concat(), Mesh::MeshPy::crossSections(), Py::String::decode(), Gui::View3DInventorPy::dump(), Gui::View3DInventorPy::dumpNode(), Py::String::encode(), TestGui::UnitTestDialogPy::errorDialog(), Gui::PythonDebugExcept::excepthook(), Py::Exception::Exception(), Py::ExtensionObject< T >::extensionObject(), Gui::ViewProviderPythonFeatureImp::finishRestoring(), Gui::View3DInventorPy::fitAll(), Py::PythonExtensionBase::genericGetAttro(), Py::PythonExtensionBase::genericSetAttro(), Gui::View3DInventorPy::getattr(), Sandbox::DocumentProtectorPy::getattr(), Gui::View3DInventorPy::getCamera(), Gui::View3DInventorPy::getCameraNode(), Gui::View3DInventorPy::getCameraType(), Gui::View3DInventorPy::getCursorPos(), Py::PythonClassObject< T >::getCxxObject(), Py::Module::getDict(), Py::MapBase< T >::getItem(), Py::SeqBase< Char >::getItem(), Fem::StdMeshers_Arithmetic1DPy::getLength(), Gui::View3DInventorPy::getObjectInfo(), Gui::View3DInventorPy::getObjectsInfo(), Gui::View3DInventorPy::getPoint(), Gui::View3DInventorPy::getSceneGraph(), Gui::View3DInventorPy::getSize(), Py::List::getSlice(), Py::Tuple::getSlice(), Gui::View3DInventorPy::getStereoType(), TestGui::UnitTestDialogPy::getUnitTest(), Py::GeometryT< T, PyT, valuePtr >::getValue(), Gui::View3DInventorPy::getViewDirection(), Gui::View3DInventorPy::getViewer(), Py::MapBase< T >::hasKey(), Py::ExtensionExceptionType::init(), Py::List::insert(), TestGui::UnitTestDialogPy::insertError(), Gui::PythonCommand::isActive(), Gui::View3DInventorPy::isAnimationEnabled(), isType(), Py::SeqBase< Char >::length(), Py::List::List(), Gui::View3DInventorPy::listCameraTypes(), Gui::View3DInventorPy::listStereoTypes(), Gui::View3DInventorPy::message(), Py::new_reference_to(), Base::ProgressIndicatorPy::next(), Py::Char::operator std::string(), Py::Char::operator String(), Py::GeometryT< T, PyT, valuePtr >::operator T(), Py::Module::operator=(), Py::Callable::operator=(), Py::Dict::operator=(), Py::List::operator=(), Py::Tuple::operator=(), Py::String::operator=(), Py::SeqBase< Char >::operator=(), Py::GeometryT< T, PyT, valuePtr >::operator=(), Py::Vector::operator=(), Py::PythonClassObject< T >::operator=(), Py::ExtensionObject< T >::operator=(), Sandbox::DocumentProtectorPy::recompute(), Gui::View3DInventorPy::removeAnnotation(), Gui::View3DInventorPy::removeEventCallback(), Gui::View3DInventorPy::removeEventCallbackPivy(), Py::SeqBase< Char >::repeat(), Py::List::reverse(), Gui::View3DInventorPy::saveImage(), Gui::View3DInventorPy::saveVectorGraphic(), Gui::View3DInventorPy::setAnimationEnabled(), Gui::View3DInventorPy::setAnnotation(), Sandbox::DocumentObjectProtectorPy::setattr(), Part::ToroidPy::setAxis(), Part::SpherePy::setAxis(), Part::PlanePy::setAxis(), Part::ParabolaPy::setAxis(), Part::HyperbolaPy::setAxis(), Part::EllipsePy::setAxis(), Part::CylinderPy::setAxis(), Part::ConePy::setAxis(), Part::CirclePy::setAxis(), Part::ArcOfCirclePy::setAxis(), Part::SurfaceOfRevolutionPy::setBasisCurve(), Part::SurfaceOfExtrusionPy::setBasisCurve(), Part::OffsetCurvePy::setBasisCurve(), Part::OffsetSurfacePy::setBasisSurface(), Gui::View3DInventorPy::setCamera(), Gui::View3DInventorPy::setCameraOrientation(), Gui::View3DInventorPy::setCameraType(), Part::ToroidPy::setCenter(), Part::SpherePy::setCenter(), Part::EllipsePy::setCenter(), Part::CylinderPy::setCenter(), Part::ConePy::setCenter(), Part::CirclePy::setCenter(), Part::ArcOfCirclePy::setCenter(), Part::SurfaceOfRevolutionPy::setDirection(), Part::SurfaceOfExtrusionPy::setDirection(), Part::LinePy::setEndPoint(), TestGui::UnitTestDialogPy::setErrorCount(), TestGui::UnitTestDialogPy::setFailCount(), Py::MapBase< T >::setItem(), Py::Tuple::setItem(), Py::SeqBase< Char >::setItem(), Part::SurfaceOfRevolutionPy::setLocation(), Part::ParabolaPy::setLocation(), Part::HyperbolaPy::setLocation(), Data::ComplexGeoDataPy::setMatrix(), Gui::View3DInventorPy::setNavigationType(), Part::OffsetCurvePy::setOffsetDirection(), Fem::SMESH_HypothesisPy< T >::setParametersByMesh(), Data::ComplexGeoDataPy::setPlacement(), Part::PlanePy::setPosition(), TestGui::UnitTestDialogPy::setProgressFrac(), App::PropertyLinkSubList::setPyObject(), TestGui::UnitTestDialogPy::setRemainCount(), Base::PlacementPy::setRotation(), TestGui::UnitTestDialogPy::setRunCount(), Py::List::setSlice(), Part::LinePy::setStartPoint(), TestGui::UnitTestDialogPy::setStatusText(), Gui::View3DInventorPy::setStereoType(), TestGui::UnitTestDialogPy::setUnitTest(), Py::String::size(), Py::SeqBase< Char >::size(), Py::List::sort(), Base::ProgressIndicatorPy::start(), Gui::View3DInventorPy::startAnimating(), Base::ProgressIndicatorPy::stop(), Gui::View3DInventorPy::stopAnimating(), Py::SeqBase< Char >::swap(), Gui::TaskView::TaskDialogPython::TaskDialogPython(), Gui::TaskView::TaskWatcherPython::TaskWatcherPython(), Gui::SelectionFilterPy::test(), Py::Vector::toVector(), Py::Tuple::Tuple(), TestGui::UnitTestDialogPy::updateGUI(), Gui::View3DInventorPy::viewAxometric(), Gui::View3DInventorPy::viewBottom(), Gui::View3DInventorPy::viewFront(), Gui::View3DInventorPy::viewLeft(), Gui::View3DInventorPy::viewPosition(), Gui::View3DInventorPy::viewRear(), Gui::View3DInventorPy::viewRight(), Gui::View3DInventorPy::viewTop(), Gui::PythonDebugStderr::write(), Gui::PythonDebugStdout::write(), Gui::OutputStderr::write(), Gui::OutputStdout::write(), Gui::PythonStderr::write(), Gui::PythonStdout::write(), and App::Document::~Document().

Py_ssize_t Py::Object::reference_count (  )  const [inline]

Definition at line 248 of file Python2/Objects.hxx.

References draftTools::p.

Referenced by Sandbox::PythonBaseClass::PythonBaseClass_func_noargs().

void Py::Object::release (  )  [inline, protected]

Definition at line 167 of file Python2/Objects.hxx.

References Py::_XDECREF(), and draftTools::p.

Referenced by validate().

String Py::Object::repr (  )  const
void Py::Object::set ( PyObject pyob,
bool  owned = false 
) [inline, protected]

Definition at line 156 of file Python2/Objects.hxx.

References Py::_XINCREF(), draftTools::p, and validate.

void Py::Object::setAttr ( const std::string &  s,
const Object value 
) [inline]
String Py::Object::str (  )  const

Definition at line 48 of file Python2/cxxsupport.cxx.

Referenced by as_string(), and Py::mapref< T >::str().

Type Py::Object::type (  )  const
void Py::Object::validate (  )  [protected]

The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:44 2011 for FreeCAD by  doxygen 1.6.1