FeatureModelerExt CATFmAttributeValue

Usage: you must use this class as is. You should never derive it.


public class CATFmAttributeValue

Class representing the value of a Feature Attribute.

Role: A CATFmAttributeValue is a variant object able to hold all the types of values a Feature Attribute can bear.

The types supported are represented by the enumeration .

A CATFmAttributeValue is always a list of values, a single value being represented by a list of cardinality 1.

Index of list operations start at 1.

Methods that always succeed return a reference to the modified instance which allows to chain operations.


Constructor and Destructor Index


o CATFmAttributeValue()
Constructs an empty CATFmAttributeValue.
o CATFmAttributeValue(int)
Constructs a CATFmAttributeValue instance from an integer.
o CATFmAttributeValue(double)
Constructs a CATFmAttributeValue instance from a double.
o CATFmAttributeValue(CATUnicodeString&)
Constructs a CATFmAttributeValue instance from an unicode string.
o CATFmAttributeValue(CATFmAttributeValue&)
Copy constructor.
o ~CATFmAttributeValue()
Destructor.

Method Index


o Append(CATFmAttributeValue&)
Appends a CATFmAttributeValue instance at the end of the list.
o BuildFromCArrayOfBoolean(CATBoolean*,int)
Assigns a C array of boolean to a CATFmAttributeValue instance.
o BuildFromCArrayOfByte(unsigned char*,int)
Assigns a C array of byte to a CATFmAttributeValue instance.
o BuildFromCArrayOfDouble(double*,int)
Assigns a C array of double to a CATFmAttributeValue instance.
o BuildFromCArrayOfInt(int*,int)
Assigns a C array of integer to a CATFmAttributeValue instance.
o BuildFromCArrayOfString(CATUnicodeString*,int)
Assigns a C array of CATUnicodeString to a CATFmAttributeValue instance.
o BuildFromListOfDouble(CATRawColldouble&)
Assigns a CATRawColldouble list of double to a CATFmAttributeValue instance.
o BuildFromListOfFeatures(CATListValCATBaseUnknown_var&)
Assigns a CATListValCATBaseUnknown_var list of feature to a CATFmAttributeValue instance.
o BuildFromListOfInt(CATRawCollint&,CATFmAttributeAndValueKind)
Assigns a CATRawCollint list of integer to a CATFmAttributeValue instance.
o BuildFromListOfString(CATListValCATUnicodeString&)
Assigns a CATListValCATUnicodeString list of string to a CATFmAttributeValue instance.
o Clear()
Resets a CATFmAttributeValue to default value.
o ConvertToCArrayOfBoolean(CATBoolean*,int)
Converts a CATFmAttributeValue instance to a C array of boolean.
o ConvertToCArrayOfByte(unsigned char*,int)
Converts a CATFmAttributeValue instance to a C array of byte.
o ConvertToCArrayOfDouble(double*,int)
Converts a CATFmAttributeValue instance to a C array of double.
o ConvertToCArrayOfInt(int*,int)
Converts a CATFmAttributeValue instance to a C array of integer.
o ConvertToCArrayOfString(CATUnicodeString*,int)
Converts a CATFmAttributeValue instance to a C array of
o ConvertToListOfDouble(CATRawColldouble&)
Converts a CATFmAttributeValue instance to a CATRawColldouble list of double.
o ConvertToListOfFeatures(CATListValCATBaseUnknown_var&)
Converts a CATFmAttributeValue instance to a CATListValCATBaseUnknown_var list of string.
o ConvertToListOfInt(CATRawCollint&)
Converts a CATFmAttributeValue instance to a CATRawCollint list of integer.
o ConvertToListOfString(CATListValCATUnicodeString&)
Converts a CATFmAttributeValue instance to a CATListValCATUnicodeString list of string.
o CreateEmptyList(CATFmAttributeAndValueKind)
Creates a CATFmAttributeValue instance of type iKind and cardinality 0.
o Get(int,CATFmAttributeValue&)
Retrieves the value at index iIndex of a CATFmAttributeValue instance.
o GetBoolean(CATBoolean&)
Retrieves the boolean value held by a CATFmAttributeValue instance.
o GetByte(unsigned char&)
Retrieves the byte value held by a CATFmAttributeValue instance.
o GetDouble(double&)
Retrieves the double value held by a CATFmAttributeValue instance.
o GetExternalObject(CATOmbObjectInContext_var&)
Retrieves the CATOmbObjectInContext instance value held by a CATFmAttributeValue instance.
o GetFeature()
Retrieves the feature held by a CATFmAttributeValue instance.
o GetFeature(CATFmFeatureFacade&)
Retrieves the feature held by a CATFmAttributeValue instance.
o GetInteger(int&)
Retrieves the integer value held by a CATFmAttributeValue instance.
o GetLinkFacade(PLMPublicLinkFacade&)
Retrieve the PLMPublicLinkFacade instance associated to a CATFmAttributeValue instance.
o GetString(CATUnicodeString&)
Retrieves the string value held by a CATFmAttributeValue instance.
o Insert(int,CATFmAttributeValue&)
Inserts a CATFmAttributeValue instance at index iIndex.
o Kind()
Gets the kind of a CATFmAttributeValue instance.
o QueryInterfaceOnFeature(IID&,void**)
Retrieves an interface pointer on the feature held by a CATFmAttributeValue instance.
o Remove(int)
Removes index iIndex from the list.
o Set(int,CATFmAttributeValue&)
Assigns a CATFmAttributeValue instance at index iIndex.
o SetBoolean(CATBoolean)
Assigns a boolean value to a CATFmAttributeValue instance.
o SetByte(unsigned char)
Assigns a byte value to a CATFmAttributeValue instance.
o SetDouble(double)
Assigns a double value to a CATFmAttributeValue instance.
o SetExternalObject(CATOmbObjectInContext*)
Assigns a CATOmbObjectInContext instance to a CATFmAttributeValue.
o SetFeature(CATBaseUnknown*)
Assigns a feature to a CATFmAttributeValue instance.
o SetFeature(CATFmFeatureFacade&)
Assigns the feature held by a CATFmFeatureFacade to a CATFmAttributeValue instance.
o SetInteger(int)
Assigns an integer value to a CATFmAttributeValue instance.
o SetString(CATUnicodeString&)
Assigns a string value to a CATFmAttributeValue instance.
o Size()
Gets the cardinality of a CATFmAttributeValue instance.
o Swap(CATFmAttributeValue&,CATFmAttributeValue&)
Swaps the values of two CATFmAttributeValue instances.
o operator !=(CATFmAttributeValue&)
Inequality operator.
o operator =(CATFmAttributeValue&)
Assignment operator from a CATFmAttributeValue instance.
o operator ==(CATFmAttributeValue&)
Equality operator.
o operator [](int)
Subscripting operator.

Constructor and Destructor


o CATFmAttributeValue
public CATFmAttributeValue()
Constructs an empty CATFmAttributeValue.
An empty (or void) CATFmAttributeValue instance is of type and of cardinality 0.
o CATFmAttributeValue
public CATFmAttributeValue( iValue)
Constructs a CATFmAttributeValue instance from an integer.
Resulting CATFmAttributeValue instance will be of type and of cardinality 1.
Parameters:
iValue
[in] The integer value to assign.
o CATFmAttributeValue
public CATFmAttributeValue( iValue)
Constructs a CATFmAttributeValue instance from a double.
Resulting CATFmAttributeValue instance will be of type and of cardinality 1.
Parameters:
iValue
[in] The double value to assign.
o CATFmAttributeValue
public CATFmAttributeValue( const iValue)
Constructs a CATFmAttributeValue instance from an unicode string.
Resulting CATFmAttributeValue instance will be of type and of cardinality 1.
Parameters:
iValue
[in] The
to assign.
o CATFmAttributeValue
public CATFmAttributeValue( const iValue)
Copy constructor.
Parameters:
iValue
[in] The CATFmAttributeValue to copy. Notice that thanks to copy-on-write mechanisms, copy is almost free.
o ~CATFmAttributeValue
public ~CATFmAttributeValue()
Destructor.

Methods


o Append
public Append( const iValue)
Appends a CATFmAttributeValue instance at the end of the list.
This method is a shortcut for after the last index of the list.
Parameters:
iValue
[in] The value to append.
Returns:
A reference to this instance.
o BuildFromCArrayOfBoolean
public BuildFromCArrayOfBoolean( const iArrayOfBoolean,
iSize)
Assigns a C array of boolean to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iSize.
Parameters:
iArrayOfBoolean
[in] The C array of boolean to assign. If NULL, a 0 cardinality list will be built.
iSize
[in] The size of the C array of boolean to assign. If less than 0, a 0 cardinality list will be built.
Returns:
A reference to this instance.
o BuildFromCArrayOfByte
public BuildFromCArrayOfByte( const iArrayOfByte,
iSize)
Assigns a C array of byte to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iSize.
Parameters:
iArrayOfByte
[in] The C array of byte to assign. If NULL, a 0 cardinality list will be built.
iSize
[in] The size of the C array of byte to assign. If less than 0, a 0 cardinality list will be built.
Returns:
A reference to this instance.
o BuildFromCArrayOfDouble
public BuildFromCArrayOfDouble( const iArrayOfDouble,
iSize)
Assigns a C array of double to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iSize.
Parameters:
iArrayOfDouble
[in] The C array of double to assign. If NULL, a 0 cardinality list will be built.
iSize
[in] The size of the C array of double to assign. If less than 0, a 0 cardinality list will be built.
Returns:
A reference to this instance.
o BuildFromCArrayOfInt
public BuildFromCArrayOfInt( const iArrayOfInteger,
iSize)
Assigns a C array of integer to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iSize.
Parameters:
iArrayOfInteger
[in] The C array of integer to assign. If NULL, a 0 cardinality list will be built.
iSize
[in] The size of the C array of integer to assign. If less than 0, a 0 cardinality list will be built.
Returns:
A reference to this instance.
o BuildFromCArrayOfString
public BuildFromCArrayOfString( const iArrayOfUnicodeString,
iSize)
Assigns a C array of CATUnicodeString to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iSize.
Parameters:
iArrayOfUnicodeString
[in] The C array of
to assign. If NULL, a 0 cardinality list will be built.
iSize
[in] The size of the C array of unicode string to assign. If less than 0, a 0 cardinality list will be built.
Returns:
A reference to this instance.
o BuildFromListOfDouble
public BuildFromListOfDouble( const iListOfDouble)
Assigns a CATRawColldouble list of double to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iListOfDouble.Size().
Parameters:
iListOfDouble
[in] The list of double to copy.
Returns:
A reference to this instance.
o BuildFromListOfFeatures
public BuildFromListOfFeatures( const iListOfFeature)
Assigns a CATListValCATBaseUnknown_var list of feature to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iListOfFeature.Size().
Parameters:
iListOfFeature
[in] The list of feature to copy.
Notice that similarly to
, invalid features will be treated as NULL pointers.
Returns:
A reference to this instance.
o BuildFromListOfInt
public BuildFromListOfInt( const iListOfInt,
iKind=CATFmKind_int)
Assigns a CATRawCollint list of integer to a CATFmAttributeValue instance.
Optional input kind iKind allows to specify the type of the resulting CATFmAttributeValue instance.
Parameters:
iListOfInt
[in] The list of integer to copy.
iKind
[in] The kind of the CATFmAttributeValue instance to build.
Legal values:
Instance type will become CATFmKind_boolean.
Instance type will become CATFmKind_byte.
Instance type will become CATFmKind_int. This is the default value
In other cases, instance will be reset to default value (CATFmKind_void).
Returns:
A reference to this instance.
o BuildFromListOfString
public BuildFromListOfString( const iListOfUnicodeString)
Assigns a CATListValCATUnicodeString list of string to a CATFmAttributeValue instance.
Resulting CATFmAttributeValue instance will be of type and of cardinality iListOfUnicodeString.Size().
Parameters:
iListOfUnicodeString
[in] The list of unicode string to copy.
Returns:
A reference to this instance.
o Clear
public Clear()
Resets a CATFmAttributeValue to default value.
Default value is the same as the one obtained through the default constructor.
Returns:
A reference to this instance.
o ConvertToCArrayOfBoolean
public ConvertToCArrayOfBoolean( oArrayOfBoolean,
iArraySize)
Converts a CATFmAttributeValue instance to a C array of boolean.
Type of the instance must be .
Parameters:
oArrayOfBoolean
[out] The C array where to copy CATFmAttributeValue content.
oArrayOfBoolean must be not NULL and must be able to hold at least iArraySize items.
Note: In case of failure, iArraySize elements of oArrayOfBoolean will be set to 0.
iArraySize
[in] The number of elements to copy to oArrayOfBoolean.
It must be equal to the size of the CATFmAttributeValue instance.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a C array of boolean.
S_FALSE
Instance size is 0.
E_INVALIDARG
iArraySize is not equal to instance size or oArrayOfBoolean is NULL.
E_FMTYPEMISMATCH
Instance type is not .
o ConvertToCArrayOfByte
public ConvertToCArrayOfByte( oArrayOfByte,
iArraySize)
Converts a CATFmAttributeValue instance to a C array of byte.
Type of the instance must be .
Parameters:
oArrayOfByte
[out] The C array where to copy CATFmAttributeValue content.
oArrayOfByte must be not NULL and must be able to hold at least iArraySize items.
Note: In case of failure, iArraySize elements of oArrayOfByte will be set to 0.
iArraySize
[in] The number of elements to copy to oArrayOfByte.
It must be equal to the size of the CATFmAttributeValue instance.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a C array of byte.
S_FALSE
Instance size is 0.
E_INVALIDARG
iArraySize is not equal to instance size or oArrayOfByte is NULL.
E_FMTYPEMISMATCH
Instance type is not .
o ConvertToCArrayOfDouble
public ConvertToCArrayOfDouble( oArrayOfDouble,
iArraySize)
Converts a CATFmAttributeValue instance to a C array of double.
Type of the instance must be .
Parameters:
oArrayOfDouble
[out] The C array where to copy CATFmAttributeValue content.
oArrayOfDouble must be not NULL and must be able to hold at least iArraySize items.
Note: In case of failure, iArraySize elements of oArrayOfInteger will be set to 0.
iArraySize
[in] The number of elements to copy to oArrayOfDouble.
It must be equal to the size of the CATFmAttributeValue instance.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a C array of double.
S_FALSE
Instance size is 0.
E_INVALIDARG
iArraySize is not equal to instance size or oArrayOfDouble is NULL.
E_FMTYPEMISMATCH
Instance type is not .
o ConvertToCArrayOfInt
public ConvertToCArrayOfInt( oArrayOfInteger,
iArraySize)
Converts a CATFmAttributeValue instance to a C array of integer.
Type of the instance must be .
Parameters:
oArrayOfInteger
[out] The C array where to copy CATFmAttributeValue content.
oArrayOfInteger must be not NULL and must be able to hold at least iArraySize items.
Note: In case of failure, iArraySize elements of oArrayOfInteger will be set to 0.
iArraySize
[in] The number of elements to copy to oArrayOfInteger.
It must be equal to the size of the CATFmAttributeValue instance.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a C array of integer.
S_FALSE
Instance size is 0.
E_INVALIDARG
iArraySize is not equal to instance size or oArrayOfInteger is NULL.
E_FMTYPEMISMATCH
Instance type is not .
o ConvertToCArrayOfString
public ConvertToCArrayOfString( oArrayOfString,
iArraySize)
Converts a CATFmAttributeValue instance to a C array of .
Type of the instance must be .
Parameters:
oArrayOfString
[out] The C array where to copy CATFmAttributeValue content.
oArrayOfString must be not NULL and must be able to hold at least iArraySize items.
Note: In case of failure, iArraySize elements of oArrayOfInteger will be set to empty string.
iArraySize
[in] The number of elements to copy to oArrayOfString.
It must be equal to the size of the CATFmAttributeValue instance.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a C array of CATUnicodeString.
S_FALSE
Instance size is 0.
E_INVALIDARG
iArraySize is not equal to instance size or oArrayOfString is NULL.
E_FMTYPEMISMATCH
Instance type is not .
o ConvertToListOfDouble
public ConvertToListOfDouble( oListOfDouble)
Converts a CATFmAttributeValue instance to a CATRawColldouble list of double.
This method works on CATFmAttributeValue instance of type .
Parameters:
oListOfDouble
[out] The list of double to assign.
In case of failure oListOfDouble will be resized to 0.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a list of double.
E_FMTYPEMISMATCH
Instance type is not .
o ConvertToListOfFeatures
public ConvertToListOfFeatures( oListOfFeature)
Converts a CATFmAttributeValue instance to a CATListValCATBaseUnknown_var list of string.
This method works on CATFmAttributeValue instance of type .
Parameters:
oListOfFeature
[out] The list of feature to assign.
In case of failure oListOfFeature will be resized to 0.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a list of feature.
E_FMTYPEMISMATCH
Instance type is not .
E_FMNOTLOADED
At least one feature in the list is not loaded.
E_FMINVALIDFEATURE
At least one feature in the list is not valid.
o ConvertToListOfInt
public ConvertToListOfInt( oListOfInteger)
Converts a CATFmAttributeValue instance to a CATRawCollint list of integer.
This method works on CATFmAttributeValue instance of type , or .
Parameters:
oListOfInteger
[out] The list of integer to assign.
In case of failure oListOfInteger will be resized to 0.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a list of integer.
E_FMTYPEMISMATCH
Instance type is not , or .
o ConvertToListOfString
public ConvertToListOfString( oListOfString)
Converts a CATFmAttributeValue instance to a CATListValCATUnicodeString list of string.
This method works on CATFmAttributeValue instance of type .
Parameters:
oListOfString
[out] The list of unicode string to assign.
In case of failure oListOfString will be resized to 0.
Returns:
An HRESULT value.
Legal values:
S_OK
Instance has been successfully converted to a list of unicode string.
E_FMTYPEMISMATCH
Instance type is not .
o CreateEmptyList
public static CreateEmptyList( iKind)
Creates a CATFmAttributeValue instance of type iKind and cardinality 0.
Parameters:
iKind
[in] Type type of the instance to create.
Returns:
A CATFmAttributeValue instance of type iKind and cardinality 0. This method can be usefull for example in order to resize a feature attribute value to 0 using .
o Get
public Get( iIndex,
oValue)
Retrieves the value at index iIndex of a CATFmAttributeValue instance.
Parameters:
iIndex
[in] The index of the value to retrieve.
This index must be greater (strictly) than 0 and less than or equal to instance cardinality.
oValue
[out] The value at index iIndex of this instance. In case of failure default value is assigned to oValue.
Returns:
An HRESULT value.
Legal values:
S_OK
A value has been retrieved at given index.
E_FMOUTOFBOUND
Index iIndex is out of bounds [1,Size()].
o GetBoolean
public GetBoolean( oBoolean)
Retrieves the boolean value held by a CATFmAttributeValue instance.
Parameters:
oBoolean
[out] The boolean value retrieved. In case of failure, FALSE will be assigned to it.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is and its size is 1.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
o GetByte
public GetByte( oByte)
Retrieves the byte value held by a CATFmAttributeValue instance.
Parameters:
oByte
[out] The byte value retrieved. In case of failure, 0 will be assigned to it.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is and its size is 1.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
o GetDouble
public GetDouble( oDouble)
Retrieves the double value held by a CATFmAttributeValue instance.
Parameters:
oDouble
[out] The double value retrieved. In case of failure, 0 will be assigned to it.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is and its size is 1.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
o GetExternalObject
public GetExternalObject( oObjectInContext)
Retrieves the CATOmbObjectInContext instance value held by a CATFmAttributeValue instance.
Parameters:
oObjectInContext
[out] A smart pointer to the object in context retrieved.
In case of failure, NULL will be assigned to it.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is , its cardinality is 1 and a non NULL object in context has been retrieved
S_FALSE
The instance kind is , its cardinality is 1 but NULL object in context has been retrieved
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
Other
Other hresults can occur if the set pointed PLM component could not be loaded or the pointed object does not exist in the pointed PLM component any more.
In these cases, more information on the cause can be obtained with .
o GetFeature
public GetFeature()
Retrieves the feature held by a CATFmAttributeValue instance.
Returns:
The feature held by this instance. A NULL pointer will be returned in all failure cases detailed in other GetFeature method.
o GetFeature
public GetFeature( oFeatureFacade)
Retrieves the feature held by a CATFmAttributeValue instance.
Parameters:
oFeatureFacade
[out] The feature retrieved. In case of failure, the facade is no more bound to a feature.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is , its size is 1 and the value contains a non NULL feature.
S_FALSE
The instance kind is , its size is 1 but the value contains a NULL feature.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
E_FMNOTLOADED
The feature is not loaded.
E_FMINVALIDFEATURE
The feature is not valid.
o GetInteger
public GetInteger( oInteger)
Retrieves the integer value held by a CATFmAttributeValue instance.
Parameters:
oInteger
[out] The integer value retrieved. In case of failure, 0 will be assigned to it.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is and its size is 1.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
o GetLinkFacade
public GetLinkFacade( oLinkFacade)
Retrieve the PLMPublicLinkFacade instance associated to a CATFmAttributeValue instance.
Parameters:
oLinkFacade
[out]
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is , its cardinality is 1 and the associated facade has been retrieved.
S_FALSE
The instance kind is , its cardinality is 1 but no facade has been retrieved because the external object has been set to a NULL value.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
Other
Other hresults can occur.
o GetString
public GetString( oUnicodeString)
Retrieves the string value held by a CATFmAttributeValue instance.
Parameters:
oUnicodeString
[out] The string value retrieved. In case of failure, empty string will be assigned to it.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is and its size is 1.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
o Insert
public Insert( iIndex,
const iValue)
Inserts a CATFmAttributeValue instance at index iIndex.
Parameters:
iIndex
[in] The index where the value must be inserted.
This index must be greater (strictly) than 0 and less than or equal to this instance cardinality + 1.
iValue
[in] The CATFmAttributeValue instance to insert.
iValue must be of cardinality 1 and its kind cannot be CATFmKind_any or CATFmKind_void.
Note: If this instance is not unset (CATFmKind_void) and iValue has not the same type, this instance type will become CATFmKind_any.
Returns:
An HRESULT value.
Legal values:
S_OK
The value has been succesfully inserted at given index.
E_FMOUTOFBOUND
Index iIndex is out of bound.
E_INVALIDARG
Input instance iValue has cardinality different from 1 or its type is CATFmKind_any.
o Kind
public Kind()
Gets the kind of a CATFmAttributeValue instance.
Returns:
The of the CATFmAttributeValue instance.
o QueryInterfaceOnFeature
public QueryInterfaceOnFeature( const iIID,
oPtr)
Retrieves an interface pointer on the feature held by a CATFmAttributeValue instance.
Parameters:
iIID
[in] The interface identifier for which a pointer is requested.
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.
Returns:
An HRESULT value.
Legal values:
S_OK
The instance kind is , its size is 1 and the value contains a non NULL feature which implements requested interface.
E_INVALIDARG
Output pointer oPtr is NULL.
E_POINTER
The instance kind is , its size is 1 but the value contains a NULL feature.
E_FMTYPEMISMATCH
The instance kind is not .
E_FMNOTASINGLE
The instance size is not equal to 1.
E_FMNOTLOADED
The feature is not loaded.
E_FMINVALIDFEATURE
The feature is not valid.
E_NOINTERFACE
The feature does not implement requested interface.
o Remove
public Remove( iIndex)
Removes index iIndex from the list.
Parameters:
iIndex
[in] The index which must be removed.
This index must be greater (strictly) than 0 and less than or equal to instance cardinality.
Returns:
An HRESULT value.
Legal values:
S_OK
Input index was succesfully removed.
E_FMOUTOFBOUND
Input index is out of bound.
o Set
public Set( iIndex,
const iValue)
Assigns a CATFmAttributeValue instance at index iIndex.
Parameters:
iIndex
[in] The index where the value must be set.
This index must be greater (strictly) than 0 and less than or equal to instance cardinality.
iValue
[in] The CATFmAttributeValue instance to assign.
iValue must be of cardinality 1 and its kind cannot be CATFmKind_any or CATFmKind_void.
Note: If this instance is not unset (
and iValue has not the same type, this instance type will become .
Returns:
An HRESULT value.
Legal values:
S_OK
The value has been succesfully set at given index.
E_FMOUTOFBOUND
Index iIndex is out of bounds [1,Size()].
E_INVALIDARG
Input instance iValue has a cardinality different from 1 or its type is .
o SetBoolean
public SetBoolean( iBoolean)
Assigns a boolean value to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iBoolean
[in] The boolean value to assign.
Returns:
A reference to this instance.
o SetByte
public SetByte( iByte)
Assigns a byte value to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iByte
[in] The byte value to assign.
Returns:
A reference to this instance.
o SetDouble
public SetDouble( iDouble)
Assigns a double value to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iDouble
[in] The double value to assign.
Returns:
A reference to this instance.
o SetExternalObject
public SetExternalObject( const iObjectInContext)
Assigns a CATOmbObjectInContext instance to a CATFmAttributeValue.
Resulting instance will have kind and cardinality 1.
Parameters:
iObjectInContext
[in] A pointer to a
instance (can be NULL).
Returns:
A reference to this instance.
o SetFeature
public SetFeature( const iObject)
Assigns a feature to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iObject
[in] A pointer to a
instance (can be NULL).
Notice that if iObject is not a feature, it will be treated as a NULL pointer.
Returns:
A reference to this instance.
o SetFeature
public SetFeature( const iFeatureFacade)
Assigns the feature held by a CATFmFeatureFacade to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iFeatureFacade
[in] The
instance to assign.
Returns:
A reference to this instance.
o SetInteger
public SetInteger( iInteger)
Assigns an integer value to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iInteger
[in] The integer value to assign.
Returns:
A reference to this instance.
o SetString
public SetString( const iUnicodeString)
Assigns a string value to a CATFmAttributeValue instance.
Resulting instance will have kind and cardinality 1.
Parameters:
iUnicodeString
[in] The string value to assign.
Returns:
A reference to this instance.
o Size
public Size()
Gets the cardinality of a CATFmAttributeValue instance.
Returns:
The size of the CATFmAttributeValue instance.
o Swap
public static Swap( ioValue1,
ioValue2)
Swaps the values of two CATFmAttributeValue instances.
Parameters:
ioValue1
[in, out] The first instance.
ioValue2
[in, out] The second instance.
o operator !=
public operator !=( const iValue)
Inequality operator.
Parameters:
iValue
The instance to compare with this instance.
Returns:
  • 0 : Instances are equal.
  • other: Instances are not equal.
o operator =
public operator =( const iValue)
Assignment operator from a CATFmAttributeValue instance.
Parameters:
iValue
[in] The CATFmAttributeValue instance to copy.
Notice that thanks to copy-on-write mechanism, copy is practically free.
Returns:
A reference to this instance.
o operator ==
public operator ==( const iValue)
Equality operator.
Parameters:
iValue
The instance to compare with this instance.
Returns:
  • 0 : Instances are not equal.
  • other: Instances are equal.
o operator []
public operator []( iIndex)
Subscripting operator.
Returns the value at index iIndex of a CATFmAttributeValue instance.
Parameters:
iIndex
[in] The index of the value to retrieve.
This index must be greater (strictly) than 0 and less than or equal to instance cardinality.
Returns:
The value at index iIndex of this instance.
If the index is out of bounds [1,Size()], a default CATFmAttributeValue of type and cardinality 0 is returned.

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

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