KnowledgeInterfaces Interface CATITypeDictionary

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


interface CATITypeDictionary

Interface dedicated to accessing the unique repository of Knowledge types shown to the user.
Role: This interface allows the developper to create/remove/modifiy "exposed" types. These types can be grouped into packages (one type belongs to at most one package).

A package may require other packages : this means that types gathered in this package, refer to types belonging to those required packages (through supertype relation or attribute relation).

Note that all the types are not systematically loaded at run-time (for performance concern) so one can force the load of a package. In order to work, the person creating a package, has to create a CATRsc file called "CATPackage.CATRsc" with one line : "PackageImplementation = "";".

The most basic types are:

  • "Boolean"
  • "Integer"
  • "Real"
  • "String"
  • "Magnitude"
  • "Feature"


  • "Feature" is the common supertype of all complex types. If no supertype is provided when creating a type, "Feature" is assumed.

    The dictionary can be retrieved with the service.
    See also:
    , ,


    Method Index


    o AddDictionaryListener(CATITypeDictionaryListener_var&)
    Adds a listener on the dictionary.
    o AddMethodForPackage(CATBaseUnknown_var&,CATUnicodeString&)
    Adds a method/function in a dictionary package.
    o AddPackage(CATUnicodeString&,CATListOfCATUnicodeString&)
    Creates a package in the dictionary.
    o AddTypeForPackage(CATIType_var&,CATUnicodeString&,int)
    Adds a created type in an existing package of the dictionary.
    o AdviseInstanciated(CATIType_var&,CATICkeObject_var&)
    Indicates that a type from the dictionary was instanciated.
    o AdviseMethodAdded(CATBaseUnknown_var&)
    Indicates that a method was added to the dictionary.
    o AdviseMethodRemoved(CATBaseUnknown_var&)
    Indicates that a method was removed from the dictionary.
    o AdviseTypeAdded(CATIType_var&)
    Indicates that a type was added to the dictionary.
    o AdviseTypeRemoved(CATIType_var&)
    Indicates that a type was removed from the dictionary.
    o AdviseTypeUpdated(CATIType_var&)
    Indicates that a type was updated from the dictionary.
    o CreateType(CATUnicodeString&,CATUnicodeString&,CATIType_var&,CATIType_var&,CATListValCATAttributeInfos*,CATUnicodeString&)
    Creates a type.
    o CreateType(CATUnicodeString&,CATUnicodeString&,CATIType_var&,CATIType_var&,CATListValCATAttributeInfos*,CATInstanciationFunction)
    Creates a type.
    o FindNLSType(CATUnicodeString&,CATIType_var&)
    Returns a type found by its NLS name.
    o FindNLSTypeInPackages(CATUnicodeString&,CATListOfCATUnicodeString&,CATIType_var&,boolean)
    Returns a type found in a certain package (and maybe in its required packages).
    o FindNLSTypes(CATUnicodeString&,CATListValCATIType_var&)
    Returns a list of types corresponding to an NLS name.
    o FindNLSTypesInPackages(CATUnicodeString&,CATListOfCATUnicodeString&,CATListValCATIType_var&,boolean)
    Returns a type found in a list of packages (and maybe in their required packages).
    o FindPackageFromType(CATIType_var&,CATUnicodeString&)
    Returns the Package of a Type (CATIType_var).
    o FindType(CATUnicodeString&,CATIType_var&)
    Returns a type found by its internal name.
    o FindTypeInPackage(CATUnicodeString&,CATUnicodeString&,CATIType_var&,boolean)
    Returns a type found in a certain package (and maybe in its required packages).
    o FindTypeSafe(CATUnicodeString&,CATUnicodeString&,CATIType_var&)
    Returns a type found by its internal name and package name.
    o ListInstanciableTypes(CATListValCATIType_var&)
    Returns the list of the types that can be instanciated.
    o ListPackages(CATListOfCATUnicodeString&)
    Returns the list of loaded packages names.
    o ListPrerequisitesForPackage(CATUnicodeString&,CATListOfCATUnicodeString&)
    Returns the list of required packages for a given package.
    o ListSubTypesOfTypeForPackage(CATUnicodeString&,CATIType_var&,CATListValCATIType_var&,boolean)
    Returns the sub types list of the given type found in the given package.
    o ListSubTypesOfTypeForPackages(CATListOfCATUnicodeString&,CATIType_var&,CATListValCATIType_var&,boolean)
    Returns the sub types list of the given type found in the given packages.
    o ListTypesForPackage(CATUnicodeString&,CATListValCATIType_var&,boolean)
    Returns the list of the types contained in a package.
    o ListTypesForPackages(CATListOfCATUnicodeString&,CATListValCATIType_var&,boolean)
    Returns the lists of the types contained in several packages.
    o LoadLibrary(char*)
    Asks to load a library by its name.
    o LoadPackage(CATUnicodeString&)
    Forces a package to be loaded.
    o RemoveDictionaryListener(CATITypeDictionaryListener_var&)
    Removes a listener on the dictionary.
    o RemovePackage(CATUnicodeString&)
    Removes a package and all the types belonging to it from the dictionary.
    o RemoveType(CATIType_var&)
    Removes a type from the dictionary.
    o RemoveType(CATUnicodeString&)
    Removes a type from the dictionary.
    o Synchronize()
    This method can be called to ask dictionary listeners to synchronize their description if needed.

    Methods


    o AddDictionaryListener
    public virtual AddDictionaryListener( const iListener)
    Adds a listener on the dictionary. The listener is called back when events are raised by the object.
    Parameters:
    iListener
    Listener to be added.
    Returns:
    classic HRESULT
    o AddMethodForPackage
    public virtual AddMethodForPackage( const iMethod,
    const iPackage)
    Adds a method/function in a dictionary package. Note that a package can contain only types or packages, not both. A method/function is created with the service.
    Parameters:
    iMethod
    a method.
    iPackage
    Name of the package the method is to be added to.
    Returns:
    classic HRESULT
    o AddPackage
    public virtual AddPackage( const iPackage,
    ilListOfPrerequisites)
    Creates a package in the dictionary.
    Parameters:
    iPackage
    Name of the package.
    ilListOfPrerequisites
    List of required package names.
    Returns:
    classic HRESULT
    o AddTypeForPackage
    public virtual AddTypeForPackage( const iType,
    const iPackage,
    isBrowsable= 1)
    Adds a created type in an existing package of the dictionary. If this package name equals "", then the type is stored in the dictionary but belongs to no package. A type created but not added to the dictionary cannot be used.
    Parameters:
    iType
    Type to be added.
    iPackage
    Name of the package the type has to be added to.
    isBrowsable
    Is (1) or is not (0) seen in Knowledge type browsers.
    Returns:
    classic HRESULT
    o AdviseInstanciated
    public virtual AdviseInstanciated( const iType,
    const iInstance)
    Indicates that a type from the dictionary was instanciated. This service should be called when an object for which it exists a implementation (and then a for this ), is created.
    Parameters:
    iType
    Type.
    iInstance
    Instance of the type iType that was instanciated.
    Returns:
    classic HRESULT
    o AdviseMethodAdded
    public virtual AdviseMethodAdded( const iMethod)
    Indicates that a method was added to the dictionary.
    Parameters:
    iMethod
    Added method.
    Returns:
    classic HRESULT
    o AdviseMethodRemoved
    public virtual AdviseMethodRemoved( const iMethod)
    Indicates that a method was removed from the dictionary.
    Parameters:
    iMethod
    Removed method.
    Returns:
    classic HRESULT
    o AdviseTypeAdded
    public virtual AdviseTypeAdded( const iType)
    Indicates that a type was added to the dictionary.
    Parameters:
    iType
    Added type.
    Returns:
    classic HRESULT
    o AdviseTypeRemoved
    public virtual AdviseTypeRemoved( const iType)
    Indicates that a type was removed from the dictionary.
    Parameters:
    iType
    Removed type.
    Returns:
    classic HRESULT
    o AdviseTypeUpdated
    public virtual AdviseTypeUpdated( const iType)
    Indicates that a type was updated from the dictionary.
    Parameters:
    iType
    Updated type.
    Returns:
    classic HRESULT
    o CreateType
    public virtual CreateType( const iTypeName,
    const iNLSTypeName,
    const iSuperType,
    oTypeCreated,
    const iListOfAttributeInfos,
    const iInstanciatiorName)
    Creates a type. Remember to add it to the dictionary in order to be able to use it ( ). The last argument should always be the empty string.
    Parameters:
    iTypeName
    Internal name of the type.
    iNLSTypeName
    NLS name of the type.
    iSuperType
    Supertype of the type.
    oTypeCreated
    Created type.
    iListOfAttributeInfos
    List of the type attributes.
    iInstanciatiorName
    Name of a CATIInstanciation implementation.
    Returns:
    classic HRESULT
    o CreateType
    public virtual CreateType( const iTypeName,
    const iNLSTypeName,
    const iSuperType,
    oTypeCreated,
    const ilListOfAttributeInfos= NULL,
    iInstanciationFunction= NULL )
    Creates a type. Remember to add it to the dictionary in order to be able to use it ( ). The last (optional) argument should always be NULL.
    Parameters:
    iTypeName
    Internal name of the type.
    iNLSTypeName
    NLS name of the type.
    iSuperType
    Supertype of the type.
    oTypeCreated
    Created type.
    ilListOfAttributeInfos
    List of the type attributes.
    iInstanciationFunction
    Instanciation function needed for Generative Knowledge (default to NULL).
    Returns:
    classic HRESULT
    o FindNLSType
    public virtual FindNLSType( const iNLSType,
    oType)
    Returns a type found by its NLS name. Note that the type must have been added to the dictionary in order for this method to successfull.
    Parameters:
    iNLSType
    NLS name of the type.
    oType
    Type (or NULL_var if not found).
    Returns:
    classic HRESULT
    o FindNLSTypeInPackages
    public virtual FindNLSTypeInPackages( const iNLSType,
    const iPackages,
    oType,
    iIncludePrerequisites= 1)
    Returns a type found in a certain package (and maybe in its required packages).
    Parameters:
    iNLSType
    NLS name of the type.
    iPackages
    Name of the packages.
    oType
    Found type (or NULL_var).
    iIncludePrerequisites
    Includes required packages (1, default) or not (0).
    Returns:
    classic HRESULT
    o FindNLSTypes
    public virtual FindNLSTypes( const iNLSType,
    olListOfTypes)
    Returns a list of types corresponding to an NLS name. Note that the type must have been added to the dictionary in order for this method to successfull. Note that there may be several types with the same NLS name (!).
    Parameters:
    iNLSType
    NLS name of the type.
    olListOfTypes
    List of types.
    Returns:
    classic HRESULT
    o FindNLSTypesInPackages
    public virtual FindNLSTypesInPackages( const iNLSType,
    const ilListOfPackages,
    olListOfTypes,
    iIncludePrerequisites= 1)
    Returns a type found in a list of packages (and maybe in their required packages).
    Parameters:
    iNLSType
    NLS name of the type.
    ilListOfPackages
    List of packages names.
    olListOfTypes
    Found types.
    iIncludePrerequisites
    Includes required packages (1, default) or not (0).
    Returns:
    classic HRESULT
    o FindPackageFromType
    public virtual FindPackageFromType( const iType,
    oPackage)
    Returns the Package of a Type (CATIType_var).
    Parameters:
    iType
    type.
    oPackage
    name of the package returned.
    Returns:
    classic HRESULT
    o FindType
    public virtual FindType( const iType,
    oType)
    Returns a type found by its internal name. Note that the type must have been added to the dictionary in order for this method to successfull. See also .
    Parameters:
    iType
    Internal name of the type.
    oType
    Type (or NULL_var if not found).
    Returns:
    classic HRESULT
    o FindTypeInPackage
    public virtual FindTypeInPackage( const iType,
    const iPackage,
    oType,
    iIncludePrerequisites= 1)
    Returns a type found in a certain package (and maybe in its required packages).
    Parameters:
    iType
    Name of the type.
    iPackage
    Name of the package.
    oType
    Found type (or NULL_var).
    iIncludePrerequisites
    Includes required packages (1, default) or not (0).
    Returns:
    classic HRESULT
    o FindTypeSafe
    public virtual FindTypeSafe( const iType,
    const iPackage,
    oType)
    Returns a type found by its internal name and package name. The difference between FindType and FindTypeSafe is that if the type is not found, FindTypeSafe will load the given package and retry to find the type.
    Parameters:
    iType
    Internal name of the type.
    iPackage
    Internal name of the package.
    oType
    Type (or NULL_var if not found).
    Returns:
    classic HRESULT
    o ListInstanciableTypes
    public virtual ListInstanciableTypes( olListOfTypes)
    Returns the list of the types that can be instanciated.
    Parameters:
    olListOfTypes
    List of types that can be instanciated.
    Returns:
    classic HRESULT
    o ListPackages
    public virtual ListPackages( olListOfPackages)
    Returns the list of loaded packages names.
    Parameters:
    olListOfPackages
    list of packages
    Returns:
    classic HRESULT
    o ListPrerequisitesForPackage
    public virtual ListPrerequisitesForPackage( const iPackage,
    olListOfPrerequisites)
    Returns the list of required packages for a given package.
    Parameters:
    iPackage
    a package name.
    olListOfPrerequisites
    the list of required package names.
    Returns:
    classic HRESULT
    o ListSubTypesOfTypeForPackage
    public virtual ListSubTypesOfTypeForPackage( const iPackage,
    const iFatherType,
    oListOfSubTypes,
    iIncludePrerequisites= 1 )
    Returns the sub types list of the given type found in the given package. The returned list can be restricted to the sub types found in the given package or be extended to the sub types also belonging to required packages.
    Parameters:
    iPackage
    Name of the package.
    iFatherType
    The type from which we'll get the sub types list.
    oListOfSubTypes
    List of wanted sub types. Notice that if you give a non empty list, it will not be emptied before filling it with the wanted subtypes.
    iIncludePrerequisites
    Includes (1) or not (0) types of required packages. Default is 1.
    Returns:
    classic HRESULT
    o ListSubTypesOfTypeForPackages
    public virtual ListSubTypesOfTypeForPackages( const iPackages,
    const iFatherType,
    oListOfSubTypes,
    iIncludePrerequisites= 1 )
    Returns the sub types list of the given type found in the given packages. The returned list can be restricted to the sub types found in the given packages or be extended to the sub types also belonging to required packages.
    Parameters:
    iPackages
    Name of the package.
    iFatherType
    The type from which we'll get the sub types list.
    oListOfSubTypes
    List of wanted sub types. Notice that if you give a non empty list, it will not be emptied before filling it with the wanted subtypes.
    iIncludePrerequisites
    Includes (1) or not (0) types of required packages. Default is 1.
    Returns:
    classic HRESULT
    o ListTypesForPackage
    public virtual ListTypesForPackage( const iPackage,
    olListOfTypes,
    iIncludePrerequisites= 1 )
    Returns the list of the types contained in a package. The returned list can be restricted to the types in the package or be extended to the types also belonging to required packages.
    Parameters:
    iPackage
    Name of the package.
    olListOfTypes
    List of wanted types.
    iIncludePrerequisites
    Includes (1) or not (0) types of required packages. Default is 1.
    Returns:
    classic HRESULT
    o ListTypesForPackages
    public virtual ListTypesForPackages( const iPackages,
    olListOfTypes,
    iIncludePrerequisites= 1 )
    Returns the lists of the types contained in several packages.
    Parameters:
    iPackages
    List of package names.
    olListOfTypes
    List of found types.
    iIncludePrerequisites
    Includes (1) or not (0) types of required packages. Default is 1.
    Returns:
    classic HRESULT
    o LoadLibrary
    public virtual LoadLibrary( const iLibraryName)
    Asks to load a library by its name.
    Parameters:
    iLibraryName
    C++ class name of the library
    Returns:
    CATCke::True if succeeded
    o LoadPackage
    public virtual LoadPackage( const iPackage)
    Forces a package to be loaded. This is mandatory to define types depending on other types.
    Parameters:
    iPackage
    Name of the package to be loaded.
    Returns:
    classic HRESULT
    o RemoveDictionaryListener
    public virtual RemoveDictionaryListener( const iListener)
    Removes a listener on the dictionary. The listener is called back when events are raised by the object.
    Parameters:
    iListener
    Listener to be removed.
    Returns:
    classic HRESULT
    o RemovePackage
    public virtual RemovePackage( const iPackage)
    Removes a package and all the types belonging to it from the dictionary.
    Parameters:
    iPackage
    Name of the package to be removed.
    Returns:
    classic HRESULT
    o RemoveType
    public virtual RemoveType( const iType)
    Removes a type from the dictionary.
    Parameters:
    iType
    Type to be removed.
    Returns:
    classic HRESULT
    o RemoveType
    public virtual RemoveType( const iTypeName)
    Removes a type from the dictionary.
    Parameters:
    iTypeName
    Internal name of the type.
    Returns:
    classic HRESULT
    o Synchronize
    public virtual Synchronize()
    This method can be called to ask dictionary listeners to synchronize their description if needed.
    Returns:
    classic HRESULT

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

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