#include <PropertyConstraintList.h>
Public Member Functions | |
void | acceptGeometry (const std::vector< Part::Geometry * > &GeoList) |
void | checkGeometry (const std::vector< Part::Geometry * > &GeoList) |
virtual Property * | Copy (void) const |
Returns a new copy of the property (mainly for Undo/Redo and transactions). | |
virtual unsigned int | getMemSize (void) const |
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? This method is defined in Base::Persistence. | |
virtual PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. | |
virtual int | getSize (void) const |
virtual Base::Type | getTypeId (void) const |
const std::vector< Constraint * > & | getValues (void) const |
const Constraint * | operator[] (const int idx) const |
index operator | |
virtual void | Paste (const App::Property &from) |
PropertyConstraintList () | |
A constructor. | |
virtual void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. | |
virtual void | Save (Base::Writer &writer) const |
This method is used to save properties to an XML document. | |
virtual void | setPyObject (PyObject *) |
virtual void | setSize (int newSize) |
void | setValue (const Constraint *) |
Sets the property. | |
void | setValues (const std::vector< Constraint * > &) |
virtual | ~PropertyConstraintList () |
A destructor. | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Definition at line 44 of file PropertyConstraintList.h.
PropertyConstraintList::PropertyConstraintList | ( | ) |
A constructor.
A more elaborate description of the constructor.
Definition at line 55 of file PropertyConstraintList.cpp.
Referenced by Copy().
PropertyConstraintList::~PropertyConstraintList | ( | ) | [virtual] |
A destructor.
A more elaborate description of the destructor.
Definition at line 60 of file PropertyConstraintList.cpp.
void PropertyConstraintList::acceptGeometry | ( | const std::vector< Part::Geometry * > & | GeoList | ) |
Definition at line 204 of file PropertyConstraintList.cpp.
References App::Property::aboutToSetValue(), and App::Property::hasSetValue().
Referenced by Sketcher::SketchObject::addGeometry(), Sketcher::SketchObject::delGeometry(), Sketcher::SketchObject::Restore(), Sketcher::SketchObject::toggleConstruction(), and Sketcher::SketchObject::trim().
void PropertyConstraintList::checkGeometry | ( | const std::vector< Part::Geometry * > & | GeoList | ) |
Definition at line 221 of file PropertyConstraintList.cpp.
References App::Property::touch().
Referenced by Sketcher::SketchObject::onChanged().
Property * PropertyConstraintList::Copy | ( | void | ) | const [virtual] |
Returns a new copy of the property (mainly for Undo/Redo and transactions).
Implements App::Property.
Definition at line 179 of file PropertyConstraintList.cpp.
References draftTools::p, and PropertyConstraintList().
void * Sketcher::PropertyConstraintList::create | ( | void | ) | [static] |
Reimplemented from App::PropertyLists.
Definition at line 49 of file PropertyConstraintList.cpp.
Base::Type Sketcher::PropertyConstraintList::getClassTypeId | ( | void | ) | [static] |
Reimplemented from App::PropertyLists.
Definition at line 49 of file PropertyConstraintList.cpp.
unsigned int PropertyConstraintList::getMemSize | ( | void | ) | const [virtual] |
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? This method is defined in Base::Persistence.
Reimplemented from App::Property.
Definition at line 196 of file PropertyConstraintList.cpp.
References getSize().
PyObject * PropertyConstraintList::getPyObject | ( | void | ) | [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'.
Reimplemented from Base::BaseClass.
Definition at line 109 of file PropertyConstraintList.cpp.
References getSize().
int PropertyConstraintList::getSize | ( | void | ) | const [virtual] |
Implements App::PropertyLists.
Definition at line 73 of file PropertyConstraintList.cpp.
Referenced by Sketcher::SketchObject::addConstraint(), getMemSize(), getPyObject(), and Save().
Base::Type Sketcher::PropertyConstraintList::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from App::PropertyLists.
Definition at line 49 of file PropertyConstraintList.cpp.
const std::vector<Constraint*>& Sketcher::PropertyConstraintList::getValues | ( | void | ) | const [inline] |
Definition at line 74 of file PropertyConstraintList.h.
Referenced by CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainHorizontal::activated(), SketcherGui::CmdSketcherToggleConstruction::activated(), Sketcher::SketchObject::addConstraint(), Sketcher::SketchObject::delConstraint(), Sketcher::SketchObject::delConstraintOnPoint(), Sketcher::SketchObject::delGeometry(), SketcherGui::ViewProviderSketch::draw(), SketcherGui::ViewProviderSketch::drawConstraintIcons(), SketcherGui::EditDatumDialog::EditDatumDialog(), SketcherGui::ViewProviderSketch::editDoubleClicked(), Sketcher::SketchObject::execute(), Sketcher::SketchObject::getCoincidentPoints(), Sketcher::SketchObject::hasConflicts(), SketcherGui::ViewProviderSketch::moveConstraint(), Sketcher::SketchObject::movePoint(), SketcherGui::ViewProviderSketch::rebuildConstraintsVisual(), Sketcher::SketchObject::setDatum(), SketcherGui::ViewProviderSketch::setEdit(), SketcherGui::TaskSketcherConstrains::slotConstraintsChanged(), Sketcher::SketchObject::transferConstraints(), Sketcher::SketchObject::trim(), SketcherGui::ViewProviderSketch::updateColor(), and SketcherGui::ViewProviderSketch::updateData().
void Sketcher::PropertyConstraintList::init | ( | void | ) | [static] |
Reimplemented from App::PropertyLists.
Definition at line 49 of file PropertyConstraintList.cpp.
Referenced by initSketcher().
const Constraint* Sketcher::PropertyConstraintList::operator[] | ( | const int | idx | ) | const [inline] |
index operator
Definition at line 70 of file PropertyConstraintList.h.
void PropertyConstraintList::Paste | ( | const App::Property & | from | ) | [virtual] |
Definition at line 187 of file PropertyConstraintList.cpp.
References App::Property::aboutToSetValue(), and App::Property::hasSetValue().
void PropertyConstraintList::Restore | ( | Base::XMLReader & | ) | [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:
void PropertyVector::Restore(Base::XMLReader &reader) { // read my Element reader.readElement("PropertyVector"); // get the value of my Attribute _cVec.x = (float)reader.getAttributeAsFloat("valueX"); _cVec.y = (float)reader.getAttributeAsFloat("valueY"); _cVec.z = (float)reader.getAttributeAsFloat("valueZ"); }
Implements Base::Persistence.
Definition at line 158 of file PropertyConstraintList.cpp.
References RobotExampleTrajectoryOutOfShapes::count, Base::XMLReader::getAttributeAsInteger(), Base::XMLReader::readElement(), Base::XMLReader::readEndElement(), Sketcher::Constraint::Restore(), and setValues().
void PropertyConstraintList::Save | ( | Base::Writer & | ) | const [virtual] |
This method is used to save properties to an XML document.
A good example you'll find in PropertyStandard.cpp, e.g. the vector:
void PropertyVector::Save (Writer &writer) const { writer << writer.ind() << "<PropertyVector valueX=\"" << _cVec.x << "\" valueY=\"" << _cVec.y << "\" valueZ=\"" << _cVec.z <<"\"/>" << endl; }
The writer.ind() expression writes the indention, 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.
Implements Base::Persistence.
Definition at line 148 of file PropertyConstraintList.cpp.
References Base::Writer::decInd(), getSize(), Base::Writer::incInd(), Base::Writer::ind(), and Base::Writer::Stream().
void PropertyConstraintList::setPyObject | ( | PyObject * | value | ) | [virtual] |
Reimplemented from Base::BaseClass.
Definition at line 117 of file PropertyConstraintList.cpp.
References draftlibs::dxfReader::error(), Sketcher::ConstraintPy::getConstraintPtr(), setValue(), setValues(), and Sketcher::ConstraintPy::Type.
void PropertyConstraintList::setSize | ( | int | newSize | ) | [virtual] |
Implements App::PropertyLists.
Definition at line 66 of file PropertyConstraintList.cpp.
void PropertyConstraintList::setValue | ( | const Constraint * | lValue | ) |
Sets the property.
Definition at line 78 of file PropertyConstraintList.cpp.
References App::Property::aboutToSetValue(), Sketcher::Constraint::clone(), and App::Property::hasSetValue().
Referenced by setPyObject().
void PropertyConstraintList::setValues | ( | const std::vector< Constraint * > & | lValue | ) |
Definition at line 91 of file PropertyConstraintList.cpp.
References App::Property::aboutToSetValue(), and App::Property::hasSetValue().
Referenced by Sketcher::SketchObject::addConstraint(), Sketcher::SketchObject::delConstraint(), Sketcher::SketchObject::delConstraintOnPoint(), Sketcher::SketchObject::delGeometry(), Restore(), Sketcher::SketchObject::setDatum(), setPyObject(), and Sketcher::SketchObject::transferConstraints().