ProductStructureInterfaces Interface CATIPLMRepInstances

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIPLMRepInstances

Interface managing the collection of Representation Instances aggregated to a given Product.
Role: This interface enables to add, remove, replace, browse or seek Representation Instances.
This interface is implemented on Products.


Method Index


o AddRepInstance(CATUnicodeString&,CATIPsiRepresentationReference*,CATBaseUnknown*&,IID&)
Creates a Representation Instance and aggregates it to this Product.
o Count(int&)
Retrieves the number of Representation Instances aggregated by this Product.
o GetRepInstanceByName(CATUnicodeString&,CATBaseUnknown*&,IID&)
Retrieves a Representation Instance from its name.
o Iterator(CATIPrdIterator*&)
Retrieves an iterator on all Representation Instances.
o RemoveRepInstance(CATIPrdRepInstance*)
Removes a Representation Instance.
o ReplaceRepInstance(CATIPrdRepInstance*,CATIPsiRepresentationReference*,CATIPrdRepInstance*&)
Replaces a Representation Instance with another one.

Methods


o AddRepInstance
public virtual AddRepInstance( const iRepInstName,
iRef,
oRepInstance,
const iIID= IID_CATIPrdObject )
Creates a Representation Instance and aggregates it to this Product.
Initializes PLM Attributes of created representation instance using Business Logic "IdentificationInitialization". Note: This method must be called on a Product Reference.
The creation fails if the Representation Instance name is already used by another Representation Instance aggregated by this Product.
The creation fails if the Representation Reference is a Technological Representation that has already been instantiated.
Parameters:
iRepInstName
The name of the Representation Instance.
iRef
The pointer to the Representation Reference.
oRepInstance
[out, CATBaseUnknown#Release] The pointer to the newly created Representation Instance.
Note: The pointer should be RELEASED.
iIID
The IID of the interface to be queried on the returned object.
is used by default
Returns:
  • S_OK if the Representation Instance was successfully added.
  • E_FAIL if:
    • this Product is not a Product Reference
    • or the Representation Instance name is already used by another Representation Instance aggregated by this Product
    • or the Representation Reference is a Technological Representation that has already been instantiated
    • or the QueryInterface on iIID failed
    • or the Representation Instance creation failed
o Count
public virtual Count( oCount)
Retrieves the number of Representation Instances aggregated by this Product.
Parameters:
oCount
The number of Representation Instances aggregated by this Product.
Returns:
  • S_OK if this Product aggregates at least one Representation Instance.
  • E_FAIL if this Product is not a Product Reference or has no Representation Instance.
o GetRepInstanceByName
public virtual GetRepInstanceByName( const iName,
oRepInstance,
const iIID= IID_CATIPrdObject )
Retrieves a Representation Instance from its name.
Parameters:
iName
The name of the Representation Instance.
This name is the one used at the creation step, in other words the first argument of the
method.
oRepInstance
[out, CATBaseUnknown#Release] The pointer on the existing Representation Instance.
Note: The pointer should be RELEASED.
iIID
The IID of the interface to be queried on the returned object.
is used by default
Returns:
  • S_OK if the Representation Instance was successfully retrieved.
  • E_FAIL if:
    • the Representation Instance based on its name does not exist
    • or the QueryInterface on iIID failed
o Iterator
public virtual Iterator( oIterator)
Retrieves an iterator on all Representation Instances.
Parameters:
oIterator
[out, CATBaseUnknown#Release] The iterator on all Representation Instances aggregated by this Product.
Note: The pointer should be RELEASED.
Returns:
  • S_OK if the iterator was successfully created.
  • E_FAIL if this Product is not a Product Reference or if the iterator creation failed.
o RemoveRepInstance
public virtual RemoveRepInstance( iRepInst)
Removes a Representation Instance.
Note: This method must be called on a Product Reference.
Parameters:
iRepInst
The Representation Instance to be removed.
Returns:
  • S_OK if the Representation Instance has been successfully removed.
  • E_FAIL otherwise.
o ReplaceRepInstance
public virtual ReplaceRepInstance( ipRepInst,
ipNewRepRef,
opRepInst)
Replaces a Representation Instance with another one.
Note: This method must be called on a Product Reference.
The Replace operation fails if the new Representation Reference or the old one is a Technological Representation.
Parameters:
ipRepInst
The Representation Instance to be replaced.
ipNewRepRef
The Representation Reference of the replacing Representation Instance
opRepInst
[out, CATBaseUnknown#Release] The new Representation Instance that have replaced the old one.
Returns:
  • S_OK if the Representation Instance was successfully replaced
  • E_FAIL if:
    • this Product is not a Product Reference
    • or if the new Representation or the old one is a Technological Representation
    • or the Replace operation failed

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

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