App::DocumentObjectT Class Reference

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 &&)
 
DocumentgetDocument () const
 
const std::string & getDocumentName () const
 
std::string getDocumentPython () const
 
DocumentObjectgetObject () const
 
template<typename T >
T * getObjectAs () const
 
const std::string & getObjectLabel () const
 
const std::string & getObjectName () const
 
std::string getObjectPython () const
 
PropertygetProperty () const
 
template<typename T >
T * getPropertyAs () const
 
const std::string & getPropertyName () const
 
std::string getPropertyPython () const
 
void operator= (const DocumentObject *)
 
DocumentObjectToperator= (const DocumentObjectT &)
 
void operator= (const Property *)
 
DocumentObjectToperator= (DocumentObjectT &&)
 
bool operator== (const DocumentObjectT &) const
 
 ~DocumentObjectT ()
 

Detailed Description

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.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ DocumentObjectT() [1/7]

DocumentObjectT::DocumentObjectT ( )

Constructor

◆ DocumentObjectT() [2/7]

DocumentObjectT::DocumentObjectT ( const DocumentObjectT other)

Constructor

◆ DocumentObjectT() [3/7]

DocumentObjectT::DocumentObjectT ( DocumentObjectT &&  other)

Constructor

References draftfunctions.move::move().

◆ DocumentObjectT() [4/7]

DocumentObjectT::DocumentObjectT ( const DocumentObject obj)

Constructor

◆ DocumentObjectT() [5/7]

DocumentObjectT::DocumentObjectT ( const Document doc,
const std::string &  objName 
)

Constructor

◆ DocumentObjectT() [6/7]

DocumentObjectT::DocumentObjectT ( const char *  docName,
const char *  objName 
)

Constructor

◆ DocumentObjectT() [7/7]

DocumentObjectT::DocumentObjectT ( const Property prop)

Constructor

◆ ~DocumentObjectT()

DocumentObjectT::~DocumentObjectT ( )

Destructor

Member Function Documentation

◆ getDocument()

Document * DocumentObjectT::getDocument ( void  ) const

◆ getDocumentName()

const std::string & DocumentObjectT::getDocumentName ( ) const

◆ getDocumentPython()

std::string DocumentObjectT::getDocumentPython ( ) const

Get the document as Python command.

Referenced by ReenGui::FitBSplineSurfaceWidget::accept(), and ReenGui::PoissonWidget::accept().

◆ getObject()

◆ getObjectAs()

template<typename T >
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.

◆ getObjectLabel()

const std::string & DocumentObjectT::getObjectLabel ( ) const

Get the label of the document object.

Referenced by App::SubObjectT::getObjectFullName().

◆ getObjectName()

◆ getObjectPython()

std::string DocumentObjectT::getObjectPython ( ) const

◆ getProperty()

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

◆ getPropertyAs()

template<typename T >
T * App::DocumentObjectT::getPropertyAs ( ) const

◆ getPropertyName()

const std::string & DocumentObjectT::getPropertyName ( ) const

Get the name of the property.

Referenced by App::SubObjectT::operator<().

◆ getPropertyPython()

std::string DocumentObjectT::getPropertyPython ( ) const

Get the property as Python command.

References getObjectPython().

◆ operator=() [1/4]

void DocumentObjectT::operator= ( const DocumentObject obj)

Assignment operator

◆ operator=() [2/4]

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

Assignment operator

◆ operator=() [3/4]

◆ operator=() [4/4]

DocumentObjectT & DocumentObjectT::operator= ( DocumentObjectT &&  obj)

Assignment operator

References draftfunctions.move::move().

◆ operator==()

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

Equality operator


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