CATPLMUpdateUseItf Interface CATIPLMUpdateEngine

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.

Example:
  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.

 
, CATPLMUpdateFactory#InstantiateUpdateEngine


Method Index


o GetGlobalPLMStatus(CATPLMUpdateStatus&)
Returns global update status of the root actor.
o GlobalPLMUpdate()
Globally update the root actor.
o Init(CATBaseUnknown*)
Initializes the update process on the given root actor.
o SetOptimizationMode(OptimMode)
Set the optimization mode.

Enumerated Type Index


o CATPLMUpdateStatus
Enumeration of possible statuses of the PLMUpdate engine (statuses returned by the GetGlobalPLMStatus method).
o OptimMode
PCS optimization mode (unload strategy).

Methods


o GetGlobalPLMStatus
public virtual GetGlobalPLMStatus( oGlobalStatus)
Returns global update status of the root actor.
Role: Compute the global PLMUpdate status of the graph, which is equivalent to the global update status of the root actor.
Parameters:
oGlobalStatus
[out] The returned global PLMUpdate status.
Returns:
S_OK if everything ran ok, E_UNEXPECTED if a serious error occured, if the engine is not inited for example.
o GlobalPLMUpdate
public virtual GlobalPLMUpdate()
Globally update the root actor.
Role: This method globally update all actors of the PLMUpdate graph in the right order. After this update, if no error occured, the root actor is globally up to date.
Returns:
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.
o Init
public virtual Init( iRootActor)
Initializes the update process on the given root actor.
Role: This method build the PLMUpdate graph from the given root actor. The graph is composed of the root actor and of all its direct and indirect dependencies.
Parameters:
iRootActor
[in] The root actor from which the PLMUpdate graph will be computed. in the CAA scope, this actor must be a product reference or a 3DShape representation reference.
Returns:
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.
o SetOptimizationMode
public virtual SetOptimizationMode( iOptimMode)
Set the optimization mode.
Role: Set the optimization mode. The default value for optimization mode is IntermediateWithPartialUnload.
Parameters:
iOptimMode
[in] The optimization mode that will be used during the global PLMUpdate.
Returns:
S_OK if everything ran ok, E_INVALIDARG if iOptimMode is not a valid optimization mode, E_UNEXPECTED if a serious error occured.

Enumerated Types


o CATPLMUpdateStatus
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.
o OptimMode
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.

This object is included in the file: CATIPLMUpdateEngine.h
If needed, your Imakefile.mk should include the module: CATPLMUpdateUseItf

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.