www.kxcad.net Home > Electronic Index > Altium(Protel) Index
Client / Server Interfaces
The empty workspace or the shell of DXP is the top level client window. The client module is represented by its IClient interface object, and you can have the ability to take a peek into a loaded server’s data structures through this IClient interface. Servers are represented by its IServerModule interfaces.
An interface is simply a list of methods that a class declares that it implements. That is, each method in the interface is implemented in the corresponding class. Interfaces are declared like classes but cannot be directly instantiated and do not have their own method definitions.
The client module maintains a list of loaded servers, that is this module stores many lists of opened server documents, loaded server processes, loaded server resources. Each loaded server is represented as an IServerModule interface. The client also maintains a view or a list of servers by collecting the server installation files from the \Altium\system folder and this list is represented by the IServerRecord interfaces at the start up of DXP.
The two main object interfaces are the IServerModule and the IClient interface objects.
DXP architecture
Central to the DXP architecture is the concept of a single client module as the controller collaborating with loaded servers. Each server manages their own documents. This is a big picture view of the Design Explorer – there is one Client executable and several servers as loaded dynamic library linked modules.
The client subsystem is represented by the IClient interface and the loaded servers are represented as IServerModule interfaces. Each server independently controls panels and design documents. It is important to note that a design document is composed of a document window and at least one panel window. The client has a table of server commands (linked to process launchers) depending on which design document is active in DXP and each command when invoked is routed to the server module and then to the active design document and finally into the focussed TServerDocumentView window.
An IServerDocument interface is a container which stores views (as a document and panel views). Each IServerDocument container object contains same IServerDocumentView objects which contains at least the design document form and a panel form, thus there are at least two copies of the IServerDocumentView objects (one for the document window, and one for the ubiquitous panel) for each IServerDocument object.
A server also has links to independent panel views as TServerView objects which are not tied to any particular document (as global panels which can be used as views on various system states).
Script Examples
There are Client / Server script examples in the \Examples\Scripts\DXP folder
See Also
Client/Server Interfaces Overview
Delphi Script Extensions Reference
Delphi Script Component Reference