Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIPLMUpdateEngine
Interface representing representing a PLMUpdate engine, allowing
to read the global status of an object and to globally update
this object.
Role:
CATIPLMUpdateEngine interface allows to read the global status
of an object and to globally update this object. Components that
implement CATIPLMUpdateEngine are CATPLMUpdateEngine, generated
thanks to the method InstantiateUpdateEngine in the
CATPLMUpdateFactory class.
Do not forget that only one PLMUpdate engine can be used at each time.
CATIPLMUpdateEngine* engine = NULL; HRESULT rc = CATPLMUpdateFactory::InstantiateUpdateEngine(engine); if (S_OK == rc && (engine != NULL)) { if (S_OK == engine->Init(iRootActor)) { CATPLMUpdateStatus status = CATIPLMUpdateEngine::Undefined; if (S_OK == engine->GetGlobalPLMStatus(status)) { switch(status) { case CATIPLMUpdateEngine::UpToDate: case CATIPLMUpdateEngine::UpToDateWithWarnings: break; // Already up to date. case CATIPLMUpdateEngine::OutOfDate: case CATIPLMUpdateEngine::OutOfDateDateWithWarnings: { HRESULT updRc = engine->GlobalPLMUpdate(); if (S_OK == updRc) { ; // update successfull. } else if (S_FALSE == updRc) { ; // update successfull with warnings. } else if (E_FAIL == updRc) { ; // update unsuccessfull (errors). } else ; // Unexpected error management. } case CATIPLMUpdateEngine::Error: break; // Error management. case CATIPLMUpdateEngine::Undefined: break; // Unexpected error management. } } else ; // Unexpected error management. } else ; // Unexpected error management. // Do not forget to release the engine: engine->Release(); engine = NULL; } else ; // Unexpected error management.
public virtual GetGlobalPLMStatus( | oGlobalStatus) |
S_OK
if everything ran ok,
E_UNEXPECTED
if a serious error occured, if the engine is not
inited for example.
public virtual GlobalPLMUpdate( | ) |
S_OK
if update has ended successfully, with no error or warning.
S_FALSE
if update has ended successfully, with no error but at
least one warning.
E_FAIL
if update has ended on at least one error.
E_UNEXPECTED
if a serious error occured, if the engine is not
inited for example.
public virtual Init( | iRootActor) |
S_OK
if everything ran ok,
E_INVALIDARG
if iRootActor is not a product reference or a
3DShape representation reference,
E_UNEXPECTED
if a serious error occured.
public virtual SetOptimizationMode( | iOptimMode) |
S_OK
if everything ran ok,
E_INVALIDARG
if iOptimMode is not a valid optimization mode,
E_UNEXPECTED
if a serious error occured.
enum CATPLMUpdateStatus { Status_UndefinedStatus, Status_UpToDate, Status_OutOfDate, Status_UpToDateWithWarnings, Status_OutOfDateDateWithWarnings, Status_Error }Enumeration of possible statuses of the PLMUpdate engine (statuses returned by the GetGlobalPLMStatus method). notions of persistent errors or warnings and volatile errors or warnings are introduced. A persistent error or warning is detected by the GetGlobalPLMStatus, a volatile error or warning is only detected during the update (GlobalPLMUpdate method), it is a runtime error or warning. The GlobalPLMUpdate method and the following enumeration only manage persistent errors.
enum OptimMode { Optim_UndefinedMode, Optim_Memory, Optim_Intermediate, Optim_CPU, Optim_MemoryWithPartialUnload, Optim_IntermediateWithPartialUnload }PCS optimization mode (unload strategy). UndefinedMode: undefined optimization mode (should never be returned or given as input parameter). CPU: no unload. Memory: After the unit update of an actor, keep loaded load dependencies that have one (or several) load clients out of date in the current step and unload the other ones. MemoryWithPartialUnload: After the unit update of an actor, keep loaded load dependencies that have one (or several) load clients out of date in the current step and unload the other ones that were unloaded at the beginning of the update. Intermediate: After the unit update of an actor, keep loaded load dependencies that have one (or several) load clients out of date somewhere in the update graph and unload the other ones. IntermediateWithPartialUnload: After the unit update of an actor, keep loaded load dependencies that have one (or several) load clients out of date somewhere in the update graph and unload the other ones that were unloaded at the beginning of the update. The default option to use is IntermediateWithPartialUnload.
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.