OpenCCM - PSS Module User Guide | |||||||||||||||||||||||
PSS Module User GuideCompiling OMG PSDL files and generating associated Java mapping implementations
The
$ cat test/sample.psdl // This file is the OMG PSDL example used in the OpenCCM User's Guide. #pragma prefix "ccm.objectweb.org" module sample { storagetype ST {}; storagehome SH of ST {}; }; $ $ psdl_java test/sample.psdl psdl_java 0.9.0: Reading from file test/sample.psdl... psdl_java 0.9.0: Preprocessing file test/sample.psdl... psdl_java 0.9.0: File test/sample.psdl preprocessed. psdl_java 0.9.0: Compiling test/sample.psdl file... psdl_java 0.9.0: Compilation completed: 0 warning. psdl_java 0.9.0: Generating Java mapping from test/sample.psdl ... File '.../generated/org/objectweb/ccm/sample/sample.jdo' has been generated File '.../generated/org/objectweb/ccm/sample/ST.java' has been generated File '.../generated/org/objectweb/ccm/sample/SH.java' has been generated psdl_java 0.9.0: Java mapping generated. $
The generated classes are the Java mapping associated to the OMG PSDL definitions.
The $ ls generated/org/objectweb/ccm/sample/ sample.jdo SH.java ST.java $
The
To obtain usage and help information, do: $ psdl_java --help Usage: psdl_java [-h|--help] [--version] [--silent] [--cpp path] [-P] [-DNAME|-DNAME=DEF] [-UNAME] [-IDIR] [-d outputdir] file [-jdoprop jdo_properties_file] Options: -h, --help Display this information and exit --version Output version information and exit --silent Silent output messages --cpp path Set the path to the external C preprocessor used -P Inhibit generation of #-lines with line-number information -DNAME, -DNAME=DEF Define NAME as DEF, default is 1 -UNAME Remove any definition for NAME -IDIR Put DIR in the include file search path -d outputdir Generate Java mapping in directory <outputdir>, default is generated/ -jdoprop jdo_properties_file Get user classes definition from the properties file <jdo_properties_file> default is "jdouser.properties" Description: Compile an OMG PSDL file and generate its associated Java mapping $ To obtain version information, do: $ psdl_java --version OpenCCM psdl_java 0.9.0 Copyright (C) 2000-2003 INRIA - USTL - LIFL - GOAL . . . $
By default, the $ psdl_java --silent test/sample.psdl $
By default, the $ psdl_java --cpp /usr/bin/cpp test/sample.psdl . . . $
Let's note that the standard $ psdl_java -DFOO -Itest test/sample.psdl . . . $
When some preprocessing options are often used, e.g.
By default, the // An OMG PSDL file. #ifdef __OMG_IDL_3__ // This file is compiled by an OMG IDL 3.x compliant compiler. import CORBA; #else // This file is compiled by a non OMG IDL 3.x compliant compiler. #include <CORBA.idl> #endif // ...
By default, the $ psdl_java -d mapping test/sample.psdl . . . $ ls mapping/org/objectweb/ccm/sample/ sample.jdo SH.java ST.java $
When user classes inherit from generated classes for OMG PSDL,
this is required with JDO to enhance these user classes.
The my_user_class = its_super_class
This means that
Then the |
|||||||||||||||||||||||
Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster | Last modified at 2005-07-07 02:04 PM |