Okapi .NET Library

IUtilitySet Interface

 [This is preliminary documentation and subject to change.]

Utility set interface.

For a list of all members of this type, see IUtilitySet Members.

[Visual Basic]
Public Interface IUtilitySet
[C#]
public interface IUtilitySet
[C++]
public __gc __interface IUtilitySet
[JScript]
public interface IUtilitySet

Types that implement IUtilitySet

TypeDescription
BaseUtilitySet Base class for the implementation of the IUtilitySet interface.

Remarks

The IUtilitySet interface provides a common way of accessing utilities.

Just after creating an object that implements IUtilitySet, you should call the Initialize method. At this point you can query how many utilities are available in the set with GetUtilityCount, retrieve their identifier with GetUtilityIdentifier, and their description with GetUtilityDescription.

You can query which utility is currently active using GetCurrentUtility, and specify the one to activate by calling SetCurrentUtility.

Once the utility that you are going to use is set, you can query it to know what types of data it needs and provide the data: The GetInputListCount method indicates how many input lists need to be populated, and GetInputListType what type of input (i.e. source or target). Use ResetFileLists to empty the lists, and AddInput to add new input files. The NeedOutput method tells you if the utility needs output information. If so, you can specify that information with AddOutput.

The SetLanguages method specify the source and target langauges to use. The NeedRoot method indicates if you need to specify a root, which you can do with SetRoot.

In addition to the generic input data, some utility have options. The method HasOptions allows you to check this. SetOptions and GetOptions sets and gets these parameters, SetDefaultOptions resets the options to their default values, and EditOptions allows you to modify the options using the editor provided by the utility itself.

Once all options and data are set, call the Execute method to excute the utility.

After the process is completed, you can use GetLastOutputFolder to retrieve the name of the last output folder used by the utility.

Requirements

Namespace: Okapi.Library.Utility

Assembly: Okapi.Library.Utility (in Okapi.Library.Utility.dll)

See Also

IUtilitySet Members | Okapi.Library.Utility Namespace