Gui::ViewProviderT Class Reference

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
 
DocumentgetDocument () const
 
const std::string & getDocumentName () const
 
std::string getGuiDocumentPython () const
 
template<typename T >
T * getObjectAs () const
 
const std::string & getObjectName () const
 
std::string getObjectPython () const
 
ViewProviderDocumentObjectgetViewProvider () const
 
void operator= (const ViewProviderDocumentObject *)
 
ViewProviderToperator= (const ViewProviderT &)
 
ViewProviderToperator= (ViewProviderT &&)
 
bool operator== (const ViewProviderT &) const
 
 ViewProviderT ()
 
 ViewProviderT (const ViewProviderDocumentObject *)
 
 ViewProviderT (const ViewProviderT &)
 
 ViewProviderT (ViewProviderT &&)
 
 ~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.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ ViewProviderT() [1/4]

ViewProviderT::ViewProviderT ( )

Constructor

◆ ViewProviderT() [2/4]

ViewProviderT::ViewProviderT ( const ViewProviderT other)

Constructor

◆ ViewProviderT() [3/4]

ViewProviderT::ViewProviderT ( ViewProviderT &&  other)

Constructor

References draftfunctions.move::move().

◆ ViewProviderT() [4/4]

ViewProviderT::ViewProviderT ( const 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 ( void  ) 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()

const 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()

template<typename T >
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()

const 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/3]

void ViewProviderT::operator= ( const ViewProviderDocumentObject obj)

Assignment operator

◆ operator=() [2/3]

ViewProviderT & ViewProviderT::operator= ( const ViewProviderT obj)

Assignment operator

◆ operator=() [3/3]

ViewProviderT & ViewProviderT::operator= ( ViewProviderT &&  obj)

Assignment operator

References draftfunctions.move::move().

◆ operator==()

bool ViewProviderT::operator== ( const ViewProviderT other) const

Equality operator


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