| Documentation Alma (english) | Index | Home |
|---|---|
|
Version: 0.29 Date: 2001-03-05 Author: Guillaume Desnoix |
The documentation of the software named Alma is protected by copyright according to the laws of the french state. Any reproduction (copy, mirror, printing, ...) is forbidden without a written autorisation from the author. Every one can read it freely (and only) on this web site www.memoire.com. |
Go to the directory where you uncompress the archive and type java com.memoire.alma.Alma . If you get some error, please verify that your CLASSPATH is correct.
#!/bin/sh export CLASSPATH=".:$CLASSPATH" java com.memoire.alma.Alma
Go to the directory where you uncompress the archive and type java com.memoire.alma.Agl . If you get some error, please verify that your CLASSPATH is correct.
In this mode, you must specify the arguments if you want to get some useful work.
These examples are only for the commnand-line mode. For the graphical one, please report to the previous chapter and to the demonstration.
The JDK 1.02 is provided with an archive named src.zip .
It contains all the source-code of the standard classes (classes.zip).
To load the class String, we will use the following command:
java com.memoire.alma.Agl src/java/lang/String.java
The file will be read and you will get some very similar Java code !
Indeed, Java is the default target.
More useful, let's change the target, for example Hpp which correponds to the headers of a C++ program. The command is now:
java com.memoire.alma.Agl -g Hpp src/java/lang/String.java
The output is a more or less valid declaration of the String class in C++.
To save it, you should just redirect the standard output to a file which we
will call jstring.hpp :
java com.memoire.alma.Agl -g Hpp src/java/lang/String.java
>jstring.hpp
Now, if we want to transform all the package
lang in IDL, we will type:
java com.memoire.alma.Agl -g Idl src/java/lang/*.java
>lang.idl
We suppose that you have a set of Corba/IDL declarations in a file
mes_interfaces.idl . Alma will produce an inheritance diagram by module and a relations diagram by class.
For the hierarchy of MonModule :
java com.memoire.alma.Agl -p Idl -g UmlHierarchie -fm MonModule mes_interfaces.idl >_H_MonModule.html
The graph is saved as UmlHierarchie.gif. Just rename it:
mv UmlHierarchie.gif _H_MonModule.gif
For the relations of MonInterface :
java com.memoire.alma.Agl -p Idl -g UmlRelations -fc MonInterface mes_interfaces.idl >_R_MonInterface.html
The graph is saved as UmlRelations.gif. Just rename it:
mv UmlRelations.gif _R_MonInterface.gif
Of course, it's easier to write a short script to do all the job at one time:
#!/bin/sh
# Hierarchie
MODULES=`grep module mes_interfaces.idl | nawk '{ print $2 }' `
for m in MODULES
do
echo "Module $m"
java com.memoire.alma.Agl -p Idl -g UmlHierarchie -fm "$m" mes_interfaces.idl >"_H_$m.html"
mv UmlHierarchie.gif "_H_$m.gif"
done
# Relations
INTERFACES=`grep interface mes_interfaces.idl | nawk '{ print $2 }' `
for i in INTERFACES
do
echo "Interface $i"
java com.memoire.alma.Agl -p Idl -g UmlRelations -fc "$i" mes_interfaces.idl >"_R_$i.html"
mv UmlRelations.gif "_R_$i.gif"
done