The Repository

The repository is a central register which controls all clusters: all libraries and all projects. The repository is a very flexible tool - especially for the development of big applications.

Select project dialog boxThe Repository is based on the concept of unique names. Each cluster must have a unique name - in fact the legal name of an identifier.

In any situation where a library or a project is to be accessed, it is sufficient to use this name. As a typical example of access to the repository we show the "open project" dialog.

As we also wanted to see the libraries, we have a list of all elements of our repository. We can use these elements in our work.

These names are stored in a central file - called universe.txt. For demonstration purposes we show the content of this file. Note that:

-- Repository contains 14 elements.
CONTAINERS, d:\misc\v_eiffel\lib\contners, Library
CONTAINERS_DEMO_SUPPORT, d:\misc\v_eiffel\examples\contners, Cluster
DALE, d:\misc\v_eiffel\lib\dale, Library
DISPLAY, d:\misc\v_eiffel\lib\display, Cluster
FORMATS, d:\misc\v_eiffel\lib\formats, Library
GRAPE, d:\misc\v_eiffel\lib\grape\windows, Library
KERNEL, d:\misc\v_eiffel\lib\kernel, Library
LIST_DEMO, d:\misc\v_eiffel\examples\contners\lists, Project
NEWORDERS, d:\visual\dm\neworder, Project
ORDERS, d:\misc\v_eiffel\examples\dm\orders, Project
POOL, d:\misc\v_eiffel\lib\misc\pool, Library
SIMPLEST, d:\misc\v_eiffel\examples\grape\simplest, Project
TIMEDATE, d:\misc\v_eiffel\lib\timedate, Library
VISUAL_EIFFEL_API, d:\misc\v_eiffel\lib\misc\ve_api, Library

The scheme used in this implementation is easy to recognize - beside the name each entry contains a path and the type of the cluster.

Clusters

A cluster is, as you have seen, described by

Visual Eiffel stores to this location some additional information. So, for all clusters there is a subdirectory ecluster - in fact this subdirectory makes a cluster. Then libraries contain a subdirectory elibrary and projects a library eproject.

Library clusters dialog box For us it is sufficient to know that each Eiffel Project consists of a set of such clusters - one of them the project cluster itself and then some library cluster. In our example we had 4 projects and 8 libraries listed as members of the repository. Naturally, we can select which libraries should be in this list. The Menu item projects/settings/cluster allows us to add or to remove libraries from our project.

There is no rule requiring that each cluster must already be in the repository. So, for each project the repository is extended at least with the project cluster. The repository is growing all the time. From time to time we should remove all projects that we don't currently need. To do so, we have two options:

Then of course, we should be able to reverse these actions.


Manipulation of the repository

As mentioned above, it is dangerous to manipulate the repository file we spoke about. Instead Visual Eiffel supplies some commands to manipulate the content of the repository.

We use the batch line version of Visual Eiffel to modify the repository.

vec  /l lists all clusters in the repository
vec /rnm:<old>,<new>             renames a cluster
vec  /uc unmounts the current cluster
vec  /mc mounts the current cluster
vec  /rnm:<new name> renames the current cluster

Let's assume that we want to remove the library c:\eiffel\lib having the name MYLIB (but not permanently!). To do this we go to its directory and run:

vec /uc

That's all - the library is now removed from the repository. As an alternative call we could also remove it by calling

vec /uc:mylib

Now, lets revert this decision: We go to c:\eiffel\lib end enter:

vec /mc /rnm:mylib

The first option includes the library into the universe and the second one sets the name. We can use these commands for example in order to


Copyright © Object Tools -- info@object-tools.com
Last updated: $Date: 2005/02/02 11:51:33 $