All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

KnowledgeInterfaces Interface CATICkeSignature

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATICkeSignature
 

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


interface CATICkeSignature

Interface dedicated to signature management.
Role: A signature is a definition of the arguments of a function, method, operator in the KBware language.
for example : "name [arg: mode Type] : mode Type" ie: "Real sin (x: in int): out Real".
Such a signature is used to check the types compatibility when writing a relation
Example : cos(sin(tan(c)*2))
If you want to create a new function usable in formulas/checks/programs, you'll have
to define a signature and an evaluator

See also:
CATICkeArg


Method Index


o AddArgument(CATICkeArg_var)
Add an argument to the list.
o Family()
Returns the family of the signature.
o HasVariableArgNb()
Indicates if the number of argument is variable.
o IsUserVisible()
Indicates if the function is visible.
o Name()
Returns the name of the signature.
o Notation()
Returns signatures notation.
o Prototype()
Returns the list of arguments of this signature.
o PrototypeSize()
Returns the number of arguments of this signature.
o RankOfOptionalArguments()
o Rename(CATUnicodeString&)
Renames the signature.
o ReturnedArg()
Returns the returned argument of the signature.
o SetFamily(CATUnicodeString&)
Sets family of the signature.
o SetNotation(CATICkeSignature::Mode,CATCkeShowExpression)
Sets notation of the signature.
o SetPrototype(CATCkeListOfArg)
Modifies the whole list of arguments.
o SetRankOfOptionalArguments(int)
o SetReturnedArg(CATICkeArg_var&)
Sets the returned argument.
o SetUserVisibility(CATCke::Boolean&)
Modifies the visibility of the function.
o SetVariableArgNb(CATCke::Boolean&)
Modifies the variable number of arguments property.
o Show()
Shows the signature to the user.

Enumerated Type Index


o Mode
Signature mode: indicates how this function will be written in KBWare.

Methods


o AddArgument
public virtual void AddArgument( const CATICkeArg_var iArgToAdd) = 0
Add an argument to the list.
Parameters:
iAgrToAdd
argument to be added
o Family
public virtual CATUnicodeString Family()const = 0
Returns the family of the signature.
The family is used to classify signatures in the wizard.
o HasVariableArgNb
public virtual CATCke::Boolean HasVariableArgNb()const = 0
Indicates if the number of argument is variable.
those signature must have at least one argument that defines the type of variable arguments.
Returns:

Legal values: CATCke::True if it has a variable number of arguments. CATCke::False if it has a constant number of arguments (default value).
o IsUserVisible
public virtual CATCke::Boolean IsUserVisible()= 0
Indicates if the function is visible.
Returns:

Legal values: CATCke::True if it is visible. CATCke::False if not.
o Name
public virtual CATUnicodeString Name()const =0
Returns the name of the signature.
(example : "sin")
o Notation
public virtual CATICkeSignature::Mode Notation()const = 0
Returns signatures notation.
Indicates if it is an operator, a function, a method or something else
Returns:

Legal values: the notation can be Function to be seen as a function : f(x,y), or Method to be seen as a method : x,f(y), or Operator do not use, or Special do not use, or Attribut to be seen as an attribute : x.f.
o Prototype
public virtual CATCkeListOfArg Prototype()const = 0
Returns the list of arguments of this signature.
Returns:
list of arguments (not to be deallocated)
o PrototypeSize
public virtual int PrototypeSize()const = 0
Returns the number of arguments of this signature.
(Can be 0).
o RankOfOptionalArguments
public virtual int RankOfOptionalArguments()const = 0
Returns:
Indicates if the signature has optional arguments and starting from which argument (rank 1 to N). 0 to declare that there is no optional argument (by default). 1 to N
o Rename
public virtual void Rename( const CATUnicodeString& iNewName) =0
Renames the signature.
Parameters:
iNewName
New name
o ReturnedArg
public virtual CATICkeArg_var ReturnedArg()const = 0
Returns the returned argument of the signature.
o SetFamily
public virtual void SetFamily( const CATUnicodeString& iFamilyName) = 0
Sets family of the signature.
The family is used to classify signatures in the wizard.
Parameters:
iFamilyName
NLS name for family
o SetNotation
public virtual void SetNotation(CATICkeSignature::Mode iNotation,
CATCkeShowExpression iHowToShow= NULL) = 0
Sets notation of the signature. Function is default value.
Parameters:
iNotation
notation to be set.
Legal values: the notation can be Function to be seen as a function : f(x,y), or Method to be seen as a method : x,f(y), or Operator do not use, or Special do not use, or Attribut to be seen as an attribute : x.f.
iHowToShow
function pointer to specify how to show such a signature in special cases.
o SetPrototype
public virtual void SetPrototype( const CATCkeListOfArg iListOfArguments) = 0
Modifies the whole list of arguments.
Parameters:
iListOfArguments
list of arguments to replace
o SetRankOfOptionalArguments
public virtual void SetRankOfOptionalArguments( const int iRankForOptionalArguments) = 0
Parameters:
iRankForOptionalArguments
Defines if the signature has optional arguments and starting from which argument (rank 1 to N). 0 to declare that there is no optional argument (by default). 1 to N
o SetReturnedArg
public virtual void SetReturnedArg( const CATICkeArg_var& iReturnedArg) = 0
Sets the returned argument.
Parameters:
iReturnedArg
returned arg
o SetUserVisibility
public virtual void SetUserVisibility( const CATCke::Boolean& iVariable) = 0
Modifies the visibility of the function.
Parameters:
iVariable

Legal values: CATCke::True if it should be visible. CATCke::False if not.
o SetVariableArgNb
public virtual void SetVariableArgNb( const CATCke::Boolean& iVariable) = 0
Modifies the variable number of arguments property.
Parameters:
iVariable

Legal values: CATCke::True if it has a variable number of arguments. CATCke::False if it has a constant number of arguments (default value).
o Show
public virtual CATUnicodeString Show()const =0
Shows the signature to the user.
Exampel: "sin(Real) : Real"

Enumerated Types


o Mode
enum Mode {
  Function,
  Method,
  Operator,
  Special,
  Attribute,
  Event
}
Signature mode: indicates how this function will be written in KBWare.
Legal values: the notation can be Function to be seen as a function : f(x,y), or Method to be seen as a method : x,f(y), or Operator do not use, or Special do not use, or Attribut to be seen as an attribute : x.f.

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

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