Update some comments in PdmObjectMethod

This commit is contained in:
Gaute Lindkvist 2020-08-07 11:58:41 +02:00
parent 6a6a093d05
commit 12c264b2a6
3 changed files with 22 additions and 15 deletions

View File

@ -38,6 +38,16 @@
using namespace caf;
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( PdmObjectMethod, "PdmObjectMethod" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
PdmObjectMethod::PdmObjectMethod( PdmObjectHandle* self )
: m_self( self )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -86,13 +96,3 @@ std::vector<QString> caf::PdmObjectMethodFactory::registeredMethodNames( const Q
return methods;
}
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( PdmObjectMethod, "PdmObjectMethod" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
PdmObjectMethod::PdmObjectMethod( PdmObjectHandle* self )
: m_self( self )
{
}

View File

@ -52,8 +52,12 @@ namespace caf
{
//==================================================================================================
/// PdmObject script method
/// Sub-class and register to the PdmObject
/// Store arguments as member fields and set a return values in the return value for execute
/// Sub-class and register to the PdmObject to assign methods to a PdmObject that is accessible from
/// ... scripting engines such as Python.
/// Store arguments as member fields and assign return values in a PdmObject for execute.
/// Return value can be a storage class based on PdmObject returning resultIsPersistent() == false.
/// Or it can be a PdmObject in the project tree returning resultIsPersistent() == true.
///
//==================================================================================================
class PdmObjectMethod : public PdmObject
{
@ -72,8 +76,11 @@ public:
virtual QString selfClassKeyword() const { return m_self->xmlCapability()->classKeyword(); }
// True if object is a persistent project tree item. False if the object is to be deleted on completion.
virtual bool resultIsPersistent() const = 0;
virtual std::unique_ptr<PdmObjectHandle> defaultResult() const = 0;
virtual bool resultIsPersistent() const = 0;
// In order for the code generators to inspect the fields in the result object any PdmObjectMethod
// ... need to provide an implementation that returns the same object type as the execute method.
virtual std::unique_ptr<PdmObjectHandle> defaultResult() const = 0;
protected:
// Basically the "this" pointer to the object the method belongs to

2
ThirdParty/qwt vendored

@ -1 +1 @@
Subproject commit 79e4fc7bde3ebd44c6e1834dff63a2a0eb7d33b2
Subproject commit 0bd598c7008afbaa7216755fb9a4ac0da2e612eb