All Frameworks  Class Hierarchy  This Framework  Indexes   

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 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 CATGlobalFunctions::GetTypeDictionary() service.
    See also:
    CATIType
    See also:
    CATITypeDictionaryListener
    See also:
    CATIAddTypeLibrary
    See also:
    CATIAddLibrary


    Method Index


    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&,CATIInstance_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 FindEvent(CATIInstance_var&,CATUnicodeString&,CATBaseUnknown_var&)
    Returns an event found by its internal name.
    o FindNLSTypeInPackages(CATUnicodeString&,CATListOfCATUnicodeString&,CATIType_var&,boolean)
    Returns a type found in a certain package (and maybe in its required packages).
    o FindNLSType(CATUnicodeString&,CATIType_var&)
    Returns a type found by its 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 FindNLSTypes(CATUnicodeString&,CATListValCATIType_var&)
    Returns a list of types corresponding to an NLS 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 FindType(CATUnicodeString&,CATIType_var&)
    Returns a type found by its internal name.
    o ListMethodsForPackage(CATUnicodeString&,CATListValCATBaseUnknown_var&)
    Returns the list of the methods contained in a package.
    o ListMethodsForPackages(CATListOfCATUnicodeString&,CATListValCATBaseUnknown_var&)
    Returns the list of the methods contained in several packages.
    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 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.
    o UpdateType(CATUnicodeString&,CATUnicodeString&,CATListValCATAttributeInfos*)
    Updates the type by changing the list of its attributes.

    Methods


    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 CATICkeFunctionFactory.CreateFunction service.
    Parameters:
    iMethod
    a method.
    iPackage
    Name of the package the method is to be added to.
    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.
    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.
    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 CATIInstance implementation (and then a CATIType for this CATIInstance), is created.
    Parameters:
    iType
    Type.
    iInstance
    Instance of the type iType that was instanciated.
    o AdviseMethodAdded
    public virtual AdviseMethodAdded( const iMethod)
    Indicates that a method was added to the dictionary.
    Parameters:
    iMethod
    Added method.
    o AdviseMethodRemoved
    public virtual AdviseMethodRemoved( const iMethod)
    Indicates that a method was removed from the dictionary.
    Parameters:
    iType
    Removed method.
    o AdviseTypeAdded
    public virtual AdviseTypeAdded( const iType)
    Indicates that a type was added to the dictionary.
    Parameters:
    iType
    Added type.
    o AdviseTypeRemoved
    public virtual AdviseTypeRemoved( const iType)
    Indicates that a type was removed from the dictionary.
    Parameters:
    iType
    Removed type.
    o AdviseTypeUpdated
    public virtual AdviseTypeUpdated( const iType)
    Indicates that a type was updated from the dictionary.
    Parameters:
    iType
    Updated type.
    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 ( CATITypeDictionary.AddTypeForPackage ). The last (optional) argument the name of an implementation of the CATIInstanciation interface.
    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.
    iInstanciatiorName
    Name of a CATIInstanciation implementation.
    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 ( CATITypeDictionary.AddTypeForPackage ). The last (optional) argument is a pointer to function which can be used by the CATIInstanciation::Instanciate service.
    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).
    o FindEvent
    public virtual FindEvent( const iSource,
    const iEvent,
    oEvent)
    Returns an event found by its internal name. Note that the event must have been added to the dictionary in order for this method to successfull.
    Parameters:
    iType
    Internal name of the event.
    oType
    Type (or NULL_var if not found).
    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.
    iPackage
    Name of the package.
    oType
    Found type (or NULL_var).
    iIncludePrerequisites
    Includes required packages (1, default) or not (0).
    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).
    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).
    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.
    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).
    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. This method is interesting in CATIInstance::Type implementation.
    Parameters:
    iType
    Internal name of the type.
    iPackage
    Internal name of the package.
    oType
    Type (or NULL_var if not found).
    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 FindTypeSafe method in this file.
    Parameters:
    iType
    Internal name of the type.
    oType
    Type (or NULL_var if not found).
    o ListMethodsForPackage
    public virtual ListMethodsForPackage( const iPackage,
    olListOfMethods)
    Returns the list of the methods contained in a package.
    Parameters:
    iPackage
    Name of the package.
    olListOfMethods
    List of methods.
    o ListMethodsForPackages
    public virtual ListMethodsForPackages( const iPackages,
    oListOfTypes)
    Returns the list of the methods contained in several packages.
    Parameters:
    iListOfPackages
    List of package names.
    olListOfMethods
    List of methods.
    o ListPackages
    public virtual ListPackages( olListOfPackages)
    Returns the list of loaded packages names.
    Parameters:
    olListOfPackages
    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.
    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.
    olListOfSubTypes
    List of wanted sub types.
    olListOfSubTypes
    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.
    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:
    iPackage
    Name of the package.
    iFatherType
    The type from which we'll get the sub types list.
    olListOfSubTypes
    List of wanted sub types.
    olListOfSubTypes
    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.
    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.
    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.
    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.
    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.
    o RemoveType
    public virtual RemoveType( const iType)
    Removes a type from the dictionary.
    Parameters:
    iType
    Type to be removed.
    o RemoveType
    public virtual RemoveType( const iTypeName)
    Removes a type from the dictionary.
    Parameters:
    iTypeName
    Internal name of the type.
    o Synchronize
    public virtual Synchronize()
    This method can be called to ask dictionary listeners to synchronize their description if needed.
    o UpdateType
    public virtual UpdateType( const iTypeName,
    const iPackage,
    const ilListOfAttributeInfos= NULL )
    Updates the type by changing the list of its attributes. You must give the full list of new attributes.
    Parameters:
    iTypeName
    Internal name of the type.
    iPackage
    Name of the package.
    ilListOfAttributeInfos
    List pointer of attributes (default = NULL).

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

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