From: Teiniker E. <tei...@us...> - 2007-02-25 10:53:56
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14346/test/JavaAssembly/prototype2 Added Files: Makefile Test.assembly Test.idl build.xml Log Message: Added second prototype for Java assemblies. --- NEW FILE: Makefile --- DEST_DIR = xxx IDL3_DIR = ${DEST_DIR}/idl3 IDL2_DIR = ${DEST_DIR}/idl2 INCLUDE = -I${IDL3_DIR}/interface -I${IDL3_DIR}/component all: local test: local check clean idl3: Test.idl ccmmodel -validator Test.idl ccmidl -idl3 -o ${IDL3_DIR} Test.idl local: idl3 ccmjava -iface -local -o ${DEST_DIR}/src-gen ${INCLUDE} ${IDL3_DIR}/interface/wamas/Test/*.idl ccmjava -iface -local -o ${DEST_DIR}/src-gen ${INCLUDE} ${IDL3_DIR}/component/wamas/Test/*.idl ccmjava -iface -local -o ${DEST_DIR}/src-gen ${INCLUDE} ${IDL3_DIR}/component/wamas/*.idl ccmjava -app -o ${DEST_DIR}/src ${INCLUDE} ${IDL3_DIR}/component/wamas/Test/*.idl ccmjava -assembly -o ${DEST_DIR}/src ${INCLUDE} Test.assembly ${IDL3_DIR}/component/wamas/*.idl ${IDL3_DIR}/component/wamas/Test/*.idl build: ant -f ./build.xml check: cp impl/Main.java ${DEST_DIR}/src/wamas cp impl/C1i1Impl.java ${DEST_DIR}/src/wamas/Test ant -f ./build.xml bin/runClient clean: # rm -rf ${DEST_DIR} --- NEW FILE: Test.assembly --- module wamas { assembly A3 implements C3 { component Test::C1 comp1; component wamas::Test::C2 comp2; connect comp2.i2 to comp1.i2; connect comp1.i1 to this.i1; connect i3 to comp2.i3; constant comp1.a1 = "Hello World"; constant comp1.a2 = 642; attribute comp2.b = this.b; }; }; // /module wamas --- NEW FILE: build.xml --- <project name="JavaClientLibTest" default="compile"> <property name="dest" location="xxx" /> <property name="idl2" location="${dest}/idl2" /> <property name="src-gen" location="${dest}/src-gen" /> <property name="build" location="${dest}/build" /> <property name="src" location="${dest}/src" /> <path id="compile.classpath"> <pathelement path="${java.class.path}" /> </path> <!-- Create the build directory--> <target name="init" description="" > <mkdir dir="${build}" /> </target> <!-- Compile generated Java files--> <target name="compile" depends="init" description="" > <javac srcdir="${src-gen}:${src}" destdir="${build}" debug="on" source="1.5" target="1.5"> <classpath refid="compile.classpath" /> </javac> </target> <!-- Clean up --> <target name="clean" description="" > <delete dir="${build}" /> </target> </project> --- NEW FILE: Test.idl --- module wamas { module Test { interface I1 { string value(); }; interface I2 { /* empty */ }; interface I3 { /* empty */ }; component C1 { attribute string a1; attribute long a2; provides I1 i1; uses I2 i2; }; home H1 manages C1 { }; component C2 { attribute long b; provides I2 i2; uses I3 i3; }; home H2 manages C2 { }; }; // /module Test component C3 { attribute long b; provides Test::I1 i1; uses Test::I3 i3; }; home H3 manages C3 { }; }; // /module wamas |