The ViewProviderT class is a helper class to store the names of a view provider and its document. More...
#include <DocumentObserver.h>
Public Member Functions | |
| std::string | getAppDocumentPython () const |
| Document * | getDocument () const |
| std::string | getDocumentName () const |
| std::string | getGuiDocumentPython () const |
| template<typename T > | |
| T * | getObjectAs () const |
| std::string | getObjectName () const |
| std::string | getObjectPython () const |
| ViewProviderDocumentObject * | getViewProvider () const |
| void | operator= (const ViewProviderDocumentObject *) |
| void | operator= (const ViewProviderT &) |
| ViewProviderT () | |
| ViewProviderT (ViewProviderDocumentObject *) | |
| ~ViewProviderT () | |
Detailed Description
The ViewProviderT class is a helper class to store the names of a view provider 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.
Constructor & Destructor Documentation
◆ ViewProviderT() [1/2]
| ViewProviderT::ViewProviderT | ( | ) |
Constructor
◆ ViewProviderT() [2/2]
| ViewProviderT::ViewProviderT | ( | ViewProviderDocumentObject * | obj | ) |
Constructor
◆ ~ViewProviderT()
| ViewProviderT::~ViewProviderT | ( | ) |
Destructor
Member Function Documentation
◆ getAppDocumentPython()
| std::string ViewProviderT::getAppDocumentPython | ( | ) | const |
Get the App::Document as Python command.
References Gui::DocumentT::getAppDocumentPython().
◆ getDocument()
| Document * ViewProviderT::getDocument | ( | ) | const |
Get a pointer to the document or 0 if it doesn't exist any more.
References Gui::Application::getDocument(), and Gui::Application::Instance.
Referenced by getViewProvider(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::onChanged().
◆ getDocumentName()
| std::string ViewProviderT::getDocumentName | ( | ) | const |
Get the name of the document.
◆ getGuiDocumentPython()
| std::string ViewProviderT::getGuiDocumentPython | ( | ) | const |
Get the Gui::Document as Python command.
References Gui::DocumentT::getGuiDocumentPython().
◆ getObjectAs()
| T* Gui::ViewProviderT::getObjectAs | ( | ) | const |
Get a pointer to the document or 0 if it doesn't exist any more or the type doesn't match.
◆ getObjectName()
| std::string ViewProviderT::getObjectName | ( | ) | const |
Get the name of the document object.
◆ getObjectPython()
| std::string ViewProviderT::getObjectPython | ( | ) | const |
Get the document object as Python command.
References Gui::Application::activeDocument(), and Gui::Application::Instance.
◆ getViewProvider()
| ViewProviderDocumentObject * ViewProviderT::getViewProvider | ( | ) | const |
Get a pointer to the document object or 0 if it doesn't exist any more.
References getDocument().
◆ operator=() [1/2]
| void ViewProviderT::operator= | ( | const ViewProviderDocumentObject * | obj | ) |
Assignment operator
◆ operator=() [2/2]
| void ViewProviderT::operator= | ( | const ViewProviderT & | obj | ) |
Assignment operator
The documentation for this class was generated from the following files:
- src/Gui/DocumentObserver.h
- src/Gui/DocumentObserver.cpp
1.8.17