KnowledgeInterfaces Interface CATIAttributeComputed
Usage: you can reimplement this interface by deriving the supplied CATAttributeComputedAdapter adapter class.
interface CATIAttributeComputed
This interface is to be implemented on a late type that also implements CATICreateInstance.
When defining an attribute with CATAttributeInfos, the last argument (iAttributeAccess) is the name of the late type that implements CATIAttributeComputed.
Reading and/or writing the attributes through EKL (or through CATCkeObjectAttrReadServices/CATCkeObjectAttrWriteServices), will delegate to the methods of CATIAttributeComputed on the late type.
- See also:
- , , , , , , ,
Method Index
- o
GetValue(CATICkeObject*,CATUnicodeString&,CATIType_var&)
- Provides the value of a computed attribute on a given object.
- o
IsMeaningful(CATICkeObject*)
- Indicates if the computed attribute can be computed on this object.
- o
SetValue(CATICkeObject*,CATUnicodeString&,CATIType_var&,CATIValue_var&)
- "Valuates" the value of a computed attribute on a given object by translating it and propagating to real object.
Methods
o GetValue
public virtual GetValue( | | iObject, |
| const | iAttributeName, |
| const | iType | = NULL_var ) |
-
Provides the value of a computed attribute on a given object.
- Parameters:
-
- iObject
- Knowledge object on which we want to compute an attribute.
- iAttributeName
- Name of the attribute in the Knowledge dictionary (internal name)
- oValue
- Value that we will read on the attribute.
- iType
- Useless
- Returns:
- the value if succeeded, NULL instead. An AddRef must be done To create the value, please use CATCkeGlobalFunctions::GetVolatileFactory() to retrieve volatile value factory (CATICkeParmFactory) and use ad-hoc method to create your value.
o IsMeaningful
public virtual IsMeaningful( | | iObject) |
-
Indicates if the computed attribute can be computed on this object.
- Parameters:
-
- iObject
- Knowledge object on which we want to "valuate" an attribute.
- Returns:
-
- TRUE if the object is valid.
- FALSE if the object is not valid.
o SetValue
public virtual SetValue( | | iObject, |
| const | iAttributeName, |
| const | iType, |
| const | iValue) |
-
"Valuates" the value of a computed attribute on a given object by translating it and propagating to real object.
- Parameters:
-
- iObject
- Knowledge object on which we want to "valuate" an attribute.
- iAttributeName
- Name of the attribute in the Knowledge dictionary (internal name)
- iType
- Useless
- oValue
- Value that we will "put" on the object
- Returns:
-
- E_INVALIDARG if the attribute not supported, or object NULL.
- S_OK if the attribute has been put correctly
- E_FAIL if the valuation has failed.
This object is included in the file: CATIAttributeComputed.h
If needed, your Imakefile.mk should include the module: KnowledgeItf
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.