All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

ObjectSpecsModeler Class CATSpecReplaceExt

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---ObjectSpecsModeler.CATIReplace
        |
        +---CATSpecReplaceExt
 

Usage: you can derive this class.


public class CATSpecReplaceExt

Base class to give implementation for CATIReplace.
usage: Only IsElementValidForReplace method needs to be overloaded. To subscribe to replace, this object also has to implement CATIAttrBehavior.

See also:
CATIReplace, CATIAttrBehavior


Constructor and Destructor Index


o CATSpecReplaceExt()
Constructs a CATSpecReplaceExt.
o ~CATSpecReplaceExt()

Method Index


o IsElementValidForReplace(CATUnicodeString&,CATBaseUnknown_var&,CATUnicodeString&,int&,CATBaseUnknown_var&)
Determine wether the candidate element is allowed to replace the existing one.
o Replace(CATUnicodeString&,CATBaseUnknown_var&,CATBaseUnknown_var&)
Valuates a given attribute with an other object.

Constructor and Destructor


o CATSpecReplaceExt
public CATSpecReplaceExt()
Constructs a CATSpecReplaceExt.
o ~CATSpecReplaceExt
public virtual ~CATSpecReplaceExt()

Methods


o IsElementValidForReplace
public virtual HRESULT IsElementValidForReplace( const CATUnicodeString& iName,
const CATBaseUnknown_var& iElement,
CATUnicodeString& oMessage,
int& oElementValidity,
const CATBaseUnknown_var& iOldValue=NULL_var)
Determine wether the candidate element is allowed to replace the existing one.
Parameters:
iName
name of attribute which value has to be replace.
iElement
candidate element for replace.
oMessage
explains returned HRESULT.
Legal values:
"No adhesion to CATIAttrBehavior" if this doesn't implement CATIAttrBehavior. then rc is E_NOTIMPL .
"Element is invalid " if element is invalid for replace, then rc is E_FAILED .
oElementValidity

Legal values : 0 if element is not valid ,
1 if element is valid .
iOldValue
position of the feature to replace if the attribute is a list.
Returns:
HRESULT
Legal values : S_OK , E_FAIL , E_NOTIMPL
o Replace
public virtual HRESULT Replace( const CATUnicodeString& name_of_role,
CATBaseUnknown_var& new_element,
const CATBaseUnknown_var& old_value=NULL_var )
Valuates a given attribute with an other object.
Parameters:
iName
name of the attribute which value has to be replace.
iElement
candidate element for replace.
iOldValue
position of the feature to replace if the attribute is a list.
Returns:
HRESULT
Legal values : S_OK , E_FAIL , E_NOTIMPL

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

Copyright © 2003, Dassault Systèmes. All rights reserved.