All Frameworks Class Hierarchy This Framework Previous Next Indexes
KnowledgeInterfaces Interface CATITypeDictionary
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---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*,CATInstanciationFunction)
- Creates a type.
- o
CreateType(CATUnicodeString&,CATUnicodeString&,CATIType_var&,CATIType_var&,CATListValCATAttributeInfos*,CATUnicodeString&)
- Creates a type.
- o
FindEvent(CATIInstance_var&,CATUnicodeString&,CATBaseUnknown_var&)
- Returns an event found by its internal name.
- 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
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
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
-
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
-
Creates a package in the dictionary.
- Parameters:
-
- iPackage
- Name of the package.
- ilListOfPrerequisites
- List of required package names.
o AddTypeForPackage
public virtual HRESULT AddTypeForPackage( | const CATIType_var& | iType, |
| const CATUnicodeString& | iPackage, |
| int | isBrowsable | = 1) = 0 |
-
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 HRESULT AdviseInstanciated( | const CATIType_var& | iType, |
| const CATIInstance_var& | iInstance) = 0 |
-
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
-
Indicates that a method was added to the dictionary.
- Parameters:
-
- iMethod
- Added method.
o AdviseMethodRemoved
-
Indicates that a method was removed from the dictionary.
- Parameters:
-
- iType
- Removed method.
o AdviseTypeAdded
public virtual HRESULT AdviseTypeAdded( | const CATIType_var& | iType)= 0 |
-
Indicates that a type was added to the dictionary.
- Parameters:
-
- iType
- Added type.
o AdviseTypeRemoved
public virtual HRESULT AdviseTypeRemoved( | const CATIType_var& | iType)= 0 |
-
Indicates that a type was removed from the dictionary.
- Parameters:
-
- iType
- Removed type.
o AdviseTypeUpdated
public virtual HRESULT AdviseTypeUpdated( | const CATIType_var& | iType)= 0 |
-
Indicates that a type was updated from the dictionary.
- Parameters:
-
- iType
- Updated type.
o CreateType
-
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 CreateType
-
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 FindEvent
-
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 FindNLSType
-
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 FindNLSTypeInPackages
-
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 FindNLSTypes
-
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 FindNLSTypesInPackages
-
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 FindType
-
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 FindTypeInPackage
-
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
-
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 ListMethodsForPackage
public virtual HRESULT ListMethodsForPackage( | const CATUnicodeString& | iPackage, |
| CATListValCATBaseUnknown_var& | olListOfMethods)= 0 |
-
Returns the list of the methods contained in a package.
- Parameters:
-
- iPackage
- Name of the package.
- olListOfMethods
- List of methods.
o ListMethodsForPackages
-
Returns the list of the methods contained in several packages.
- Parameters:
-
- iListOfPackages
- List of package names.
- olListOfMethods
- List of methods.
o ListPackages
-
Returns the list of loaded packages names.
- Parameters:
-
- olListOfPackages
o ListPrerequisitesForPackage
-
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 HRESULT ListSubTypesOfTypeForPackage( | const CATUnicodeString& | iPackage, |
| const CATIType_var& | iFatherType, |
| CATListValCATIType_var& | oListOfSubTypes, |
| boolean | iIncludePrerequisites | = 1 )= 0 |
-
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 HRESULT ListSubTypesOfTypeForPackages( | const CATListOfCATUnicodeString& | iPackages, |
| const CATIType_var& | iFatherType, |
| CATListValCATIType_var& | oListOfSubTypes, |
| boolean | iIncludePrerequisites | = 1 )= 0 |
-
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 HRESULT ListTypesForPackage( | const CATUnicodeString& | iPackage, |
| CATListValCATIType_var& | olListOfTypes, |
| boolean | iIncludePrerequisites | = 1 )= 0 |
-
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
-
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 CATCke::Boolean LoadLibrary( | const char* | iLibraryName)=0 |
-
Asks to load a library by its name.
- Parameters:
-
- iLibraryName:
- C++ class name of the library
- Returns:
- : CATCke::True if succeeded
o LoadPackage
-
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
-
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 HRESULT RemoveType( | const CATIType_var& | iType)= 0 |
-
Removes a type from the dictionary.
- Parameters:
-
- iType
- Type to be removed.
o RemoveType
-
Removes a type from the dictionary.
- Parameters:
-
- iTypeName
- Internal name of the type.
o Synchronize
public virtual HRESULT Synchronize( | )= 0 |
-
This method can be called to ask dictionary listeners to synchronize their description
if needed.
o UpdateType
-
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