The DocumentObjectT class is a helper class to store the names of a document object and its document. More...
#include <DocumentObserver.h>
Public Member Functions | |
DocumentObjectT () | |
DocumentObjectT (const char *docName, const char *objName) | |
DocumentObjectT (const Document *, const std::string &objName) | |
DocumentObjectT (const DocumentObject *) | |
DocumentObjectT (const DocumentObjectT &) | |
DocumentObjectT (const Property *) | |
DocumentObjectT (DocumentObjectT &&) | |
Document * | getDocument () const |
const std::string & | getDocumentName () const |
std::string | getDocumentPython () const |
DocumentObject * | getObject () const |
template<typename T > | |
T * | getObjectAs () const |
const std::string & | getObjectLabel () const |
const std::string & | getObjectName () const |
std::string | getObjectPython () const |
Property * | getProperty () const |
template<typename T > | |
T * | getPropertyAs () const |
const std::string & | getPropertyName () const |
std::string | getPropertyPython () const |
void | operator= (const DocumentObject *) |
DocumentObjectT & | operator= (const DocumentObjectT &) |
void | operator= (const Property *) |
DocumentObjectT & | operator= (DocumentObjectT &&) |
bool | operator== (const DocumentObjectT &) const |
~DocumentObjectT () | |
The DocumentObjectT class is a helper class to store the names of a document object and its document.
This can be useful when you cannot rely on that the document or the object still exists when you have to access it.
DocumentObjectT::DocumentObjectT | ( | ) |
Constructor
DocumentObjectT::DocumentObjectT | ( | const DocumentObjectT & | other | ) |
Constructor
DocumentObjectT::DocumentObjectT | ( | DocumentObjectT && | other | ) |
Constructor
References draftfunctions.move::move().
DocumentObjectT::DocumentObjectT | ( | const DocumentObject * | obj | ) |
Constructor
DocumentObjectT::DocumentObjectT | ( | const Document * | doc, |
const std::string & | objName | ||
) |
Constructor
DocumentObjectT::DocumentObjectT | ( | const char * | docName, |
const char * | objName | ||
) |
Constructor
DocumentObjectT::DocumentObjectT | ( | const Property * | prop | ) |
Constructor
DocumentObjectT::~DocumentObjectT | ( | ) |
Destructor
Document * DocumentObjectT::getDocument | ( | void | ) | const |
Get a pointer to the document or 0 if it doesn't exist any more.
References App::GetApplication(), and App::Application::getDocument().
Referenced by getObject(), App::SubObjectT::getObjectFullName(), App::SubObjectT::getSubObjectFullName(), and Gui::PropertyEditor::PropertyLinkItem::toString().
const std::string & DocumentObjectT::getDocumentName | ( | ) | const |
Get the name of the document.
Referenced by App::SubObjectT::getObjectFullName(), App::SubObjectT::getSubObjectFullName(), App::SubObjectT::operator<(), and Gui::PropertyEditor::LinkSelection::select().
std::string DocumentObjectT::getDocumentPython | ( | ) | const |
Get the document as Python command.
Referenced by ReenGui::FitBSplineSurfaceWidget::accept(), and ReenGui::PoissonWidget::accept().
DocumentObject * DocumentObjectT::getObject | ( | ) | const |
Get a pointer to the document object or 0 if it doesn't exist any more.
References getDocument().
Referenced by Gui::TaskCSysDragger::accept(), Gui::Dialog::DlgPropertyLink::formatObject(), App::SubObjectT::getNewElementName(), App::SubObjectT::getOldElementName(), getProperty(), App::SubObjectT::getSubObject(), App::SubObjectT::getSubObjectList(), Gui::Dialog::DlgPropertyLink::init(), Gui::PropertyEditor::LinkLabel::updatePropertyLink(), and MeshPartGui::Mesh2ShapeGmsh::writeProject().
T * App::DocumentObjectT::getObjectAs | ( | ) | const |
Get a pointer to the document or 0 if it doesn't exist any more or the type doesn't match.
const std::string & DocumentObjectT::getObjectLabel | ( | ) | const |
Get the label of the document object.
Referenced by App::SubObjectT::getObjectFullName().
const std::string & DocumentObjectT::getObjectName | ( | ) | const |
Get the name of the document object.
Referenced by App::SubObjectT::getObjectFullName(), App::SubObjectT::getSubObjectFullName(), Gui::SelectionSingleton::hasPreselection(), App::SubObjectT::operator<(), Gui::PropertyEditor::LinkSelection::select(), and Gui::SelectionSingleton::setPreselectCoord().
std::string DocumentObjectT::getObjectPython | ( | ) | const |
Get the document object as Python command.
Referenced by ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), getPropertyPython(), App::SubObjectT::getSubObjectPython(), and App::PropertyLinkT::PropertyLinkT().
Property * DocumentObjectT::getProperty | ( | ) | const |
Get a pointer to the property or 0 if it doesn't exist any more.
References getObject().
Referenced by Gui::Dialog::DlgPropertyLink::init(), and Gui::PropertyEditor::LinkLabel::updatePropertyLink().
T * App::DocumentObjectT::getPropertyAs | ( | ) | const |
const std::string & DocumentObjectT::getPropertyName | ( | ) | const |
Get the name of the property.
Referenced by App::SubObjectT::operator<().
std::string DocumentObjectT::getPropertyPython | ( | ) | const |
Get the property as Python command.
References getObjectPython().
void DocumentObjectT::operator= | ( | const DocumentObject * | obj | ) |
Assignment operator
DocumentObjectT & DocumentObjectT::operator= | ( | const DocumentObjectT & | obj | ) |
Assignment operator
void DocumentObjectT::operator= | ( | const Property * | prop | ) |
Assignment operator
References Base::Persistence::getClassTypeId(), App::Property::getContainer(), App::Property::getName(), App::DocumentObject::getNameInDocument(), App::Property::hasName(), and Base::BaseClass::isDerivedFrom().
DocumentObjectT & DocumentObjectT::operator= | ( | DocumentObjectT && | obj | ) |
Assignment operator
References draftfunctions.move::move().
bool DocumentObjectT::operator== | ( | const DocumentObjectT & | other | ) | const |
Equality operator