CATMatInterfaces Interface CATIMaterialRefCnx
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIMaterialRefCnx
Interface to Material Reference Connexion.
Role: Interface designed to manage the connexions of a material.
Method Index
- o
AddLink(CATBaseUnknown*,int)
- Adds a link to the connection towards an object in a domain representation.
- o
GetAllLinkTarget(CATListPtrCATBaseUnknown&,CATBoolean)
- Returns all the objects pointed by this connection.
- o
GetLinkTarget(IID&,void**,int,CATBoolean)
- Returns the object pointed by a link.
- o
GetMaterial(CATIMaterialReference*&)
- Returns the Material Reference of this connection.
- o
GetNumberOfLinks(int&)
- Returns the number of links of this connection.
- o
IsDefault()
- Checks if this connection is the default for its discipline.
- o
RemoveLink(int)
- Removes a link.
- o
SetDefault()
- Sets this connection as the default one for its discipline.
Methods
o AddLink
public virtual AddLink( | | ipTargetObject, |
| | iIdx | = 0) |
-
Adds a link to the connection towards an object in a domain representation.
- Parameters:
-
- ipTargetObject
- The target of the link.
- iIdx
- The index in the list of links of the connection's relation.
Legal values:
- 0 or number of links + 1
- The relation is append at the end of the list.
- strictly positive and inferior or equal to the number of links
- The link is replacing the link located at this position.
- Returns:
- An HRESULT
Legal values:
- S_OK
- The link is created at iIdx position.
- E_INVALIDARG
- If iTargetObject is NULL or if it does not belong to a domain
representation having the same father as this connection.
- E_INVALIDARG
- iIdx is negative or strictly superior to number of links + 1.
- E_FAIL
- The operation failed.
o GetAllLinkTarget
public virtual GetAllLinkTarget( | | opListTarget, |
| | iLoadDomain | = FALSE ) |
-
Returns all the objects pointed by this connection.
- Parameters:
-
- opListTarget
- [out, CATBaseUnknown#Release] The objects pointed by the connection.
If the list is not empty, target are append at the end of the list.
You have to release the content of the list after use.
- iLoadDomain
- Legal values:
- TRUE
- The domain rep where the target is stored is loaded in session if needed.
- FALSE
- The domain rep is not loaded. This call may fail due to a missing domain.
- Returns:
- An HRESULT
Legal values:
- S_OK
- At least one of the target objects are successfully returned.
- If iLoadDomain if FALSE, some target may be missing if their rep is not in session.
- E_ACCESSDENIED
- No target is returned because no domain rep are in session and iLoadDomain is FALSE.
- E_FAIL
- Error in loading operation (if iLoadDomain is TRUE) or internal error. Nothing returned.
o GetLinkTarget
public virtual GetLinkTarget( | const | iIID, |
| | opTarget, |
| | iIdx, |
| | iLoadDomain | = FALSE ) |
-
Returns the object pointed by a link.
- Parameters:
-
- iIID
- The IID to retrieve on the target.
- opTarget
- [out, CATBaseUnknown#Release] The object pointed by the link.
You have to release the pointer after use.
- iIdx
- The link's index in the links list.
It should be strictly positive and inferior or equal to current number of links.
- iLoadDomain
- Legal values:
- TRUE
- The domain rep where the target is stored is loaded in session if needed.
- FALSE
- The domain rep is not loaded. This call may fail due to a missing domain.
- Returns:
- An HRESULT
Legal values:
- S_OK
- The target object is successfully returned.
- E_ACCESSDENIED
- The pointed object is not in session, and iLoadDomain is FALSE.
- E_INVALIDARG
- if iIdx is not in the legal range.
- E_FAIL
- Error in loading operation (if iLoadDomain is TRUE) or internal error.
o GetMaterial
public virtual GetMaterial( | | opiMat) |
-
Returns the Material Reference of this connection.
- Parameters:
-
- opiMat
- [out, CATBaseUnknown#Release] The material owning this connection.
You have to release the pointer after use.
- Returns:
- An HRESULT
Legal values:
- S_OK
- The Material Reference was successfully retrieved.
- E_FAIL
- The operation failed.
o GetNumberOfLinks
public virtual GetNumberOfLinks( | | oNum) |
-
Returns the number of links of this connection.
- Parameters:
-
- oNum
- The number of links of this connection.
- Returns:
- An HRESULT
Legal values:
- S_OK
- The value is successfully returned.
- E_FAIL
- The operation failed.
o IsDefault
public virtual IsDefault( | ) |
-
Checks if this connection is the default for its discipline.
- Returns:
- A CATBoolean
Legal values:
- TRUE
- This connection is the default one.
- FALSE
- This connection is NOT the default one.
o RemoveLink
public virtual RemoveLink( | | iIdx) |
-
Removes a link.
- Parameters:
-
- iIdx
- The link index in the links list.
It should be strictly positive and inferior or equal to current number of links.
Warning, after a remove, links indexes are shifted.
- Returns:
- An HRESULT
Legal values:
- S_OK
- The link was successfully removed.
- E_INVALIDARG
- If iIdx is not in the legal range.
- E_FAIL
- The operation failed.
o SetDefault
public virtual SetDefault( | ) |
-
Sets this connection as the default one for its discipline.
All the other connections of the same discipline are set as 'non-default'.
- Returns:
- An HRESULT
Legal values:
- S_OK
- This connection has been set as the default one (it was not the case before).
- S_FALSE
- This connection has already been set as default. Nothing is changed.
- E_FAIL
- The operation failed.
This object is included in the file: CATIMaterialRefCnx.h
If needed, your Imakefile.mk should include the module: CATMatInterfaces
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.