CATMatInterfaces Interface CATIMaterialDomain

Usage: you can freely reimplement this interface.


interface CATIMaterialDomain

Interface to Material Domain.
Role: Interface designed to get and add information about the Applicative Domain.

In the Material Applicative Domain, you can add and retrieve the applicative specifications.
You can retrieve the type of domain you are minupulating, and the application to which it refers.


Method Index


o AddApplicativeSpec(CATUnicodeString&)
Adds applicative data on the domain.
o GetApplicativeSpec(CATUnicodeString&,CATIMaterialDomainContent*&)
Gets an applicative data from a material domain.
o GetMaterial(CATIMaterialReference*&)
Returns the material owning this domain.
o IsDefault()
Method restricted for domains that allow multiplicity and default.
o SetDefaultStatus(CATBoolean)
Method restricted for domains that allow multiplicity and default.
o SupportsType(CATIType_var&)
Checks if a domain supports a given type.

Methods


o AddApplicativeSpec
public virtual AddApplicativeSpec( iSpecType)
Adds applicative data on the domain.
Role: In the case of domain based on V5SimuRep, that method calls AddApplicativeSpec on the CATIMaterialDomainRelay implemented by the domain rootfeature. A default implementation of CATIMaterialDomainRelay is provided on feature CATMaterialRepManager. But the owner of a domain can re-implement the behavior he wants.
Default behavior :
Try and instantiate a feature iType. Aggregate it under rootFeature
If there is a previous feature it is replaced.
Parameters:
iSpecType
In default behavior used to specify the applicative spec to instantiate.
The name of the applicative spec are :
  • "RenderingFeature" (for rendering domain)
  • "DrwFeatureMaterial" (for drafting domain)
  • "CATFeaIsotropicMaterial" (for Elfini domain)
  • "CATCompositeMaterial" (for composite domain)
  • "SMAMaterialDomain" (for simulation domain)
Returns:
An HRESULT.
Legal values:
S_OK
The applicative spec was successfully added.
E_FAIL
Add applicative spec operation failed.
o GetApplicativeSpec
public virtual GetApplicativeSpec( iType,
opiCont)
Gets an applicative data from a material domain.
Role:In the case of domain based on V5SimuRep, that method calls GetApplicativeSpec on the CATIMaterialDomainRelay implemented by the domain rootfeature. A default implementation of CATIMaterialDomainRelay is provided on feature CATMaterialRepManager. But the owner of a domain can re-implement the behavior he wants.
Default behavior :
Look for the first feature aggregated under the root feature. If it is a feature of type iType return it. Otherwise return E_FAIL.
if iType is a null string, return the first feature if it exists. otherwise return E_FAIL.
Parameters:
iType
A string to identify a given applicative spec. The name of the applicative spec are :
  • "RenderingFeature" (for rendering domain)
  • "DrwFeatureMaterial" (for drafting domain)
  • "CATFeaIsotropicMaterial" (for Elfini domain)
  • "CATCompositeMaterial" (for composite domain)
  • "SMAMaterialDomain" (for simulation domain)
opiCont
[out, CATBaseUnknown#Release] The applicative data.
You have to release the pointer after use.
Returns:
An HRESULT.
Legal values:
S_OK
The applicative spec was successfully retrieved.
E_FAIL
The operation failed.
o GetMaterial
public virtual GetMaterial( opiMat)
Returns the material owning this domain.
Parameters:
opiMat
[out , CATBaseUnknown#Release] The owning material.
You have to release the pointer after use.
Returns:
An HRESULT.
Legal values:
S_OK
The material is successfully returned.
E_FAIL
The operation failed.
o IsDefault
public virtual IsDefault()
Method restricted for domains that allow multiplicity and default. Role: Return E_INVALIDARG if the domain does not allow multiplicity and default refer to CATIMaterialDomainInfo.
Indicates wether current domain is default or not.
Returns:
An HRESULT
Legal values:
E_INVALIDARG
‘this’ is a domain which type does not allow multiplicity or default.
S_OK
If ‘this’ is valid and the default domain.
S_FALSE
If ‘this’ is valid and is not the default domain.
S_FALSE
E_FAIL in case of internal error.
o SetDefaultStatus
public virtual SetDefaultStatus( oDef= FALSE )
Method restricted for domains that allow multiplicity and default. Role: Return E_INVALIDARG is the domain does not allow multiplicity and default refers to CATIMaterialDomainInfo.
Sets or Unset the ‘default flag’ of a domain. If a given domain is set as default then the flag is removed from any other domain of the same type and material, that could have had it previously.
Parameters:
oDef
Legal values:
TRUE
To set as default.
FALSE
To unset (default value).
Returns:
An HRESULT.
Legal values:
E_INVALIDARG
If ‘this’ is a domain which type does not allow multiplicity or default.
S_OK
If ‘this’ is a valid domain, and it’s status was successfully changed (from non-default to default if oDef is TRUE or from default to non-default if oDef is FALSE).
S_FALSE
if ‘this’ is a valid domain, and the required status is activated (but it was already the case so nothing changed).
S_FALSE
In case of internal error.
o SupportsType
public virtual SupportsType( iType)
Checks if a domain supports a given type. Role: As types can be derived this method will return TRUE if the domain type is equal or derived from iType.
Parameters:
iType
Type to test domain against.
Returns:
A CATBoolean
Legal values:
TRUE
domain type derives from iType (or is equal).
FALSE
domain type does not derive from iType.
See also:

Example:
 to create a CATIType : 
CATIType_var spiRenderingType = NULL_var ;
CATMaterialTools::GetDomainRenderingType( spiRenderingType ) ;
See also:

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

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