///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2021- Equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #include "RimcWellPathValve.h" #include "RiaApplication.h" #include "RimValveTemplate.h" #include "RimWellPathValve.h" #include "cafPdmAbstractFieldScriptingCapability.h" #include "cafPdmFieldScriptingCapability.h" CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimWellPathValve, RimcWellPathValve_template, "template" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RimcWellPathValve_template::RimcWellPathValve_template( caf::PdmObjectHandle* self ) : PdmObjectMethod( self, PdmObjectMethod::NullPointerType::NULL_IS_VALID, PdmObjectMethod::ResultType::PERSISTENT_TRUE ) { CAF_PDM_InitObject( "Valve Template", "", "", "Valve Template" ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- std::expected RimcWellPathValve_template::execute() { if ( auto valve = self() ) { return valve->valveTemplate(); } return nullptr; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QString RimcWellPathValve_template::classKeywordReturnedType() const { return RimValveTemplate::classKeywordStatic(); }