Gui: Add getObject<T>() helpers to various classes
Obtaining specific kind of document object is very common task. This commit introduces handy helper which makes that a lot easier.
This commit is contained in:
@@ -65,10 +65,15 @@ protected:
|
||||
{
|
||||
return m_view;
|
||||
}
|
||||
Fem::FemPostFunction* getObject()
|
||||
Fem::FemPostFunction* getObject() const
|
||||
{
|
||||
return m_object;
|
||||
}
|
||||
template<class T>
|
||||
T* getObject() const
|
||||
{
|
||||
return dynamic_cast<T*>(getObject());
|
||||
}
|
||||
|
||||
bool blockObjectUpdates()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user