All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VPMXBom Interface ENOVIAttributeDefinition

System.IUnknown
  |
  +---ENOVIAttributeDefinition
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface ENOVIAttributeDefinition



Method Index


o get_AccessMode(AccessMode*)
Retrieves the AccessMode for this attribute.
o get_AttributeName(CATUnicodeString*)
Retrieves the alias of the attribute.
o get_AttributeOrder(long*)
Retrieves the order of the attribute.
o get_AttributeType(CATUnicodeString*)
Retrieves the type of the attribute as a string.
o get_AttributeTypeEnum(TypeOfAttr*)
Retrieves the type of the attribute as an enum.
o get_AuthorizedValues(_SEQUENCE_CORBAAny*)
Retrieves the list of authorized values for this attribute.
o get_Case(int*)
Retrieves the Case for this attribute.
o get_DefaultValue(wchar_t**)
Retrieves the attribute's default value.
o get_IsEnabled(boolean*)
Retrieves the enabled flag of the attribute.
o get_IsErroneous(boolean*)
Retrieves the erroneous flag of the attribute.
o get_IsInverse(boolean*)
Retrieves the inverse flag for this attribute.
o get_IsMandatory(boolean*)
Retrieves the mandatory flag for the attribute.
o get_IsSensitive(boolean*)
Retrieves the sensitive flag of the attribute.
o get_IsUnique(boolean*)
Retrieves the attribute's unique flag.
o get_Magnitude(CATUnicodeString*)
Retrieves the magnitude of the attribute.
o get_MaxLength(int*)
Retrieves the Maximum Length for this attribute.
o get_PathExpression(char**)
Retrieves the attribute path expression.
o get_Visibility(VPMDicVISIBILITY*)
Retrieves the visibility for this attribute.
o put_AccessMode(AccessMode)
Sets the AccessMode for this attribute.
o put_AuthorizedValues(_SEQUENCE_CORBAAny*)
Sets the list of authorized values for this attribute.
o put_Case(int)
Sets the Case for this attribute.
o put_IsEnabled(boolean)
Sets the enabled flag of the attribute.
o put_IsErroneous(boolean)
Sets the erroneous flag of the attribute.
o put_IsMandatory(boolean)
Sets the mandatory flag for this attribute.
o put_IsSensitive(boolean)
Sets the sensitive flag of the attribute.
o put_MaxLength(int)
Sets the maximum length for this attribute.
o put_Visibility(VPMDicVISIBILITY)
Sets the visibility for this attribute.
o set_DefaultValue(wchar_t*)
Sets the attribute's default value.

Enumerated Type Index


o AccessMode
Attribute access mode.
o TypeOfAttr
Attribute data type.

Methods


o get_AccessMode
public virtual HRESULT __stdcall get_AccessMode(AccessMode* oAccessMode)=0
Retrieves the AccessMode for this attribute.
Role: the access mode will influence the user interface of the Client.
Parameters:
oAccessMode
the retrieved AccessMode
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_AttributeName
public virtual HRESULT __stdcall get_AttributeName(CATUnicodeString* oAttributeName)=0
Retrieves the alias of the attribute. This alias can be used for display purposes, but if you need to construct a query predicate, use get_PathExpression instead.
Parameters:
oAttributeName
the retrieved name, this is a valid CATUnicodeString pointer
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the pointer is successfully returned
E_POINTER
The oAttributeName pointer was NULL
o get_AttributeOrder
public virtual HRESULT __stdcall get_AttributeOrder(long* oAttributeOrder)=0
Retrieves the order of the attribute.
Parameters:
oAttributeOrder
the retrieved order, this is a valid long pointer
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the pointer is successfully returned
S_FALSE
The attribute order has not been valuated
E_POINTER
The oAttributeOrder pointer was NULL
o get_AttributeType
public virtual HRESULT __stdcall get_AttributeType(CATUnicodeString* oAttributeType)=0
Retrieves the type of the attribute as a string.
Role: this should mostly be used to get the type in a printable form, if the datatype of the attribute is needed, it is advised to use the get_AttributeTypeEnum method.
Parameters:
oAttributeType
the retrieved type as a string. This is a valid CATUnicodeString pointer the type string is the same as the one stored in the ENOVIA dictionnary eventually prefixed by AGGREGATE OF
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the pointer is successfully returned
E_POINTER
The oAttributeType pointer was NULL
o get_AttributeTypeEnum
public virtual HRESULT __stdcall get_AttributeTypeEnum(TypeOfAttr* oAttributeType)=0
Retrieves the type of the attribute as an enum.
Role: This is the prefered way to retrieve the datatype for an attribute.
Parameters:
oAttributeType
the retrieved attribute type.
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_AuthorizedValues
public virtual HRESULT __stdcall get_AuthorizedValues(_SEQUENCE_CORBAAny* oAuthorizedValues)=0
Retrieves the list of authorized values for this attribute.
Role: The list of values which this attribute can legally take.
Parameters:
oAuthorizedValues
the retrieved list of values. Any data originally in the list will be overwritten.
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the oAuthorizedValues is updated
S_FALSE
All went well, there is no restriction on authorized values other than the data type. The oAuthorizedValues is left unchanged.
E_POINTER
The oAuthorizedValues pointer was NULL
o get_Case
public virtual HRESULT __stdcall get_Case(int* ioCase)=0
Retrieves the Case for this attribute.
Role: if ioCase>0 it's an UPPERCASE attribute if ioCase<0 it's an LOWERCASE attribute if ioCase=0 it's an attribute without case
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_DefaultValue
public virtual HRESULT __stdcall get_DefaultValue(wchar_t** oDefaultValue)=0
Retrieves the attribute's default value.
Role: this is the value which should appear in a UI when creating an object which possess this attribute.
Parameters:
oDefaultValue
the retrieved default value. This points to a newly allocated w_char* which should be freed using delete[].
Returns:
An HRESULT value
Legal values:
S_OK
All went well
S_FALSE
All went well but no Default Value exists for this attribute
E_???
Something went wrong
o get_IsEnabled
public virtual HRESULT __stdcall get_IsEnabled(boolean* oIsEnabled)=0
Retrieves the enabled flag of the attribute.
Role: the main difference between the enabled flag and the access mode is that enabled or disabled is for automatic gui generation. Also the AccessMode should be closely related to the security (and therefore not prone to changes for a given user/role pair), and the enabled flag should be related to the object state. An example being a woman object with a maiden name attribute which is enabled or disabled depending on the value of a married attribute.
Parameters:
oIsEnabled
the retrieved enabled flag
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_IsErroneous
public virtual HRESULT __stdcall get_IsErroneous(boolean* oIsErroneous)=0
Retrieves the erroneous flag of the attribute.
Role: An attribute can become Erroneous if it is a computed attribute and the its value needs to be refreshed.
Parameters:
oIsErroneous
the retrieved flag.
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_IsInverse
public virtual HRESULT __stdcall get_IsInverse(boolean* oInverse)=0
Retrieves the inverse flag for this attribute.
Role: An object can have inverse attribute, this means that it is pointing back to another object which is itself pointing to this object:
     ____   points       _____
    |    |------------->|     |
    | A  |  inverse     |  B  |
    |____|<- - - - - - -|_____|
	
in the above example A points towards B and B has an inverse pointer to A. the thing to note about inverse is that they cannot be modified directly, it is the pointing object attribute which needs to be modified.
Parameters:
oInverse
The retrieved inverse flag.
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_IsMandatory
public virtual HRESULT __stdcall get_IsMandatory(boolean* oIsMandatory)=0
Retrieves the mandatory flag for the attribute.
Parameters:
oIsMandatory
the retrieved flag, this is a valid boolean pointer.
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the interface pointer is successfully returned
E_POINTER
The oIsMandatory pointer was NULL
o get_IsSensitive
public virtual HRESULT __stdcall get_IsSensitive(boolean* oIsSensitive)=0
Retrieves the sensitive flag of the attribute.
Role: If the sensitive attribute is true, any change to the value of this attribute may generate some changes in the definitions of the whole object. an example would be a woman object where the maiden name attribute is mandatory or disabled depending on the value of a married attribute. The married attribute would then be sensitive.
Parameters:
oIsSensitive
the retrieved flag
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and oIsSensitive is updated
E_POINTER
The oIsSensitive pointer was NULL
o get_IsUnique
public virtual HRESULT __stdcall get_IsUnique(boolean* oIsUnique)=0
Retrieves the attribute's unique flag.
Role:
Parameters:
oIsUnique
the retrieved flag
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the pointer is successfully returned
E_POINTER
The oIsUnique pointer was NULL
o get_Magnitude
public virtual HRESULT __stdcall get_Magnitude(CATUnicodeString* oMagnitude)=0
Retrieves the magnitude of the attribute.
Parameters:
oMagnitude
the retrieved magnitude, this is a valid CATUnicodeString pointer
Returns:
An HRESULT value.
Legal values:
S_OK
All went well. The attribute owns a magnitude which is successfully returned using the oMagnitude parameter.
S_FALSE
The attribute does not own a magnitude. The oMagnitude parameter is left unchanged.
E_POINTER
The oMagnitude pointer was NULL
o get_MaxLength
public virtual HRESULT __stdcall get_MaxLength(int* ioMaxLength)=0
Retrieves the Maximum Length for this attribute.
Role: Several of the data types supported by the data base servers have a maximum allowed length which where usually choosen for performance reasons. For data types where this notion doesn't make if there is no Maximum length (it doesn't make sense for this data type e.g. for integer or for entities, or it is an extensible data type for VARCHAR)it the retrieved value will be set to -1.
Parameters:
ioMaxLength
the retrieved maximum length
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_PathExpression
public virtual HRESULT __stdcall get_PathExpression(char** oPathExpression) = 0
Retrieves the attribute path expression.
Role: this is the path expression from the persistent object which defines an instance to the value of the attribute. This path expression is equivalent to the actual name of the attribute, as can be used to express queries that use that expression as part of a predicate. In effect two cases are possible:
Parameters:
oPathExpression
the retrieved path expression. This points to a newly allocated char* which should be freed using delete[].
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
o get_Visibility
public virtual HRESULT __stdcall get_Visibility(VPMDicVISIBILITY* oVisibility)=0
Retrieves the visibility for this attribute.
Role: this will influence the visibility of the attribute in the user interface. The 3 values which the visibility can take are:
VPMDicPUBLIC:
the attribute is visible in the UI
VPMDicPROTECTED:
the attribute is not visible in the UI but the UI is aware of its existence
VPMDicPRIVATE:
the UI is unaware of the existence of this attribute
ENOVIAttributeDefinitions
Parameters:
oVisibility
the retrieved Visibility
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
VPMDicVISIBILITY
o put_AccessMode
public virtual HRESULT __stdcall put_AccessMode(AccessMode iAccessMode)=0
Sets the AccessMode for this attribute.
Parameters:
iAccessMode
the new value for the accessmode.
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_AccessMode
o put_AuthorizedValues
public virtual HRESULT __stdcall put_AuthorizedValues(_SEQUENCE_CORBAAny* iAuthorizedValues)=0
Sets the list of authorized values for this attribute.
Parameters:
iAuthorizedValues
the new list of Authorized values. If this pointer is NULL it means that no further restriction on Authorized values will apply.
Returns:
An HRESULT value.
Legal values:
S_OK
All went well and the list of authorized values is up to date
o put_Case
public virtual HRESULT __stdcall put_Case(int iCase)=0
Sets the Case for this attribute.
Parameters:
iCase
if iCase>0 it's an UPPERCASE attribute if iCase<0 it's an LOWERCASE attribute if iCase=0 it's an attribute without case
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_MaxLength
o put_IsEnabled
public virtual HRESULT __stdcall put_IsEnabled(boolean iIsEnabled)=0
Sets the enabled flag of the attribute.
Parameters:
iIsEnabled
the new value of the enabled flag.
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_IsEnabled
o put_IsErroneous
public virtual HRESULT __stdcall put_IsErroneous(boolean iIsErroneous)=0
Sets the erroneous flag of the attribute.
Parameters:
iIsErroneous
the new value of the erroneous flag
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_IsErroneous
o put_IsMandatory
public virtual HRESULT __stdcall put_IsMandatory(boolean iIsMandatory)=0
Sets the mandatory flag for this attribute.
Parameters:
iIsMandatory
the new mandatory flag
Returns:
An HRESULT value
Legal values:
S_OK
All went well and the interface pointer is successfully returned
E_???
something went wrong
o put_IsSensitive
public virtual HRESULT __stdcall put_IsSensitive(boolean iIsSensitive)=0
Sets the sensitive flag of the attribute.
Parameters:
iIsSensitive
the new value of the Sensitive flag
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_IsSensitive
o put_MaxLength
public virtual HRESULT __stdcall put_MaxLength(int iMaxLength)=0
Sets the maximum length for this attribute.
Parameters:
iMaxLength
the new maximum length
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_MaxLength
o put_Visibility
public virtual HRESULT __stdcall put_Visibility(VPMDicVISIBILITY iVisibility)=0
Sets the visibility for this attribute.
Parameters:
iVisibility
the new visibility
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong
See also:
get_Visibility
o set_DefaultValue
public virtual HRESULT __stdcall set_DefaultValue( const wchar_t* iDefaultValue)=0
Sets the attribute's default value.
Role: this is the value which should appear in a UI when creating an object which possess this attribute.
Parameters:
oDefaultValue
the new default value. This points to a newly allocated w_char* which should be freed using delete[].
Returns:
An HRESULT value
Legal values:
S_OK
All went well
E_???
Something went wrong

Enumerated Types


o AccessMode
enum AccessMode {
  WW,
  RW,
  RR
}
Attribute access mode.
Parameters:
WW
write only attribute
RW
read write attribute
RR
read only attribute
o TypeOfAttr
enum TypeOfAttr {
  BOOLEANS,
  LOGICAL,
  BINARY,
  INTEGER,
  REAL,
  ENTITY,
  DEFINED_TYPE,
  STRING,
  ENUMERATION,
  SELECT,
  DATETIME,
  _AGGREGATE_UNIT,
  _AGGREGATE_THRESHOLD,
  _ARRAY,
  BOOLEAN_ARRAY,
  LOGICAL_ARRAY,
  BINARY_ARRAY,
  INTEGER_ARRAY,
  REAL_ARRAY,
  ENTITY_ARRAY,
  DEFINED_TYPE_ARRAY,
  STRING_ARRAY,
  ENUMERATION_ARRAY,
  SELECT_ARRAY,
  DATETIME_ARRAY,
  _LIST,
  BOOLEAN_LIST,
  LOGICAL_LIST,
  BINARY_LIST,
  INTEGER_LIST,
  REAL_LIST,
  ENTITY_LIST,
  DEFINED_TYPE_LIST,
  STRING_LIST,
  ENUMERATION_LIST,
  SELECT_LIST,
  DATETIME_LIST,
  _SET,
  BOOLEAN_SET,
  LOGICAL_SET,
  BINARY_SET,
  INTEGER_SET,
  REAL_SET,
  ENTITY_SET,
  DEFINED_TYPE_SET,
  STRING_SET,
  ENUMERATION_SET,
  SELECT_SET,
  DATETIME_SET,
  _BAG,
  BOOLEAN_BAG,
  LOGICAL_BAG,
  BINARY_BAG,
  INTEGER_BAG,
  REAL_BAG,
  ENTITY_BAG,
  DEFINED_TYPE_BAG,
  STRING_BAG,
  ENUMERATION_BAG,
  SELECT_BAG,
  DATETIME_BAG,
  UNDEFINED
}
Attribute data type.
Role: the data type of the attribute value. Some values are combination of several others. The values without a leading underscore can be used as is, the values with a leading underscore can be used for more advanced operations.
	e.g.: 
ENOVIAttributeDefinition::TypeOfAttr lType; .... //get a type value //is the type an aggregate if (lType > ENOVIAttributeDefinition::_AGGREGATE_THRESHOLD) cout << "it is an aggregate" << endl; //is the type a set if (lType & ENOVIAttributeDefinition::_SET) cout << "this is a Set of something" << endl; //is the type a String or an aggregate of string if ((lType & ENOVIAttributeDefinition::_AGGREGATE_UNIT) == ENOVIAttributeDefinition::STRING) cout << "this is a String or an aggregate of string" << endl; //is the type a BAG of string if (lType = STRING_BAG) cout << "this is a bag of string" << endl;
Parameters:
BOOLEANS=1
LOGICAL=2
BINARY=3
INTEGER=4
REAL=5
ENTITY=6
DEFINED_TYPE=7
STRING=8
ENUMERATION=13
SELECT=14
DATETIME=15
_AGGREGATE_UNIT=31
_AGGREGATE_THRESHOLD=255
_ARRAY=256
BOOLEAN_ARRAY=257
LOGICAL_ARRAY=258
BINARY_ARRAY=259
INTEGER_ARRAY=260
REAL_ARRAY=261
ENTITY_ARRAY=262
DEFINED_TYPE_ARRAY=263
STRING_ARRAY=264
ENUMERATION_ARRAY=269
//not correctly supported
SELECT_ARRAY=270
DATETIME_ARRAY=271
_LIST=512
BOOLEAN_LIST=513
LOGICAL_LIST=514
BINARY_LIST=515
INTEGER_LIST=516
REAL_LIST=517
ENTITY_LIST=518
DEFINED_TYPE_LIST=519
STRING_LIST=520
ENUMERATION_LIST=525
//not correctly supported
SELECT_LIST=526
DATETIME_LIST=527
_SET=1024
BOOLEAN_SET=1025
LOGICAL_SET=1026
BINARY_SET=1027
INTEGER_SET=1028
REAL_SET=1029
ENTITY_SET=1030
DEFINED_TYPE_SET=1031
STRING_SET=1032
ENUMERATION_SET=1025
//not correctly supported
LOGICAL_SET=1026
BINARY_SET=1027
INTEGER_SET=1028
REAL_SET=1029
ENTITY_SET=1030
DEFINED_TYPE_SET=1031
STRING_SET=1032
ENUMERATION_SET=1037
SELECT_SET=1038
DATETIME_SET=1039
_BAG=2048
BOOLEAN_BAG=2049
LOGICAL_BAG=2050
BINARY_BAG=2051
INTEGER_BAG=2052
REAL_BAG=2053
ENTITY_BAG=2054
DEFINED_TYPE_BAG=2055
STRING_BAG=2056
ENUMERATION_BAG=2061
//not correctly supported
SELECT_BAG=2062
DATETIME_BAG=2063
UNDEFINED=100

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

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