Sketcher::ExternalGeometryExtension Class Reference

#include <ExternalGeometryExtension.h>

Public Types

enum  Flag {
  Defining = 0 , Frozen = 1 , Detached = 2 , Missing = 3 ,
  Sync = 4 , NumFlags
}
 

Public Member Functions

virtual std::unique_ptr< Part::GeometryExtensioncopy (void) const override
 
 ExternalGeometryExtension ()=default
 
virtual size_t flagSize () const override
 
virtual PyObjectgetPyObject (void) override
 This method returns the Python wrapper for a C++ object. More...
 
virtual const std::string & getRef () const override
 
virtual bool isClear () const override
 
virtual void setFlag (int flag, bool v=true) override
 
virtual void setRef (const std::string &ref) override
 
virtual bool testFlag (int flag) const override
 
virtual ~ExternalGeometryExtension () override=default
 
- Public Member Functions inherited from Part::GeometryPersistenceExtension
void Restore (Base::XMLReader &)
 
void Save (Base::Writer &) const
 
virtual ~GeometryPersistenceExtension ()=default
 
- Public Member Functions inherited from Part::GeometryExtension
virtual std::unique_ptr< GeometryExtensioncopy (void) const =0
 
PyObjectcopyPyObject () const
 
const std::string & getName () const
 
virtual PyObjectgetPyObject (void)=0
 This method returns the Python wrapper for a C++ object. More...
 
virtual void notifyAttachment (Part::Geometry *)
 
void setName (const std::string &str)
 
virtual ~GeometryExtension ()=default
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 
 BaseClass (const BaseClass &)=default
 
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (const BaseClass &)=default
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 

Static Public Member Functions

static bool getFlagsFromName (std::string str, ExternalGeometryExtension::Flag &flag)
 
- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
 
static Type getClassTypeId ()
 
static void init ()
 

Static Public Attributes

static constexpr std::array< const char *, NumFlagsflag2str {{ "Defining", "Frozen", "Detached","Missing", "Sync" }}
 

Protected Member Functions

virtual void copyAttributes (Part::GeometryExtension *cpy) const override
 
virtual void restoreAttributes (Base::XMLReader &reader) override
 
virtual void saveAttributes (Base::Writer &writer) const override
 
virtual void restoreAttributes (Base::XMLReader &)
 
virtual void saveAttributes (Base::Writer &writer) const
 
- Protected Member Functions inherited from Part::GeometryExtension
virtual void copyAttributes (Part::GeometryExtension *cpy) const
 
 GeometryExtension ()
 
 GeometryExtension (const GeometryExtension &obj)=default
 
GeometryExtensionoperator= (const GeometryExtension &obj)=default
 

Additional Inherited Members

- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Member Enumeration Documentation

◆ Flag

Enumerator
Defining 
Frozen 
Detached 
Missing 
Sync 
NumFlags 

Constructor & Destructor Documentation

◆ ExternalGeometryExtension()

Sketcher::ExternalGeometryExtension::ExternalGeometryExtension ( )
default

Referenced by getPyObject().

◆ ~ExternalGeometryExtension()

virtual Sketcher::ExternalGeometryExtension::~ExternalGeometryExtension ( )
overridevirtualdefault

Member Function Documentation

◆ copy()

std::unique_ptr< Part::GeometryExtension > ExternalGeometryExtension::copy ( void  ) const
overridevirtual

◆ copyAttributes()

void ExternalGeometryExtension::copyAttributes ( Part::GeometryExtension cpy) const
overrideprotectedvirtual

Reimplemented from Part::GeometryExtension.

References Part::GeometryExtension::copyAttributes().

Referenced by copy().

◆ flagSize()

virtual size_t Sketcher::ExternalGeometryExtension::flagSize ( ) const
overridevirtual

◆ getFlagsFromName()

bool ExternalGeometryExtension::getFlagsFromName ( std::string  str,
ExternalGeometryExtension::Flag flag 
)
static

References flag2str.

◆ getPyObject()

PyObject * ExternalGeometryExtension::getPyObject ( void  )
overridevirtual

This method returns the Python wrapper for a C++ object.

It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.

The default implementation returns 'None'.

Implements Part::GeometryExtension.

References ExternalGeometryExtension().

◆ getRef()

virtual const std::string & Sketcher::ExternalGeometryExtension::getRef ( ) const
overridevirtual

◆ isClear()

virtual bool Sketcher::ExternalGeometryExtension::isClear ( ) const
overridevirtual

◆ restoreAttributes()

void ExternalGeometryExtension::restoreAttributes ( Base::XMLReader reader)
overrideprotectedvirtual

◆ saveAttributes()

void ExternalGeometryExtension::saveAttributes ( Base::Writer writer) const
overrideprotectedvirtual

◆ setFlag()

virtual void Sketcher::ExternalGeometryExtension::setFlag ( int  flag,
bool  v = true 
)
overridevirtual

◆ setRef()

virtual void Sketcher::ExternalGeometryExtension::setRef ( const std::string &  ref)
overridevirtual

◆ testFlag()

virtual bool Sketcher::ExternalGeometryExtension::testFlag ( int  flag) const
overridevirtual

Member Data Documentation

◆ flag2str

constexpr std::array< const char *, ExternalGeometryExtension::NumFlags > ExternalGeometryExtension::flag2str {{ "Defining", "Frozen", "Detached","Missing", "Sync" }}
staticconstexpr

Referenced by getFlagsFromName().


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