#include <GeometryDefaultExtension.h>
Public Member Functions | |
virtual std::unique_ptr< Part::GeometryExtension > copy (void) const override | |
GeometryDefaultExtension () | |
GeometryDefaultExtension () | |
GeometryDefaultExtension () | |
GeometryDefaultExtension (const T &val, std::string name=std::string()) | |
virtual unsigned int getMemSize (void) const override | |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
virtual PyObject * getPyObject (void) override | |
This method returns the Python wrapper for a C++ object. More... | |
const T & getValue () const | |
virtual void Restore (Base::XMLReader &) override | |
This method is used to restore properties from an XML document. More... | |
void Restore (Base::XMLReader &reader) | |
This method is used to restore properties from an XML document. More... | |
void Restore (Base::XMLReader &reader) | |
This method is used to restore properties from an XML document. More... | |
void Restore (Base::XMLReader &reader) | |
This method is used to restore properties from an XML document. More... | |
virtual void Save (Base::Writer &) const override | |
This method is used to save properties to an XML document. More... | |
void setValue (const T &val) | |
virtual ~GeometryDefaultExtension () override=default | |
![]() | |
const std::string & getName () const | |
void setName (const std::string &str) | |
virtual ~GeometryExtension ()=default | |
![]() | |
void dumpToStream (std::ostream &stream, int compression) | |
virtual Base::Type getTypeId (void) const | |
virtual void RestoreDocFile (Reader &) | |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More... | |
void restoreFromStream (std::istream &stream) | |
virtual void SaveDocFile (Writer &) const | |
This method is used to save large amounts of data to a binary file. More... | |
![]() | |
BaseClass () | |
Construction. More... | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
Additional Inherited Members | |
![]() | |
static void * create (void) | |
static std::string encodeAttribute (const std::string &) | |
Encodes an attribute upon saving. More... | |
static Base::Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
GeometryExtension () | |
GeometryExtension (const GeometryExtension &obj)=default | |
void restoreNameAttribute (Base::XMLReader &) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
Constructor & Destructor Documentation
◆ GeometryDefaultExtension() [1/4]
Part::GeometryDefaultExtension< T >::GeometryDefaultExtension |
◆ GeometryDefaultExtension() [2/4]
GeometryDefaultExtension::GeometryDefaultExtension | ( | const T & | val, |
std::string | name = std::string() |
||
) |
References Part::GeometryExtension::setName().
◆ ~GeometryDefaultExtension()
|
overridevirtualdefault |
◆ GeometryDefaultExtension() [3/4]
Part::GeometryDefaultExtension< long >::GeometryDefaultExtension | ( | ) |
◆ GeometryDefaultExtension() [4/4]
Part::GeometryDefaultExtension< double >::GeometryDefaultExtension | ( | ) |
Member Function Documentation
◆ copy()
|
overridevirtual |
Implements Part::GeometryExtension.
◆ getMemSize()
|
overridevirtual |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB?
Implements Part::GeometryExtension.
◆ getPyObject() [1/5]
|
virtual |
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.
◆ getPyObject() [2/5]
|
virtual |
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.
◆ getPyObject() [3/5]
|
virtual |
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.
◆ getPyObject() [4/5]
|
virtual |
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.
◆ getPyObject() [5/5]
|
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.
◆ getValue()
const T& Part::GeometryDefaultExtension< T >::getValue | ( | ) | const |
◆ Restore() [1/4]
|
overridevirtual |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
Implements Part::GeometryExtension.
References Base::XMLReader::getAttribute().
◆ Restore() [2/4]
|
virtual |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
Implements Part::GeometryExtension.
References Base::XMLReader::getAttributeAsInteger().
◆ Restore() [3/4]
|
virtual |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
Implements Part::GeometryExtension.
References Base::XMLReader::getAttributeAsInteger().
◆ Restore() [4/4]
|
virtual |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
Implements Part::GeometryExtension.
References Base::XMLReader::getAttributeAsFloat().
◆ Save()
|
overridevirtual |
This method is used to save properties to an XML document.
A good example you'll find in PropertyStandard.cpp, e.g. the vector:
The writer.ind() expression writes the indentation, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.
- See also
- Base::Writer
Implements Part::GeometryExtension.
References Base::Writer::ind(), and Base::Writer::Stream().
◆ setValue()
void Part::GeometryDefaultExtension< T >::setValue | ( | const T & | val | ) |
Referenced by Part::GeometryBoolExtensionPy::PyInit(), Part::GeometryIntExtensionPy::PyInit(), Part::GeometryStringExtensionPy::PyInit(), Part::GeometryDoubleExtensionPy::PyInit(), Part::GeometryBoolExtensionPy::setValue(), Part::GeometryDoubleExtensionPy::setValue(), Part::GeometryIntExtensionPy::setValue(), and Part::GeometryStringExtensionPy::setValue().
The documentation for this class was generated from the following files:
- src/Mod/Part/App/GeometryDefaultExtension.h
- src/Mod/Part/App/GeometryDefaultExtension.cpp