FeatureModelerExt CATFmFeatureFacade
Usage: you must use this class as is. You should never derive it.
public class CATFmFeatureFacade
Class representing a Feature.
Role: This class is a Facade object providing access to a Feature, according to the provided Accreditations.
It gathers in a single place all operations defined at the Feature Modeler level that can be performed on a Feature.
LifeCycle information.
The recommended usage is to create Facades as local variables in functions and methods bodies.
Facades expose methods such as and
that can explicitly change the life cycle of objects they reference, but the mere existence of a Facade should not implicitely influence the life cycle (either logical or C++) of
the object it is bound to. Consequently Facades use weak references to ensure secure operation: attempts to access deleted objects will safely fail.
Facades are then not really intended to be used as global variables or class member data. The life cycle of Facades should not extend
beyond the scope of the function in which they have been created, and cannot be used safely to store a reference to an object over an extended
duration. Most notably, while the correct comparison (see
) of 2 AddRef'd pointers can descriminate between two pointers to the same Logically deleted object and two pointers to the distinct Logically deleted objects,the comparison of 2 Facades
does not provide this ability.
Refer to the CAA Encyclopedia Feature Modeler pages to learn how to manage the Life Cycle of your objects.
Access Control information.
Interactions with Feature Modeler entities, either read-only or read+write, are subject to authorization.
On a Facade with no (or insufficient) Accreditations only the methods related to the Facade binding will succeed.
Such a Facade can most notably be used as an output parameter for a method like
to retrieve immediatly a pointer to the Feature Extension through
or
. All other methods, i.e. those for wich E_ACCESSDENIED is a legal return value, will fail.
To be allowed to interact with a Feature, an application must be registered as the owner of the Feature Catalog defining the Feature.
- See also:
-
Constructor and Destructor Index
- o
CATFmFeatureFacade()
- Constructs an empty Feature Facade.
- o
CATFmFeatureFacade(CATFmCredentials&)
- Constructs a Feature Facade.
- o
CATFmFeatureFacade(CATFmFeatureFacade&)
- Copy constructor.
- o
CATFmFeatureFacade(CATFmCredentials&,CATBaseUnknown*)
- Constructs a Feature Facade.
- o
CATFmFeatureFacade(CATFmCredentials&,CATFmAttributeValue&)
- Constructs a Feature Facade.
- o
~CATFmFeatureFacade()
- Destructor.
Method Index
- o
AddExtension(CATString&,CATFmAttributeValue&)
- Creates a Feature Extension.
- o
AppendValue(CATFmAttributeName&,CATFmAttributeValue&)
- Appends a value at the end of a list attribute.
- o
Clear()
- Unbinds the Facade from its bound Feature.
- o
CompareFeatureWith(CATFmFeatureFacade&)
- Compares the bound Feature(s) of two Facades.
- o
DeleteSelf()
- Deletes a Feature.
- o
DetachComponent(CATFmAttributeName&,int)
- Breaks an aggregation relation without deleting aggregated object.
- o
GetAttributeValuationInfo(CATFmAttributeName&,CATFmAttributeValuationInfo&)
- Retrieves valuation informations of attribute iAttributeName.
- o
GetAutoNumberingProvider(CATFmAttributeValue&)
- Retrieves the Auto-Numbering Provider of a Feature.
- o
GetBaseFeature(CATFmAttributeValue&)
- Retrieves the Base Feature of a Feature Extension.
- o
GetContainerFacade(CATFmContainerFacade&)
- Retrieves the Container of a Feature.
- o
GetDisplayName(CATUnicodeString&)
- Retrieves the Display Name of a Feature.
- o
GetExtension(CATString&,CATFmAttributeValue&)
- Retrieves a Feature Extension from a Base Feature.
- o
GetExtensionId(CATString&)
- Retrieves a Feature Extension Id.
- o
GetExtensionUuid(CATUuid&)
- Retrieves the Uuid of a Feature Extension.
- o
GetFeature()
- Returns the bound Feature through a CATBaseUnknown smart pointer.
- o
GetFeatureAsValue()
- Returns the bound Feature as a value.
- o
GetKnowledgeParameter(CATFmAttributeName&,IID&,void**,int)
- Retrieves a an interface pointer on a Knowledge parameter.
- o
GetParentFeature(CATFmAttributeValue&)
- Retrieves the Parent of a Feature.
- o
GetRedirectedValuation(CATFmAttributeName&,CATFmAttributeValue&,CATFmAttributeName&)
- Retrieves target feature and attribute of a redirected attribute.
- o
GetReference(CATFmAttributeValue&)
- Retrieves the Reference of a Feature.
- o
GetRootParentFeature(CATFmAttributeValue&)
- Retrieves the Root Parent of a Feature.
- o
GetStartUpFacade(CATFmStartUpFacade&)
- Retireves the Feature Definition (StartUp) of a Feature.
- o
GetType(CATUnicodeString&)
- Retrieves the Late Type of a Feature.
- o
GetValue(CATFmAttributeName&,CATFmAttributeValue&)
- Retrieves value of attribute iAttributeName.
- o
GetValueAtIndex(CATFmAttributeName&,int,CATFmAttributeValue&)
- Retrieves value of attribute iAttributeName at a specified index.
- o
InsertValue(CATFmAttributeName&,int,CATFmAttributeValue&)
- Inserts a value at a given index of a list attribute.
- o
InstantiateIn(CATFmContainerFacade&,CATFmAttributeValue&)
- Instantiates a Feature.
- o
InstantiateUnder(CATFmContainerFacade&,CATFmFeatureFacade&,CATFmAttributeName&,CATFmAttributeValue&)
- Instantiates a Feature.
- o
IsSynchronized(CATFmAttributeName&,CATBoolean&)
- Retrieves the synchronization status of a Feature.
- o
IsUpToDate()
- Retrieves a Feature update status.
- o
IsValid()
- Checks the Facade validity.
- o
LocateValue(CATFmAttributeName&,CATFmAttributeValue&,int&,int,int)
- Locates a value in an attribute.
- o
MoveInPosition(CATFmAttributeName&,int,int)
- Moves an index in the list to another position.
- o
QueryInterfaceOnFeature(IID&,void**)
- Retrieves the bound Feature through a user specified interface pointer.
- o
RemoveExtension(CATFmAttributeValue&)
- Deletes a Feature Extension.
- o
RemovePosition(CATFmAttributeName&,int)
- Removes an index from a list attribute.
- o
RemoveRedirectedValuation(CATFmAttributeName&)
- Breaks the redirection to another attribute.
- o
ReplaceValueAtIndex(CATFmAttributeName&,int,CATFmAttributeValue&)
- Replaces value of attribute iAttributeName at a given index.
- o
RestoreInheritance(CATFmAttributeName&)
- Restores inheritance on an attribute.
- o
ScanExtensions(CATFmFeatureIterator&)
- Scans the model for Feature Extensions related to a Base Feature.
- o
ScanExtensionsInContainer(CATString&,CATFmFeatureIterator&)
- Scans a Feature Container for Feature Extensions related to a Base Feature.
- o
ScanPointingFeatures(CATFmPointingFeatureIterator&)
- Scans the model for Features pointing the bound Feature.
- o
SetAutoNumberingProvider(CATFmAttributeValue&)
- Set the Auto-Numbering Provider of a Feature.
- o
SetRedirectedValuation(CATFmAttributeName&,CATFmAttributeValue&,CATFmAttributeName&)
- Creates a redirection from one attribute to another.
- o
SetUpdateBehavior(CATFmAttributeName&,CATFmAttributeUpdateBehavior)
- Sets the update behavior of an attribute.
- o
SetValue(CATFmAttributeName&,CATFmAttributeValue&)
- Sets value of attribute iAttributeName.
- o
SwapPositions(CATFmAttributeName&,int,int)
- Swaps two index in a list attribute.
- o
Synchronize(CATFmAttributeName&)
- Synchronizes a Feature.
- o
UnsetValue(CATFmAttributeName&)
- Unsets the value of an attribute.
- o
Update()
- Updates a Feature.
- o
operator!()
- Logical-negation (or logical-NOT) operator.
- o
operator=(CATBaseUnknown*)
- Binds the Facade to a Feature.
- o
operator=(CATFmFeatureFacade&)
- Assignment operator.
- o
operator=(CATFmAttributeValue&)
- Binds the Facade to a Feature.
Constructor and Destructor
o CATFmFeatureFacade
public CATFmFeatureFacade( | ) |
-
Constructs an empty Feature Facade.
Role: This constructor creates a Facade with no Accreditation and not bound to any Feature.
Only the assignment operator can affect the Accreditations Set of a Facade after its construction.
o CATFmFeatureFacade
public CATFmFeatureFacade( | const | iAccreditations) |
-
Constructs a Feature Facade.
Role: Creates a Facade with the provided Accreditations Set and not bound to any Feature.
- Parameters:
-
- iAccreditations
- [in] The Accreditations Set obtained by the application.
Refer to the Access Control section of the
class documentation.
Only the assignment operator can affect the Accreditations Set of a Facade after its construction.
Lifecycle: A Facade keeps a copy of the Accreditations Set. Any change in iAccreditations
(RegisterAsCatalogOwner ...) performed after the Facade creation will not affect the Facade.
o CATFmFeatureFacade
public CATFmFeatureFacade( | const | iFeatureFacade) |
-
Copy constructor.
Role: This method creates an exact copy of a Feature Facade.
- Parameters:
-
- iFeatureFacade
- [in] The Facade to copy.
o CATFmFeatureFacade
public CATFmFeatureFacade( | const | iAccreditations, |
| | iFeature) |
-
Constructs a Feature Facade.
Role: Creates a Facade with the provided Accreditations Set and bound to a Feature.
- Parameters:
-
- iAccreditations
- [in] The Accreditations Set obtained by the application.
Refer to the Access Control section of the
class documentation.
Only the assignment operator can affect the Accreditations Set of a Facade after its construction.
Lifecycle: A Facade keeps a copy of the Accreditations Set. Any change in iAccreditations
(RegisterAsCatalogOwner ...) performed after the Facade creation will not affect the Facade.
- iFeature
- [in] Any interface pointer to the Feature as a CATBaseUnknown pointer.
Legal values:
- NULL
- Any interface pointer on a Feature.
Any other value, such as an interface pointer to a Feature Container, will be handled like a NULL pointer.
Lifecycle: Refer to the Lifecycle section of the
class documentation.
o CATFmFeatureFacade
public CATFmFeatureFacade( | const | iAccreditations, |
| const | iFeature) |
-
Constructs a Feature Facade.
Role: Creates a Facade with the provided Accreditations Set and bound to a Feature.
- Parameters:
-
- iAccreditations
- [in] The Accreditations Set obtained by the application.
Refer to the Access Control section of the
class documentation.
Only the assignment operator can affect the Accreditations Set of a Facade after its construction.
Lifecycle: A Facade keeps a copy of the Accreditations Set. Any change in iAccreditations
(RegisterAsCatalogOwner ...) performed after the Facade creation will not affect the Facade.
- iFeature
- [in] An Feature Modeler Value.
Legal values:
- An empty (i.e. of CATFmKind_void type) Attribute Value.
- An Attribute Value of type CATFmKind_feature and of cardinality 1.
Any other value, such as an integer or a list with two or more elements, will be handled like a empty Attribute Value.
Lifecycle: Refer to the Lifecycle section of the
class documentation.
o ~CATFmFeatureFacade
public ~CATFmFeatureFacade( | ) |
-
Destructor.
Methods
o AddExtension
public AddExtension( | const | iExtensionId, |
| | oExtension) |
-
Creates a Feature Extension.
- Parameters:
-
- iExtensionId
- [in] The name of the Feature Extension that must be added to the bound Base Feature.
Legal values:
- "`StartUpIdentifier`@`Catalog.CATfct`"
- "`StartUpIdentifier`#@`Catalog.CATfct`"
- "0u???????-????-????-????????????????@`Catalog.CATfct`"
Deprecated value (V5-6R2015 / 3DEXPERIENCER2015x):
- oExtension
- [out] A (caller provided) value that will contain the Feature Extension.
No Feature Extension will be created if an Extension with this Extension Id exists,
in such a case this method simply retrieves the existing Feature Extension.
If the method fails oExtension is not modified, it is otherwise overwritten.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- A new Feature Extension has been successfuly added.
- S_FALSE
- The existing Feature Extension has been successfuly retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- E_ACCESSDENIED
- Credentials do not grant access to the Feature Extension Type Definition.
- LCC_E_FAIL
- The currently used license does not authorize the requested operation.
o AppendValue
public AppendValue( | const | iAttributeName, |
| const | iValue) |
-
Appends a value at the end of a list attribute.
Role:This method allows to append a value at the end of a list attribute.
It is a shortcut for
at index size+1 and has the same behavior and restrictions.
- Parameters:
-
- iAttributeName
- The attribute on which a value must be inserted.
- iValue
- The value to append.
This value must have the same type as the attribute and cardinality 1.
- Returns:
- An HRESULT value.
Return code values are the same as for
.
o Clear
-
Unbinds the Facade from its bound Feature.
This method does not affect the Accreditations Set of the Facade.
- Returns:
- This Facade.
o CompareFeatureWith
public CompareFeatureWith( | const | iFeature) |
-
Compares the bound Feature(s) of two Facades.
Role: compares the bound Feature(s) of two Facades without taking the Accreditations into account.
An Feature is valid if and only if it has neither been Logically deleted nor unloaded.
- Parameters:
-
- iFeature
- [in] The Feature Facade to be compared to this.
- Returns:
- An integer value.
Legal values:
- TRUE: if the Facades are either both invalid or both bound to the same valid Feature.
- FALSE: in any other case.
o DeleteSelf
-
Deletes a Feature.
Role: This method invokes the deletion of this Feature.
This method handles the deletion of aggregated Features as well as "root" (i.e. not aggregated) Features,
as long as the provided accreditations allow the modification of the aggregation link on the Parent Feature.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- This Feature has been removed.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature and/or the aggregating Feature attribute if any.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- Other
- Another failure has occured.
o DetachComponent
public DetachComponent( | const | iAttributeName, |
| | iIndex) |
-
Breaks an aggregation relation without deleting aggregated object.
Role: This method allows to remove a feature from an aggregation attribute without calling its deletion.
It can be used in order to change the father of a feature.
- For a single attribute:
- It will replace target feature by a NULL value.
- For a list attribute:
- If array mode is on, it will replace target feature by a NULL value.
- If array mode is off, it will remove the index.
- Parameters:
-
- iAttributeName
- [in] The attribute for which a component must be detached.
- iIndex
- [in] The index of the component to detach. Must be in the range [1,size] for a list attribute, equal to 1 for a single attribute.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Component has been detached.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMOUTOFBOUND
- Index is not in the correct range.
- E_FMTYPEMISMATCH
- Attribute is not an aggregation attribute.
- Other
- Another failure has occured.
o GetAttributeValuationInfo
public GetAttributeValuationInfo( | const | iAttributeName, |
| | oAttributeValuationInfo) |
-
Retrieves valuation informations of attribute iAttributeName.
- Parameters:
-
- iAttributeName
- [in] The attribute name for which attribute valuation info must be retrieved.
- oAttributeValuationInfo
- [out] Data structure containing attribute valuation informations.
Notice that it contains informations on immediate or inherited value, not on the target of a redirected value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Attribute valuation informations has been retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
o GetAutoNumberingProvider
public GetAutoNumberingProvider( | | oFeature) |
-
Retrieves the Auto-Numbering Provider of a Feature.
- Parameters:
-
- oFeature
- [out] A (caller provided) value that will contain the Auto-Numbering Provider of this Feature,
or nothing (an empty Attribute Value) if the bound Feature has no Auto-Numbering Provider.
If the method fails oFeature is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oFeature has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature.
o GetBaseFeature
public GetBaseFeature( | | oFeature) |
-
Retrieves the Base Feature of a Feature Extension.
- Parameters:
-
- oFeature
- [out] A (caller provided) value that will contain the Base Feature of this Feature Extension.
If the method fails oFeature is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oFeature has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature Extension.
- E_ACCESSDENIED
- Credentials do not grant access to either this Feature Extension or the Base Feature.
o GetContainerFacade
public GetContainerFacade( | | oContainer) |
-
Retrieves the Container of a Feature.
- Parameters:
-
- oContainer
- [out] A (caller provided) Facade that will be bound to the Container of this Feature.
Notice that the Credentials of the provided Facade will not be used nor be modified.
If the method fails oContainer is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oContainer has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature.
o GetDisplayName
public GetDisplayName( | | oDisplayName) |
-
Retrieves the Display Name of a Feature.
- Parameters:
-
- oDisplayName
- [out] A (caller provided) string in which the Display Name of the Feature will be stored.
If the method fails oDisplayName is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Late Type has been successfuly retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature.
o GetExtension
public GetExtension( | const | iExtensionId, |
| | oExtension) |
-
Retrieves a Feature Extension from a Base Feature.
- Parameters:
-
- iExtensionId
- [in] The name of the Feature Extension that must be retrieved from this Base Feature.
Legal values:
- "`StartUpIdentifier`@`Catalog.CATfct`"
- "`StartUpIdentifier`#@`Catalog.CATfct`"
- "0u???????-????-????-????????????????@`Catalog.CATfct`"
Deprecated value (V5-6R2015 / 3DEXPERIENCER2015x):
- oExtension
- [out] A (caller provided) value that will contain the Feature Extension.
If method fails, oExtension is not modified.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oExtension has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- E_ACCESSDENIED
- Credentials do not grant access to either this Base Feature or the searched Feature Extension.
- E_FAIL
- No such Extension has been found on the Base Feature.
o GetExtensionId
public GetExtensionId( | | oExtensionId) |
-
Retrieves a Feature Extension Id.
- Parameters:
-
- oExtensionId
- [out] A string containing the ExtensionId of the Feature Extension.
If the method fails oExtensionId is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oExtensionId has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature Extension.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature Extension.
o GetExtensionUuid
public GetExtensionUuid( | | oExtensionUuid) |
-
Retrieves the Uuid of a Feature Extension.
- Parameters:
-
- oExtensionUuid
- [out] A string containing the UUID of the Feature Extension.
If the method fails oExtensionUuid is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oExtensionUuid has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature Extension.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature Extension.
o GetFeature
-
Returns the bound Feature through a CATBaseUnknown smart pointer.
Role: Use to retrieve an Applicative Modeler level interface on the bound Feature through smart pointers.
- Returns:
- A smart pointer to the Feature.
Warning: the exact type of the interface returned as a CATBaseUnknown pointer
is not part of the specification and may vary. Do not make any assumption about it.
o GetFeatureAsValue
public GetFeatureAsValue( | ) |
-
Returns the bound Feature as a value.
Role: Useful to use the bound Feature as the value of a SpecObject or Component attribute.
- Returns:
- A Feature Modeler Value.
o GetKnowledgeParameter
public GetKnowledgeParameter( | const | iAttributeName, |
| const | iIID, |
| | oPtr, |
| | iIndex | = -1) |
-
Retrieves a an interface pointer on a Knowledge parameter.
Role: This method allow to retrieve a knowledge parameter held by an attribute.
A knowledge parameter can be:
- A simple attribute with its sharp_type facet set to a valid Knowledge type.
- An object created through Knowledge interfaces (
) and referenced by a
attribute.
- Parameters:
-
- iAttributeName
- [in] The attribute name.
- iIID
- [in] The interface identifier for which a pointer is requested (for example
).
- oPtr
- [out, CATBaseUnknown#Release] The address where the returned pointer to the interface is located.
In case of success, this pointer must be released after use.
- iIndex
- [in] The optional index where the parameter must be retrieved.
If the attribute is not a list, default value of iIndex must be used,
else iIndex must be inside the bounds [1,size] of the attribute value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- A valid knowledge parameter has been retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_INVALIDARG
- oPtr is NULL or attribute is not a list and iIndex is not equal to -1.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMNOTAPARAMETER
- An object can be found at this place but it is not a Knowledge parameter.
- E_NOINTERFACE
- A Knowledge parameter can be retrieved but it does not implement requested interface.
- E_FAIL
- A NULL object has been found at this place.
o GetParentFeature
public GetParentFeature( | | oParent) |
-
Retrieves the Parent of a Feature.
- Parameters:
-
- oParent
- [out] A (caller provided) value that will contain the Parent of this Feature,
or nothing (an empty Attribute Value) if the bound Feature has no aggregating Feature.
If the method fails oParent is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oParent has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_FMNOTLOADED
- The Parent Feature cannot be reached because it is not loaded.
- E_ACCESSDENIED
- Credentials do not grant access to either the bound Feature or the Parent Feature.
o GetRedirectedValuation
public GetRedirectedValuation( | const | iAttributeName, |
| | oRedirectedFeature, |
| | oRedirectedAttributeName) |
-
Retrieves target feature and attribute of a redirected attribute.
Role: This method allows to retrieve the target feature and attribute of an attribute which has been redirected by
.
Notice that redirected attribute can be inherited.
- Parameters:
-
- iAttributeName
- [in] The attribute for which redirection target must be retrieved.
- oRedirectedFeature
- [out] The target feature of the redirected attribute.
- oRedirectedAttributeName
- [out] The target attribute of the redirected attribute.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Redirection target have been successfully retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMPRIVATEVALUE
- Value is private on an inherited feature.
- E_FAIL
- Attribute is not redirected.
- Other
- Another failure has occured.
o GetReference
public GetReference( | | oReference) |
-
Retrieves the Reference of a Feature.
- Parameters:
-
- oReference
- [out] A (caller provided) value that will contain the Reference of the bound Feature,
or nothing (an empty Attribute Value) if the bound Feature has been instantiated from a Feature Definition (StartUp).
If the method fails oReference is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oReference has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_FMNOTLOADED
- The Reference Feature cannot be reached because it is not loaded.
- E_ACCESSDENIED
- Credentials do not grant access to the bound Feature.
o GetRootParentFeature
public GetRootParentFeature( | | oRootParent) |
-
Retrieves the Root Parent of a Feature.
Role: This method is quite similar to iterative calls to GetParentFeature.
It only differs from successive calls to GetParentFeature by its credential requirements,
no accreditations related to the intermediate Features between this and the Root Features are needed.
- Parameters:
-
- oRootParent
- [out] A (caller provided) value that will contain the Root Parent of this Feature,
or nothing (an empty Attribute Value) if the bound Feature has no aggregating Feature.
If the method fails oRootParent is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- oRootParent has been successfuly valuated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_FMNOTLOADED
- The Root Parent Feature cannot be reached because it is not loaded.
- E_ACCESSDENIED
- Credentials do not grant access to either the bound Feature or to the Root Parent Feature.
o GetStartUpFacade
public GetStartUpFacade( | | oDefinition) |
-
Retireves the Feature Definition (StartUp) of a Feature.
- Parameters:
-
- oDefinition
- [out] A (caller provided) Facade that will be bound to the Feature Definition.
Notice that the Credentials of the provided Facade will not be used nor be modified.
If the method fails oDefinition is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Type Definition has been successfuly retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature.
o GetType
public GetType( | | oLateType) |
-
Retrieves the Late Type of a Feature.
- Parameters:
-
- oLateType
- [out] A (caller provided) string in which the Late Type of the Feature will be stored.
If the method fails oLateType is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Late Type has been successfuly retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature.
o GetValue
public GetValue( | const | iAttributeName, |
| | oAttributeValue) |
-
Retrieves value of attribute iAttributeName.
Role: This method allows to retrieve the whole value held by a feature attribute of any type and cardinality.
- Parameters:
-
- iAttributeName
- [in] The attribute for which value must be retrieved.
- oAttributeValue
- [out] Retrieved attribute value.
If method fails, oAttributeValue is not modified.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been retrieved.
- S_FALSE
- Value has been retrieved but attribute is unset, oAttributeValue will contain a default value (0 for numerical values, empty string for string values, empty list for lists).
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMREDIRECTED
- Attribute is redirected but is target cannot be retrieved.
- Other
- Another failure has occured.
o GetValueAtIndex
public GetValueAtIndex( | const | iAttributeName, |
| | iIndex, |
| | oAttributeValue) |
-
Retrieves value of attribute iAttributeName at a specified index.
Role:This method is similar to
, the difference is that it allows to retrieve only a specific item in a list.
Notice that you should preferably use
for iterations on list attributes.
- Parameters:
-
- iAttributeName
- [in] The attribute for which value must be retrieved.
- iIndex
- [in] Index of the item of the list to retrieve. Must be in the range [1,size].
- oAttributeValue
- [out] Retrieved attribute value.
If method fails, oAttributeValue is not modified.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been retrieved.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMOUTOFBOUND
- Index is not in the correct range.
- E_FMNOTALIST
- Attribute is not a list.
- E_FMREDIRECTED
- Attribute is redirected but is target cannot be retrieved.
- Other
- Another failure has occured.
o InsertValue
public InsertValue( | const | iAttributeName, |
| | iIndex, |
| const | iValue) |
-
Inserts a value at a given index of a list attribute.
Role:This method allows to insert an element at a given index in a list attribute.
This method has the same restrictions as
.
Notice that iIndex can be equal to size+1 in which case iValue is appended at the end of the list.
- Parameters:
-
- iAttributeName
- The attribute on which a value must be inserted.
- iIndex
- The index to modify. Must be in the range [1,size+1].
- iValue
- The value to insert.
This value must have the same type as the attribute and cardinality 1.
- Returns:
- An HRESULT value.
Return code values are the same as for
.
o InstantiateIn
public InstantiateIn( | const | iContainer, |
| | oInstance) |
-
Instantiates a Feature.
- Parameters:
-
- iContainer
- [in] A valid Facade bound to the container in which an Instance of this Feature must be created.
- oInstance
- [out] A (caller provided) value that will contain the created Instance.
If the method fails oInstance is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The instantiation succeeded.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature or the container.
- E_FMINVALIDFEATURE
- This Facade is not bound to a valid Base Feature.
- LCC_E_FAIL
- The currently used license does not authorize the requested operation.
- Other
- Another failure has occured.
o InstantiateUnder
public InstantiateUnder( | const | iContainer, |
| | iParent, |
| const | iAttributeName, |
| | oInstance) |
-
Instantiates a Feature.
Role: Instantiates a Feature and aggregates the new instance under an existing Feature.
- Parameters:
-
- iContainer
- [in] A valid Facade bound to the container in which an Instance of this Feature must be created.
- iParent
- [in] A valid Facade bound to the Feature that will agregate the new Instance.
- iAttributeName
- [in] The name of the component (or list of components) typed attribute that will be used for aggregation.
In case of a list, the new Feature is added at the end of the list. The attribute value must otherwise be empty.
- oInstance
- [out] A (caller provided) value that will contain the created Instance.
If the method fails oInstance is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The instantiation succeeded.
- E_ABORT
- The attribute is not a list and there is already a component.
- E_ACCESSDENIED
- Credentials do not grant access to the bound Feature, the target Container, the target Feature or its attribute.
- E_FMINVALIDFEATURE
- This Facade is not bound to a valid Base Feature.
- E_FMTYPEMISMATCH
- Attribute is not an aggregation attribute.
- LCC_E_FAIL
- The currently used license does not authorize the requested operation.
- Other
- Another failure has occured.
o IsSynchronized
public IsSynchronized( | const | iAttributeName, |
| | oSynchronized) |
-
Retrieves the synchronization status of a Feature.
Role: Checks whether a synchronization is needed on this Feature to match its Reference.
- Parameters:
-
- iAttributeName
- [in] The attribute name.
- oSynchronized
- [out] The synchronization status of a Feature
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The synchronization status has been computed or retrieved sucessfully and been stored in oSynchronized parameter.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- E_FMTYPEMISMATCH
- Attribute is not an aggregation attribute.
- Other
- Another failure has occured.
o IsUpToDate
-
Retrieves a Feature update status.
Role: This method allows to retrieve the update status of feature.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Feature is up to date.
- S_FALSE
- Feature is not up to date.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_FMUPDATEERROR
- An exception has been raised. Exception can be retrieved through
.
- Other
- Another failure has occured.
o IsValid
-
Checks the Facade validity.
A Feature Facade is valid if and only if it is bound to a Feature that has neither been Logically deleted nor unloaded.
- Returns:
- An boolean value.
Legal values:
- TRUE: if the Facade is valid.
- FALSE: if the Facade is invalid.
o LocateValue
public LocateValue( | const | iAttributeName, |
| const | iValue, |
| | oIndex, |
| | iFirstIndex | =1, |
| | iLastIndex | =0) |
-
Locates a value in an attribute.
Role:This method allows to locate the first occurence of a value in an attribute value.
You can specify the range and the direction of the search thanks to optional parameters iFirstIndex and iLastIndex.
by default the list is scanned starting from its first element to its last element.
Notice that a linear search is performed.
- Parameters:
-
- iAttributeName
- [in] The attribute to scan.
- iValue
- [in] The value to locate.
- oIndex
- [out] The index where the value has been found.
- iFirstIndex
- [in] Starting index of the search.
Must be in the range [0,size]
Specific value 0 means last item of the list.
iFirstIndex can be less than iLastIndex in which case search is made downward.
- iLastIndex
- [in] Last index of the search.
Must be in the range [0,size]
Specific value 0 means last item of the list.
iFirstIndex can be less than iLastIndex in which case search is made downward.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been found at index oIndex.
- S_FALSE
- Value has not been found. 0 has been assigned to oIndex.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_INVALIDARG
- iValue is a list or iValue is of type CATFmKind_void or CATFmKind_any.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMOUTOFBOUND
- iFirstIndex or iLastIndex is not in the correct range.
- E_FMNOTALIST
- Attribute is not a list.
- E_FMREDIRECTED
- Attribute is redirected but is target cannot be retrieved.
- Other
- Another failure has occured.
o MoveInPosition
public MoveInPosition( | const | iAttributeName, |
| | iSourceIndex, |
| | iTargetIndex) |
-
Moves an index in the list to another position.
Role:This method allows to move the content of an index of a list attribute to another index.
For instance:
List is [ A B C D E ].
after a call to MoveInPosition(4,2),
List is [ A D B C E ], D has been moved to position 2.
whereas
after a call to MoveInPosition(2,4),
List is [ A C D B E ], B has been moved to position 4.
- Parameters:
-
- iAttributeName
- [in] The attribute for which an item must be moved.
- iSourceIndex
- [in] The index of the item to move. Must be in the range [1,size].
- iTargetIndex
- [in] The index where the item must be moved. Must be in the range [1,size].
- Returns:
- An HRESULT value.
Return code values are the same as for
.
Notice that if iSourceIndex and iTargetIndex are equal and the value is immediate, then S_FALSE will be returned.
o QueryInterfaceOnFeature
public QueryInterfaceOnFeature( | const | iIID, |
| | oPPV) |
-
Retrieves the bound Feature through a user specified interface pointer.
Role: Use to query Applicative Modeler level interfaces on the bound Feature.
- Parameters:
-
- iIID
- [in] The interface identifier for which a pointer is requested.
- oPPV
- [out, CATBaseUnknown#Release] The address where the returned pointer to the interface is located.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The query succeeds.
- E_NOINTERFACE
- The interface does not exist.
- E_FMINVALIDFEATURE
- The object is not valid.
- E_OUTOFMEMORY
- A memory allocation failed.
- E_UNEXPECTED
- The query failed for any other reason.
- See also:
-
o RemoveExtension
public RemoveExtension( | const | iExtension) |
-
Deletes a Feature Extension.
- Parameters:
-
- iExtension
- [in] A value containing the Feature Extension that must be removed from its Base Feature.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Feature Extension has been successfuly deleted.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Base Feature or the Feature Extension to be removed.
- E_FAIL
- iExtension has not been found on the Base Feature.
- Other
- Another failure has occured.
o RemovePosition
public RemovePosition( | const | iAttributeName, |
| | iIndex) |
-
Removes an index from a list attribute.
Role:This method allows to remove a given index in a list attribute.
- Parameters:
-
- iAttributeName
- The attribute for which an index must be removed.
- iIndex
- The index to remove. Must be in the range [1,size].
- Returns:
- An HRESULT value.
Return code values are the same as for
.
o RemoveRedirectedValuation
public RemoveRedirectedValuation( | const | iAttributeName) |
-
Breaks the redirection to another attribute.
Role:This method allows to break a redirection link created by
.
After a call to this method, attribute value will become immediate (according to
).
Depending on the attribute type, attribute will take the following value:
- For simple types immediate value will become unset.
- For list of complex types, an empty list will be assigned.
- For single complex types, a NULL pointer will be assigned.
This method can be used only on a redirected attribute.
RemoveRedirectedValuation can cause the propagation of an update impact.
- Parameters:
-
- iAttributeName
- [in] The attribute for which redirection must be broken.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Redirection has been broken.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FAIL
- Attribute is not redirected.
- Other
- Another failure has occured.
o ReplaceValueAtIndex
public ReplaceValueAtIndex( | const | iAttributeName, |
| | iIndex, |
| const | iValue) |
-
Replaces value of attribute iAttributeName at a given index.
Role: This method allows to replace a given index of a list attribute by a new value.
This method can be used only on list attributes (for single attributes, use
).
This method cannot be used on a redirected attribute (use
to break redirection).
New value type and attribute value type must be strictly equal (for example,
and
are incompatible).
ReplaceValueAtIndex can cause the propagation of an update impact.
For aggregation attributes:
- Aggregation rules will be checked.
- Objects becoming not aggregated will be destroyed (
can be used as an alternative).
In case of failure, attribute will keep its old value.
Notice that in order to change all the elements of a list, you should preferably use
.
- Parameters:
-
- iAttributeName
- [in] The attribute on which a value must be replaced.
- iIndex
- [in] The index to modify. Must be in the range [1,size].
- iValue
- [in] The value which must be set.
This value must have the same type as the attribute and cardinality 1.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been modified.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMOUTOFBOUND
- Index is not in the correct range.
- E_INVALIDARG
- iValue has type
or a cardinality not equal to 1.
- E_FMNOTALIST
- Attribute is not a list.
- E_FMTYPEMISMATCH
- iValue type is not strictly equal to the one of the attribute.
- E_FMOPERATIONNOTALLOWED
- The operation is not allowed because:
- Attribute is redirected (use
to break redirection).
- Input value contains a NULL feature and attribute is not using array mode.
- Input value contains a feature which belongs to another stream unit.
- Operation leads to an obvious update cyle.
- E_FMAGGREGATIONERROR
- Operation leads to an aggregation rule violation:
- Target feature is yet aggregated by another feature.
- Target feature is yet aggregated by another attribute of this feature.
- Target feature is yet aggregated by this attribute at another index.
- Target feature is a direct or indirect father of this feature.
- Target feature is this feature.
- E_FMPRIVATEVALUE
- Value is private on an inherited feature.
- Other
- Another failure has occured.
o RestoreInheritance
public RestoreInheritance( | const | iAttributeName) |
-
Restores inheritance on an attribute.
Role:This method removes immediate value so that further calls to
or
will return the value inherited from reference feature.
After a call to this method, attribute value will become inherited (according to
).
This method does not work on aggregation attributes (use
).
RestoreInheritance can cause the propagation of an update impact.
- Parameters:
-
- iAttributeName
- [in] The attribute for which inheritance must be restored.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Attribute value is now inherited.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMPARAMETER
- Attribute represents a Knowledge parameter.
- E_FMOPERATIONNOTALLOWED
- Attribute represents an aggregation relation.
- Other
- Another failure has occured.
o ScanExtensions
public ScanExtensions( | | oExtensionsIterator) |
-
Scans the model for Feature Extensions related to a Base Feature.
Role: This method allows to scan the Feature Extensions found of this Base Feature.
If the Credentials provided to the Facade grant access to the Base feature the iterator will expose all Extensions,
the iterator will otherwise only expose the Feature Extensions the provided Credentials grant access to.
- Parameters:
-
- oExtensionsIterator
- [out] A (caller provided) Iterator that will be filled with the Feature Extensions related to the bound Base Feature.
If the method fails oExtensionsIterator is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Iterator has been successfuly populated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- Other
- Another failure has occured.
- See also:
-
o ScanExtensionsInContainer
public ScanExtensionsInContainer( | const | iContainerName, |
| | oExtensionsIterator) |
-
Scans a Feature Container for Feature Extensions related to a Base Feature.
Role: This method combines a call to:
with additionnal filtering performed on the container name.
The accreditation requirements for this method are consquently the same as those for
.
- Parameters:
-
- iContainerName
- [in] The name of the container, as in the resource file describing an extension or
in
(... iName ...).
- oExtensionsIterator
- [out] A (caller provided) Iterator that will be filled with the Feature Extensions related to the bound Base Feature.
If the method fails oExtensionsIterator is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
- See also:
-
o ScanPointingFeatures
public ScanPointingFeatures( | | oIterator) |
-
Scans the model for Features pointing the bound Feature.
Role: This method fills an iterator with the Features pointing the bound Feature.
If the Accreditations set on the Facade grant access to the bound feature the iterator will contain all pointing objects,
the iterator will otherwise only include the objects the Accreditations grant access to.
- Parameters:
-
- oIterator
- [out] A (caller provided) Iterator that will be filled with the Feature Extensions related to this Base Feature.
If the method fails oIterator is not modified, it is otherwise overwritten with the retrieved value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Iterator has been successfuly populated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- Other
- Another failure has occured.
- See also:
-
o SetAutoNumberingProvider
public SetAutoNumberingProvider( | const | iFeature) |
-
Set the Auto-Numbering Provider of a Feature.
- Parameters:
-
- iFeature
- [in] A value containing the Auto-Numbering Provider for this Feature.
An empty Attribute Value is valid and unsets any previously defined Provider.
Legal values:
- An empty (i.e. of CATFmKind_void type) Attribute Value.
- An Attribute Value of type CATFmKind_feature and of cardinality 1.
Any other value, such as an integer or a list with two or more elements, will be handled like a empty Attribute Value.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The Auto-Numbering Provider has been successfuly set.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Feature.
- E_ACCESSDENIED
- Credentials do not grant access to this Feature.
o SetRedirectedValuation
public SetRedirectedValuation( | const | iAttributeName, |
| const | iTargetFeature, |
| const | iTargetAttributeName) |
-
Creates a redirection from one attribute to another.
Role:This method creates a redirection link to another attribute so that further calls to
,
will return the value held by target attribute.
After a call to this method, attribute value will become redirected (according to
).
This method can be used on all types of attribute (list or not) with the exception of aggregation attributes (notice that target attribute can be an aggregation attribute) and external attributes.
Target attribute must be of the same type as the redirected attribute. They must also be both list attribute or both single attribute.
SetRedirectedValuation can cause the propagation of an update impact.
- Parameters:
-
- iAttributeName
- [in] The attribute to redirect.
- iTargetFeature
- [in] The target feature of the redirection.
- iTargetAttributeName
- [in] The target attribute of the redirection.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been modified.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute or target attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature or target attribute does not exist on target feature.
- E_FMPARAMETER
- Attribute represents a Knowledge parameter.
- E_INVALIDARG
- iTargetFeature does not contain one non NULL feature or iTargetAttributeName is empty.
- E_FMOPERATIONNOTALLOWED
- Operation is not allowed because:
- Attribute represents an aggregation or an external link.
- Redirected and target attribute have incompatible types.
- Redirection leads to an obvious redirection cycle.
- E_FMPRIVATEVALUE
- Value is private on an inherited feature.
- Other
- Another failure has occured.
o SetUpdateBehavior
public SetUpdateBehavior( | const | iAttributeName, |
| | iUpdateBehavior) |
-
Sets the update behavior of an attribute.
Role:By default update behavior of an attribute is inherited from the startup, it is nevertheless possible to change it
dynamically on instances through this method.
This operation should be used preferably for upgrade purpose.
Changing the behavior to
or
is forbidden during update algorithms and has an update impact on this feature or linked features.
- Parameters:
-
- iAttributeName
- [in] The attribute on which update behavior must overriden.
- iUpdateBehavior
- [in] The update behavior to assign.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Update behaviour has been overriden.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMOPERATIONNOTALLOWED
-
or
algorithm is currently called on this feature.
- E_FMPRIVATEVALUE
- Value is private on an inherited feature.
- Other
- Another failure has occured.
o SetValue
public SetValue( | const | iAttributeName, |
| const | iAttributeValue) |
-
Sets value of attribute iAttributeName.
Role:This method allows to set the value of an attribute.
After a call to this method, attribute value will become immediate (according to
).
This method can be used for all types of attributes, list or not.
This method cannot be used on a redirected attribute (use
to break redirection).
New value type and attribute value type must be strictly equal (for example, CATFmKind_int and CATFmKind_byte are incompatible).
SetValue can cause the propagation of an update impact.
For aggregation attributes:
- Aggregation rules will be checked.
- Objects becoming not aggregated will be destroyed (
can be used as an alternative).
In case of failure, attribute will keep its old value.
- Parameters:
-
- iAttributeName
- [in] The attribute for which value must be set.
- iAttributeValue
- [in] The value which must be set.
This value must have the same type as the attribute and a cardinality compatible with attribute cardinality.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been modified.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_INVALIDARG
- iAttributeValue has type CATFmKind_void.
- E_FMPARAMETER
- Attribute represents a Knowledge parameter. Use
and Knowledge API to modify its value.
- E_FMNOTALIST
- Attribute is not a list but iAttributeValue has a size different of 1.
- E_FMTYPEMISMATCH
- iAttributeValue type is not strictly equal to the one of the attribute.
- E_FMOPERATIONNOTALLOWED
- Operation is not allowed because:
- Attribute is redirected (use
to break redirection).
- Input value contains a NULL feature and attribute is not using array mode.
- Input value contains a feature which belongs to another stream unit.
- Operation leads to an obvious update cycle or to an update error.
- E_FMAGGREGATIONERROR
- Operation leads to an aggregation rule violation:
- A target feature is yet aggregated by another feature.
- A target feature is yet aggregated by another attribute of this feature.
- A target feature is duplicated in input value.
- A target feature is a direct or indirect father of this feature.
- A target feature is this feature.
- E_FMPRIVATEVALUE
- Value is private on an inherited feature.
- Other
- Another failure has occured.
o SwapPositions
public SwapPositions( | const | iAttributeName, |
| | iIndex1, |
| | iIndex2) |
-
Swaps two index in a list attribute.
Role:This method allows to swap the content of two index of a list attribute.
For instance:
list is [ A B C D ].
after a call to SwapPositions(2,4),
list is [ A D C B ].
- Parameters:
-
- iAttributeName
- [in] The attribute for which index must be swapped.
- iIndex1
- [in] First index. Must be in the range [1,size].
- iIndex2
- [in] Second index. Must be in the range [1,size].
- Returns:
- An HRESULT value.
Return code values are the same as for
.
Notice that if iIndex1 and iIndex2 are equal and the value is immediate, then S_FALSE will be returned.
o Synchronize
public Synchronize( | const | iAttributeName) |
-
Synchronizes a Feature.
Role: When a Feature is instantiated, all its components (i.e. the content of all attributes typed as "component")
are (recursively) instantiated.
If a component is added on the Reference after the Instance has been created, there is no such component under the instance,
opposite to what would be seen on a new instance. Similarly, components deleted from the reference still have alive instances.
The Synchronization will add missing components to and remove extraneous components from the instance with respect to its reference.
Limitation: this method is not recursive on components, as attributes meaningful for a given Feature type and
acess rights needed to modify that Feature may likely not be applicable to its components.
- Parameters:
-
- iAttributeName
- [in] The attribute name.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The synchronization of this feature succeeded.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid Base Feature.
- E_FMTYPEMISMATCH
- Attribute is not an aggregation attribute.
- Other
- Another failure has occured.
o UnsetValue
public UnsetValue( | const | iAttributeName) |
-
Unsets the value of an attribute.
Role: This method allows to unset the value of a "primitive" attribute.
After a call to this method, attribute value will become immediate and will not be seen as set anymore (according to
).
This method can be used only on attributes (list or not) of primitive types:
- CATFmKind_boolean
- CATFmKind_byte
- CATFmKind_int
- CATFmKind_double
- CATFmKind_string
This method cannot be used on a redirected attribute (use
to break redirection).
UnsetValue can cause the propagation of an update impact.
- Parameters:
-
- iAttributeName
- [in] The attribute for which value must be unset.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Value has been modified.
- S_FALSE
- Operation has been successfully performed but let the feature unchanged.
No update impact has been propagated.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_ACCESSDENIED
- Credentials do not grant access to this attribute.
- E_FMKEYNOTFOUND
- Attribute iAttributeName does not exist on this feature.
- E_FMPARAMETER
- Attribute represents a Knowledge parameter. Use
and Knowledge API to unset its value.
- E_FMOPERATIONNOTALLOWED
- The operation is not allowed because:
- Attribute is redirected (use
to break redirection).
- Attribute is not primitive and does not support unset.
- E_FMPRIVATEVALUE
- Value is private on an inherited feature.
- Other
- Another failure has occured.
- See also:
-
o Update
-
Updates a Feature.
Role: This method allows to update a Feature.
In case of success
will return S_OK.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Feature has been succesfully updated and is now up to date.
- S_FALSE
- Feature was yet up to date.
- E_FMINVALIDFEATURE
- Facade is not bound to a valid feature.
- E_FMUPDATEERROR
- An exception has been raised. Exception can be retrieved through
.
- Other
- Another failure has occured.
o operator!
-
Logical-negation (or logical-NOT) operator.
Role: Checks if the Facade is invalid.
A Feature Facade is valid if and only if it is bound to a Feature that has neither been Logically deleted nor unloaded.
- Returns:
- An integer value.
Legal values:
- 1: if the Facade is invalid.
- 0: if the Facade is valid.
o operator=
public operator=( | | iFeature) |
-
Binds the Facade to a Feature.
This method does not affect the Accreditations Set of the Facade.
- Parameters:
-
- iFeature
- [in] Any interface pointer to the Feature as a CATBaseUnknown pointer.
Legal values:
- NULL
- Any interface pointer on a Feature.
Any other value, such as an interface pointer to a Feature Container, will be handled like a NULL pointer.
Lifecycle: Refer to the Lifecycle section of the
class documentation.
- Returns:
- This Facade.
o operator=
public operator=( | const | iFeatureFacade) |
-
Assignment operator.
Role: This method transforms this Facade to an exact copy of another Feature Facade.
Both the Accreditations Set and the bound Feature are copied.
- Parameters:
-
- iFeatureFacade
- [in] The Facade to copy.
- Returns:
- This Facade.
o operator=
public operator=( | const | iFeature) |
-
Binds the Facade to a Feature.
This method does not affect the Accreditations Set of the Facade.
- Parameters:
-
- iFeature
- [in] An Feature Modeler Value.
Legal values:
- An empty (i.e. of CATFmKind_void type) Attribute Value.
- An Attribute Value of type CATFmKind_feature and of cardinality 1.
Any other value, such as an integer or a list with two or more elements, will be handled like a empty Attribute Value.
Lifecycle: Refer to the Lifecycle section of the
class documentation.
- Returns:
- This Facade.
This object is included in the file: CATFmFeatureFacade.h
If needed, your Imakefile.mk should include the module: FeatureModelerExt
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.