KnowledgeInterfaces CATAttributeInfos
Usage: you must use this class as is. You should never derive it.
public class CATAttributeInfos
Class to be used to define attributes of a Knowledge type.
Role: A Knowledge type is defined as a collection of attributes with names and characteristics. This class is the definition of such an attribute.
- See also:
- , , , ,
Constructor and Destructor Index
- o
CATAttributeInfos(CATAttributeInfos&)
- Copy constructor.
- o
CATAttributeInfos(CATIType_var&,CATUnicodeString&,CATUnicodeString&,boolean,boolean,boolean,CATUnicodeString&)
- Constructor: this constructor is made for standard attributes creation.
- o
~CATAttributeInfos()
- Destructor.
Method Index
- o
AccessByRule()
- This method returns a standard attribute accessor (to be passed as 7th argument in CATAttributeInfos constructor).
- o
GetAttributeAccess()
- Do Not Use this method.
- o
GetAuthorizedValues(CATListOfDouble&)
- Returns the authorized values if any.
- o
GetAuthorizedValues(CATListOfCATUnicodeString&)
- Returns the authorized values if any.
- o
GetCurrentUnitForManipulation(CATIType_var&,CATAttributeInfos&,CATICkeUnit_var&,CATBaseUnknown_var&)
- Returns the current unit to use to manipulate the attribute in the user interface.
- o
GetDefaultValue(CATICkeParm_var&)
- Returns the default value if any.
- o
GetHelpValues(CATListOfDouble&)
- Returns the help values if any.
- o
GetHelpValues(CATListOfCATUnicodeString&)
- Returns the help values if any.
- o
GetMaxLength()
- Returns the maximum length for a string attribute.
- o
GetNLSName(CATIType_var&,CATAttributeInfos&,CATUnicodeString&)
- Returns the NLS Name of an attribute in the context of a type.
- o
IsComponent()
- Returns the aggregability of the attribute.
- o
IsComputed()
- Indicates if the attribute is computed with an attribute access.
- o
IsControlledByModeler()
- Indicates if the attribute is controlled by the modeler or not.
- o
IsDynamic()
- Returns the dynamicity of the attribute.
- o
IsFaceted()
- Indicates if the attribute is faceted or not (used by index/search.
- o
IsMandatory()
- Indicates if the attribute is mandatory.
- o
IsMultiValuated()
- Indicates if this attribute is a multi valuated (in other word a list).
- o
IsSimple()
- Indicates if the attribute is a simple one (a value) or if it is a reference to an object, or list of object.
- o
IsVisible()
- Returns the visibility of the attribute.
- o
IsWritable()
- Returns the writability of the attribute.
- o
Name()
- Returns the internal name of the attribute.
- o
ReadDynamicProperty(CATUnicodeString&,CATIValue_var&)
- Enable to retrieve a dynamic properties on an attribute.
- o
RequireTranslationForValues(CATIType_var&,CATAttributeInfos&,CATBoolean&,CATListOfCATUnicodeString*)
- Indicates if the attribute values need to be translated.
- o
SetDynamic()
- Indicates if the attribute is dynamically added on an object.
- o
TranslateValues(CATIType_var&,CATAttributeInfos&,CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
- Translates the value of an attribute in the context of a type.
- o
Type()
- Returns the type the attribute belongs to.
- o
TypeForValues()
- Returns the type of values in case of multi valuated.
- o
operator!=(CATAttributeInfos&)
- Operator to compare difference.
- o
operator=(CATAttributeInfos&)
- Operator to affect a value.
- o
operator==(CATAttributeInfos&)
- Operator to compare equality.
Constructor and Destructor
o CATAttributeInfos
public CATAttributeInfos( | const | iInfos) |
-
Copy constructor.
- Parameters:
-
- iInfos
- attribute to be copied.
o CATAttributeInfos
public CATAttributeInfos( | const | iType, |
| const | iName, |
| const | iNLSName, |
| const | isWriteable | = 1, |
| const | isComponent | = 0, |
| const | isVisible | = 1, |
| const | iAttributeAccess | = "") |
-
Constructor: this constructor is made for standard attributes creation. It is available for applications that are defining their types.
For PLM attributes, see at the end of this header file.
- Parameters:
-
- iType
- Type the attribute is added to.
- iName
- Internal name of the attribute.
- iNLSName
- NLS (user) name of the attribute.
- isWriteable
- TRUE if the attribute can be modified, else FALSE. Default is TRUE.
- isComponent
- TRUE if the attribute contains a component. If TRUE, the component's owner should be the owner of the attribute, and its
name the attribute name. Default is FALSE.
- isVisible
- TRUE if the attribute is visible by the user, else FALSE. Default is TRUE.
- iAttributeAccess
- Only Use the Default Value = "".
(Name of the CATIAttributeComputed implementation class used to
delegate the valuation of this particular attribute)
Note finally, that by default, an attribute is not mandatory
o ~CATAttributeInfos
public virtual ~CATAttributeInfos( | ) |
-
Destructor.
Methods
o AccessByRule
public static AccessByRule( | ) |
-
This method returns a standard attribute accessor (to be passed as 7th argument in CATAttributeInfos constructor).
that enables to read and/or write attributes by Knowledge rules.
- Returns:
- The standard attribute accessor.
o GetAttributeAccess
public GetAttributeAccess( | ) |
-
Do Not Use this method.
Returns the name of the CATIAttributeComputed implementation.
- Returns:
- a string.
o GetAuthorizedValues
public GetAuthorizedValues( | | oListValueAsDouble) |
-
Returns the authorized values if any.
- Parameters:
-
- oListValueAsDouble
- The list if filled with values as double.
- Returns:
-
- E_INVALIDARG if the attribute is not of type real/integer/dimension
- S_OK if authorized values have been filled.
- S_FALSE if no authorized values defined. List is emptied.
o GetAuthorizedValues
public GetAuthorizedValues( | | oListValueAsString) |
-
Returns the authorized values if any.
- Parameters:
-
- oListValueAsString
- The list is filled with values as strings.
- opListValueAsStringNLS
- The list if filled with values as strings translated if necessary. If NULL, then it is not used
- S_OK if authorized values have been filled.
- S_FALSE if no authorized values defined. List is emptied.
o GetCurrentUnitForManipulation
public static GetCurrentUnitForManipulation( | const | iType, |
| const | iAttribute, |
| | oUnit, |
| const | iScaleContext | = NULL_var) |
-
Returns the current unit to use to manipulate the attribute in the user interface.
Depends on the Tools Options Settings by default.
If the unit to use has been precised in PLM Dictionary, it will be this one chosen.
If the unit to use for this attribute is overriden in settings, it is the one that will be chosen.
- Parameters:
-
- iType
- The type that contains the attribute
- iAttribute
- The attribute
- oUnit
- The unit to manipulate it
- iScaleContext
- the PLM Component owning the attribute. It allows to retrieve its scales which may change the unit to use
- Returns:
-
- E_INVALIDARG if the attribute is not an attribute with a magnitude, ot input are NULL
- S_OK if unit retrieved and was precised in the dictionary (different from the setting)
- S_FALSE if unit retrieved but was not precised in the dictionary (we return the unit of the setting)
o GetDefaultValue
public GetDefaultValue( | | oDefaultValue) |
-
Returns the default value if any.
- Parameters:
-
- oDefaultValue
- Default value in output if any, NULL_var by default.
- Returns:
-
- S_OK if default value has been defined.
- S_FALSE if no default value was defined.
o GetHelpValues
public GetHelpValues( | | oListValueAsDouble) |
-
Returns the help values if any.
- Parameters:
-
- oListValueAsDouble
- The list if filled with values as double.
- Returns:
-
- E_INVALIDARG if the attribute is not of type real/integer/dimension
- S_OK if help values have been filled.
- S_FALSE if no help values defined. List is emptied.
o GetHelpValues
public GetHelpValues( | | oListValueAsString) |
-
Returns the help values if any.
- Parameters:
-
- oListValueAsString
- The list if filled with values as strings.
- opListValueAsStringNLS
- The list if filled with values as strings translated if necessary. If NULL, then it is not used
- Returns:
-
- S_OK if help values have been filled.
- S_FALSE if no help values defined. List is emptied.
o GetMaxLength
-
Returns the maximum length for a string attribute.
- Returns:
- 0 by default
o GetNLSName
public static GetNLSName( | const | iType, |
| const | iAttribute, |
| | oNLSName) |
-
Returns the NLS Name of an attribute in the context of a type. A same attribute can have 2 NLS names for two types of the same hierarchy.
- Parameters:
-
- iType
- The type that contains the attribute
- iAttribute
- The attribute
- oNLSName
- The NLS Name in output
- Returns:
-
- E_INVALIDARG if the attribute is not part of this type
- E_FAIL if the NLS name has not been found
- S_OK if NLS name has been retrieved
o IsComponent
-
Returns the aggregability of the attribute.
- Returns:
- TRUE if it an aggregation, else FALSE.
o IsComputed
-
Indicates if the attribute is computed with an attribute access.
- Returns:
- TRUE if writable, else FALSE.
o IsControlledByModeler
public IsControlledByModeler( | ) |
-
Indicates if the attribute is controlled by the modeler or not.
o IsDynamic
-
Returns the dynamicity of the attribute. Default value is FALSE.
- Returns:
- TRUE if it is a dynamic attribute, FALSE instead
o IsFaceted
-
Indicates if the attribute is faceted or not (used by index/search.
- Returns:
- TRUE if Faceted, else FALSE.
o IsMandatory
-
Indicates if the attribute is mandatory. It means that this attribute must always be filled on the object.
- Returns:
- TRUE if it is mandatory, else FALSE.
o IsMultiValuated
-
Indicates if this attribute is a multi valuated (in other word a list).
Note that in this case, the type returned by the Type method is the type List.
If you want to access the type of the elements of the list (if any), you'll have to use the
- Returns:
- TRUE if multi valuated, else FALSE.
o IsSimple
-
Indicates if the attribute is a simple one (a value) or if it is a reference to an object, or list of object.
- Returns:
- TRUE if simple, else FALSE.
o IsVisible
-
Returns the visibility of the attribute.
- Returns:
- TRUE if visible, else FALSE.
o IsWritable
-
Returns the writability of the attribute.
- Returns:
- TRUE if writable, else FALSE.
o Name
-
Returns the internal name of the attribute.
- Returns:
- a string.
o ReadDynamicProperty
public ReadDynamicProperty( | const | iDynamicPropertyName, |
| | oValue) |
-
Enable to retrieve a dynamic properties on an attribute.
A dynamic property is an information declared by an application in the metadata , that is not interpreted by generic toolkits & dictionary but that can be retrieved by applications on their types.
Usage: All contexts (UI Layer (search, new), Modeler,..).
- Parameters:
-
- iDynamicPropertyName
- name of the dynamic property
- oValue
- value read. Can be NULL if property not found
- Returns:
-
- S_OK if the property has been read
- S_FALSE if the property has not been found
- E_FAIL otherwise
o RequireTranslationForValues
public static RequireTranslationForValues( | const | iType, |
| const | iAttribute, |
| | oRequiresTranslation, |
| | pListOValue | = NULL) |
-
Indicates if the attribute values need to be translated.
Must be called before calling TranslateValue for performance considerations.
- Parameters:
-
- iType
- The type that contains the attribute
- iAttribute
- The attribute
- oRequiresTranslation
- TRUE if the attribute values require translation
- pListOValue
- If not NULL, will be filled with the list of values to be translated
- Returns:
-
- E_INVALIDARG if the attribute is not part of this type
- S_OK instead
o SetDynamic
-
Indicates if the attribute is dynamically added on an object.
o TranslateValues
public static TranslateValues( | const | iType, |
| const | iAttribute, |
| const | iListOfValue, |
| | oListOfNLSValue) |
-
Translates the value of an attribute in the context of a type.
You may call RequireTranslationForValues before to optimize performance.
- Parameters:
-
- iType
- The type that contains the attribute
- iAttribute
- The attribute
- iListOfValue
- The values to be translated (for performance consideration, a list is provided)
- oListOfNLSValue
- The Values translated
- Returns:
-
- E_INVALIDARG if the attribute is not part of this type
- S_FALSE if the value had no translation
- S_OK if NLS name has been retrieved
o Type
-
Returns the type the attribute belongs to.
- Returns:
- a type.
o TypeForValues
-
Returns the type of values in case of multi valuated.
Returns also the type of value in case of mono valuated.
- Returns:
- a type. Returns NULL_var if type is not precised...
o operator!=
public operator!=( | const | iInfos) |
-
Operator to compare difference.
- Parameters:
-
- iInfos
- Attribute to be compared with.
- Returns:
- Result of the comparison.
o operator=
public operator=( | const | iInfos) |
-
Operator to affect a value.
- Parameters:
-
- iInfos
- Value to valuate with.
- Returns:
- Handler on the attribute itself
o operator==
public operator==( | const | iInfos) |
-
Operator to compare equality.
- Parameters:
-
- iInfos
- Attribute to be compared with.
- Returns:
- Result of the comparison.
This object is included in the file: CATAttributeInfos.h
If needed, your Imakefile.mk should include the module: KnowledgeItf
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.