Click or drag to resize

CTExtension Methods

The CTExtension type exposes the following members.

Methods
 NameDescription
Public methodCreateObjectT Allows Class Factory pattern for objects that have public parameterless constructor.
Public methodFriendlyName Name of current extension in user-friendly manner. Can be localized. Short name of current type by default.
Public methodCode exampleGetExportProfileLinkToDBObject Read id of the linked object stored by your extension using StoreExportProfileLinkToDBObject(ICTExportProfile, SQLObjectType, Int32, Int32). Use intData to identify specific link or otherwise first to found is returned.
Public methodGetInterfaceObsolete.
Implementation of this function should return object implementing the requested type in every case if this extension supports the interface, including when this extension is not initialized. If this extension is not initialized, the only function that might get called is GetParent().
Public methodGetInterface2 Implementation of this function should return objects implementing the requested type in every case if this extension supports the interface, including when this extension is not initialized. If this extension is not initialized, the only function that might get called is GetParent().
Public methodGetInterfaceCapabilities Returns all interfaces this extension is capable of.
Public methodGetSpecificInterfaceObsolete.
Calls GetInterface2(ctExtensionInterface) and verifies that returned type is valid before passing it to the core.
Public methodGetSpecificInterfaces Calls GetInterface2(ctExtensionInterface) and verifies that returned types are valid before passing it to the core.
Public methodGetStatus Status of this extension as defined int CTEngineLib.ctExtensionStatus
Public methodHook Implementation of this function is the only valid and supported place to hook into CTInterface events. Additional event -hooking is not allowed anywhere else. This is called after this object is initialized in case the current environment supports CTInterface events. Must not be called by anything else than internal implementation.
Public methodIdentifyingName By default identifying name of each extensions is their full typename. This can be overridden but is not couraged as each add-in should have unique and non-changing identifying name.
Public methodInitNotify Notification that this object is now initialized: Database and Profile are now valid. Inheritance may return false to prevent initialized status for eg. licensing purposes.
Public methodIsInitialized Getter to indicate if this extension is currently initialized or not.
Public methodLogToFile When called for the first time during the session, initializes log file (%TEMP%\<identifying name>.log") and appends the string to the log. Consequent calls just appends to the log file.
Public methodNotifyLoaded Notification that this extension is now loaded.
Public methodNotifyUnLoaded Notification that this extension is now UnLoaded.
Public methodReadExportSettings Read arbitrary data for your extension stored with StoreExportSettings(ICTExportProfile, String, Int32, Byte).
Public methodSetGeneralParam Possibility to provide some extension specific parameters.
Public methodCode exampleStoreExportProfileLinkToDBObject Store link-data of your extension from export profile to given DB object type with given id. ID's stored using this function are kept linked to correct objects even in profile import/export -cases. Use intData to distinct different links of same type.
Public methodStoreExportSettings Store arbitrary data to given export profile's data slot for your extension. You may store easily one string and one integer per export profile, or even unlimited bytearray.

To store settings that consider links to other CT objects, use StoreExportProfileLinkToDBObject(ICTExportProfile, SQLObjectType, Int32, Int32) so the object IDs are handled correctly in import/export.

Public methodUnHook Implementation of this function must release all event hooks added at Hook(CTInterface). This function may be called multiple times. This is called before the object is going to be uninitialized, re-initialized or if CTInterface object is changed. Must not be called by anything else than internal implementation.
Public methodUnInitNotify Notification that this object is now un-initialized: Database and Profile are not valid anymore.
Public methodUnload Unloads this extension.
Top
See Also