From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/samples/Calculator/Calculator.dsw | 53 ++++++++ .../sca/samples/Calculator/Calculator.ncb | Bin 0 -> 50176 bytes .../sca/samples/Calculator/Calculator.opt | Bin 0 -> 62976 bytes .../samples/Calculator/CalculatorModule/.cdtbuild | 42 ++++++ .../Calculator/CalculatorModule/.cdtproject | 15 +++ .../samples/Calculator/CalculatorModule/.project | 19 +++ .../org.eclipse.cdt.managedbuilder.core.prefs | 6 + .../Calculator/CalculatorModule/Calculator.h | 33 +++++ .../CalculatorModule/CalculatorImpl.componentType | 10 ++ .../Calculator/CalculatorModule/CalculatorImpl.cpp | 55 ++++++++ .../Calculator/CalculatorModule/CalculatorImpl.h | 39 ++++++ .../CalculatorModule/CalculatorModule.dsp | 138 ++++++++++++++++++++ .../CalculatorModule/CalculatorModule.plg | 39 ++++++ .../Calculator/CalculatorModule/Debug/makefile | 43 ++++++ .../Calculator/CalculatorModule/Debug/objects.mk | 7 + .../Calculator/CalculatorModule/Debug/sources.mk | 20 +++ .../Calculator/CalculatorModule/Debug/subdir.mk | 35 +++++ .../samples/Calculator/CalculatorModule/sca.module | 11 ++ .../Calculator/CalculatorModule/sca.module.lin | 11 ++ .../CalculatorSubsystem/CalculatorSubsystem.dsp | 67 ++++++++++ .../Calculator/CalculatorSubsystem/sca.subsystem | 23 ++++ .../sca/samples/Calculator/Client/.cdtbuild | 50 +++++++ .../sca/samples/Calculator/Client/.cdtproject | 15 +++ .../sca/samples/Calculator/Client/.project | 19 +++ .../org.eclipse.cdt.managedbuilder.core.prefs | 6 + .../sca/samples/Calculator/Client/Calc.cpp | 144 +++++++++++++++++++++ .../sca/samples/Calculator/Client/Calculator.h | 33 +++++ .../sca/samples/Calculator/Client/Client.dsp | 108 ++++++++++++++++ .../sca/samples/Calculator/Client/Client.plg | 16 +++ .../sca/samples/Calculator/Client/Debug/makefile | 43 ++++++ .../sca/samples/Calculator/Client/Debug/objects.mk | 7 + .../sca/samples/Calculator/Client/Debug/sources.mk | 20 +++ .../sca/samples/Calculator/Client/Debug/subdir.mk | 29 +++++ .../sca/samples/Calculator/Client/readme.txt | 53 ++++++++ .../sca/samples/Calculator/Client/runclient.cmd | 14 ++ .../sca/samples/Calculator/build.sh | 75 +++++++++++ .../sca/samples/Calculator/pack_deploy.cmd | 27 ++++ .../sca/samples/Calculator/runclient.sh | 53 ++++++++ 38 files changed, 1378 insertions(+) create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.dsw create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.ncb create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.opt create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtbuild create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtproject create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.project create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Calculator.h create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.dsp create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.plg create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/makefile create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/objects.mk create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/sources.mk create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/subdir.mk create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module.lin create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtbuild create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtproject create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/.project create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calc.cpp create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calculator.h create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.dsp create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.plg create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/makefile create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/objects.mk create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/sources.mk create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/subdir.mk create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/readme.txt create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/Client/runclient.cmd create mode 100755 tags/cpp-stable-20060304/sca/samples/Calculator/build.sh create mode 100644 tags/cpp-stable-20060304/sca/samples/Calculator/pack_deploy.cmd create mode 100755 tags/cpp-stable-20060304/sca/samples/Calculator/runclient.sh (limited to 'tags/cpp-stable-20060304/sca/samples/Calculator') diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.dsw b/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.dsw new file mode 100644 index 0000000000..7df3d3cbe8 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.dsw @@ -0,0 +1,53 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CalculatorModule"=.\CalculatorModule\CalculatorModule.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CalculatorSubsystem"=.\CalculatorSubsystem\CalculatorSubsystem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Client"=.\Client\Client.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.ncb b/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.ncb new file mode 100644 index 0000000000..fd603e4f04 Binary files /dev/null and b/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.ncb differ diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.opt b/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.opt new file mode 100644 index 0000000000..c399feabb4 Binary files /dev/null and b/tags/cpp-stable-20060304/sca/samples/Calculator/Calculator.opt differ diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtbuild b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtbuild new file mode 100644 index 0000000000..ca7fa895f1 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtbuild @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtproject b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.project b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.project new file mode 100644 index 0000000000..fa611e47c3 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.project @@ -0,0 +1,19 @@ + + + CalculatorModule + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..415787c073 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,6 @@ +#Tue Dec 13 10:02:34 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.so.debug.749943809=\n\n diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Calculator.h b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Calculator.h new file mode 100644 index 0000000000..9284178d5f --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Calculator.h @@ -0,0 +1,33 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#ifndef CALCULATOR_H +#define CALCULATOR_H +class Calculator +{ +public: + virtual float add(float arg1, float arg2) = 0; + virtual float sub(float arg1, float arg2) = 0; + virtual float mul(float arg1, float arg2) = 0; + virtual float div(float arg1, float arg2) = 0; +}; + +#endif + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType new file mode 100644 index 0000000000..2033f431bb --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp new file mode 100644 index 0000000000..96bd363167 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp @@ -0,0 +1,55 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#include "CalculatorImpl.h" + +CalculatorImpl::CalculatorImpl() +{ +} + +CalculatorImpl::~CalculatorImpl() +{ +} + +// Calculator interface +float CalculatorImpl::add(float arg1, float arg2) +{ + float result = arg1 + arg2; + return result; +} + +float CalculatorImpl::sub(float arg1, float arg2) +{ + float result = arg1 - arg2; + return result; +} + +float CalculatorImpl::mul(float arg1, float arg2) +{ + float result = arg1 * arg2; + return result; +} + +float CalculatorImpl::div(float arg1, float arg2) +{ + float result = arg1 / arg2; + return result; +} + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h new file mode 100644 index 0000000000..38570aae28 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h @@ -0,0 +1,39 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#ifndef CALCULATORIMPL_H +#define CALCULATORIMPL_H + +#include "Calculator.h" + +class CalculatorImpl : public Calculator +{ +public: + CalculatorImpl(); + virtual ~CalculatorImpl(); + + // Calculator interface + virtual float add(float arg1, float arg2); + virtual float sub(float arg1, float arg2); + virtual float mul(float arg1, float arg2); + virtual float div(float arg1, float arg2); +}; + +#endif + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.dsp b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.dsp new file mode 100644 index 0000000000..43c6bfc044 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.dsp @@ -0,0 +1,138 @@ +# Microsoft Developer Studio Project File - Name="CalculatorModule" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=CalculatorModule - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CalculatorModule.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CalculatorModule.mak" CFG="CalculatorModule - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CalculatorModule - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "CalculatorModule - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CalculatorModule - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 + +!ELSEIF "$(CFG)" == "CalculatorModule - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" + +!ENDIF + +# Begin Target + +# Name "CalculatorModule - Win32 Release" +# Name "CalculatorModule - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CalculatorImpl.cpp +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Proxy.cpp +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Wrapper.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Calculator.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Proxy.h +# End Source File +# Begin Source File + +SOURCE=.\CalculatorImpl_CalculatorService_Wrapper.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;module;componentType;fragment" +# Begin Source File + +SOURCE=.\CalculatorImpl.componentType +# End Source File +# Begin Source File + +SOURCE=.\sca.module +# End Source File +# End Group +# End Target +# End Project diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.plg b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.plg new file mode 100644 index 0000000000..33016bffaf --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/CalculatorModule.plg @@ -0,0 +1,39 @@ + + +
+

Build Log

+

+--------------------Configuration: CalculatorModule - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7D.tmp" with contents +[ +/nologo /MDd /W3 /Gm /GX /ZI /I "D:\Development\tuscany\cpp\sdo/include" /I "D:\Development\tuscany\cpp\sca/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATORMODULE_EXPORTS" /Fp"Debug/CalculatorModule.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl.cpp" +"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.cpp" +"D:\Development\tuscany\cpp\sca\samples\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7D.tmp" +Creating temporary file "C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7E.tmp" with contents +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"Debug/CalculatorModule.pdb" /debug /machine:I386 /out:"Debug/CalculatorModule.dll" /implib:"Debug/CalculatorModule.lib" /pdbtype:sept /libpath:"D:\Development\tuscany\cpp\sdo/lib" /libpath:"D:\Development\tuscany\cpp\sca/lib" +.\Debug\CalculatorImpl.obj +.\Debug\CalculatorImpl_CalculatorService_Proxy.obj +.\Debug\CalculatorImpl_CalculatorService_Wrapper.obj +] +Creating command line "link.exe @C:\DOCUME~1\winadmin\LOCALS~1\Temp\RSP7E.tmp" +

Output Window

+Compiling... +CalculatorImpl.cpp +CalculatorImpl_CalculatorService_Proxy.cpp +CalculatorImpl_CalculatorService_Wrapper.cpp +Linking... + Creating library Debug/CalculatorModule.lib and object Debug/CalculatorModule.exp + + + +

Results

+CalculatorModule.dll - 0 error(s), 0 warning(s) +
+ + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/makefile b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/makefile new file mode 100644 index 0000000000..1e7f19fce8 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/makefile @@ -0,0 +1,43 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ROOT := .. + +-include $(ROOT)/makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include $(SUBDIRS:%=%/subdir.mk) +-include objects.mk +ifneq ($(strip $(DEPS)),) +-include $(DEPS) +endif + +-include $(ROOT)/makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: libCalculatorModule.so + +# Tool invocations +libCalculatorModule.so: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: GCC C++ Linker' + @echo g++ -L${SCA4CPP}/lib -shared -olibCalculatorModule.so $(OBJS) $(USER_OBJS) $(LIBS) + @g++ -L${SCA4CPP}/lib -shared -olibCalculatorModule.so $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(DEPS)$(LIBRARIES) libCalculatorModule.so + -@echo ' ' + +.PHONY: all clean dependents +.SECONDARY: + +-include $(ROOT)/makefile.targets diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/objects.mk b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/objects.mk new file mode 100644 index 0000000000..fbdb88403a --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/objects.mk @@ -0,0 +1,7 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +LIBS := -ltuscany_sca + +USER_OBJS := \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/sources.mk b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/sources.mk new file mode 100644 index 0000000000..8f0795952f --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/sources.mk @@ -0,0 +1,20 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +C_UPPER_SRCS := +CPP_SRCS := +O_SRCS := +ASM_SRCS := +S_SRCS := +CXX_SRCS := +CC_SRCS := +OBJ_SRCS := +OBJS := +DEPS := +LIBRARIES := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +. \ + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/subdir.mk b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/subdir.mk new file mode 100644 index 0000000000..dd98e3ddc6 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/Debug/subdir.mk @@ -0,0 +1,35 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(ROOT)/CalculatorImpl.cpp \ +$(ROOT)/CalculatorImpl_CalculatorService_Proxy.cpp \ +$(ROOT)/CalculatorImpl_CalculatorService_Wrapper.cpp + +OBJS += \ +./CalculatorImpl.o \ +./CalculatorImpl_CalculatorService_Proxy.o \ +./CalculatorImpl_CalculatorService_Wrapper.o + +DEPS += \ +${addprefix ./, \ +CalculatorImpl.d \ +CalculatorImpl_CalculatorService_Proxy.d \ +CalculatorImpl_CalculatorService_Wrapper.d \ +} + + +# Each subdirectory must supply rules for building sources it contributes +%.o: $(ROOT)/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< + @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ + echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ + g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module new file mode 100644 index 0000000000..c000e57411 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module.lin b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module.lin new file mode 100644 index 0000000000..2298b5910f --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorModule/sca.module.lin @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp new file mode 100644 index 0000000000..ed7ceef2a4 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/CalculatorSubsystem.dsp @@ -0,0 +1,67 @@ +# Microsoft Developer Studio Project File - Name="CalculatorSubsystem" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Generic Project" 0x010a + +CFG=CalculatorSubsystem - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CalculatorSubsystem.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CalculatorSubsystem.mak" CFG="CalculatorSubsystem - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CalculatorSubsystem - Win32 Release" (based on "Win32 (x86) Generic Project") +!MESSAGE "CalculatorSubsystem - Win32 Debug" (based on "Win32 (x86) Generic Project") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +MTL=midl.exe + +!IF "$(CFG)" == "CalculatorSubsystem - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "CalculatorSubsystem - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "CalculatorSubsystem - Win32 Release" +# Name "CalculatorSubsystem - Win32 Debug" +# Begin Source File + +SOURCE=.\sca.subsystem +# End Source File +# End Target +# End Project diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem new file mode 100644 index 0000000000..4b9fdd1511 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtbuild b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtbuild new file mode 100644 index 0000000000..68fe431c95 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtbuild @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtproject b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.cdtproject @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.project b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.project new file mode 100644 index 0000000000..20d79410f9 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.project @@ -0,0 +1,19 @@ + + + CalculatorClient + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..64ec20058b --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,6 @@ +#Tue Dec 13 10:20:35 GMT 2005 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n\n +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n\n\n +environment/project=\n\n +environment/project/cdt.managedbuild.config.gnu.exe.debug.1274891422=\n\n diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calc.cpp b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calc.cpp new file mode 100644 index 0000000000..8322532617 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calc.cpp @@ -0,0 +1,144 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#include "Calculator.h" +#include "osoa/sca/sca.h" +#include +#include + +using namespace osoa::sca; +using namespace std; + +void usage(); +bool IsNumber(const char *p); + +int main(int argc, char* argv[]) +{ + const char *operation; + float arg1 = 0; + float arg2 = 0; + + if (argc == 4) + { + operation = argv[1]; + + if (!IsNumber(argv[2])) + { + cout << "Calc.exe: Argument 1 is not a number" << endl; + usage(); + } + else + { + arg1 = atof(argv[2]); + } + + if (!IsNumber(argv[3])) + { + cout << "Calc.exe: Argument 2 is not a number" << endl; + usage(); + } + else + { + arg2 = atof(argv[3]); + } + } + else + { + usage(); + } + + try + { + + // Set the default module environment variable: / + //char *defaultModule = "SCA4CPP_DEFAULT_MODULE=SubSystem2/CalculatorServiceModule"; + //putenv(defaultModule); + + // Locate a service + ModuleContext myContext = ModuleContext::getCurrent(); + Calculator *calcService = (Calculator*) myContext.locateService("CalculatorServiceComponent"); + if (calcService == 0) + { + cout << "Calc.exe: Unable to find Calculator service" << endl; + } + else + { + try + { + float result = 0; + if (strcmp(operation, "add") == 0) + { + result = calcService->add(arg1, arg2); + cout << "Calculator: add(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "sub") == 0) + { + result = calcService->sub(arg1, arg2); + cout << "Calculator: sub(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "mul") == 0) + { + result = calcService->mul(arg1, arg2); + cout << "Calculator: mul(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + if (strcmp(operation, "div") == 0) + { + result = calcService->div(arg1, arg2); + cout << "Calculator: div(" << arg1 << "," << arg2 << ") = " << result << endl; + } + else + { + cout << "Calculator: Unrecognized operation: " << operation << endl; + } + } + catch (char* x) + { + cout << "Calc.exe: exception caught: " << x << endl; + } + } + + } + catch (ServiceRuntimeException& ex) + { + cout << ex << endl; + } + return 0; +} + +void usage() +{ + cout << "Usage: calc add|sub|mul|div arg1 arg2" << endl; + exit(1); +} + +bool IsNumber (const char *p) +{ + int len = strlen(p); + for (int i = 0; i < len; i++) + { + if (!isdigit (p[i])) + { + return false; + } + } + return true; +} diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calculator.h b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calculator.h new file mode 100644 index 0000000000..9284178d5f --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Calculator.h @@ -0,0 +1,33 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| Licensed under the Apache License, Version 2.0 (the "License"); you | +| may not use this file except in compliance with the License. You may | +| obtain a copy of the License at | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | +| implied. See the License for the specific language governing | +| permissions and limitations under the License. | ++----------------------------------------------------------------------+ +*/ + +#ifndef CALCULATOR_H +#define CALCULATOR_H +class Calculator +{ +public: + virtual float add(float arg1, float arg2) = 0; + virtual float sub(float arg1, float arg2) = 0; + virtual float mul(float arg1, float arg2) = 0; + virtual float div(float arg1, float arg2) = 0; +}; + +#endif + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.dsp b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.dsp new file mode 100644 index 0000000000..75a19ae815 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.dsp @@ -0,0 +1,108 @@ +# Microsoft Developer Studio Project File - Name="Client" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Client - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Client.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Client.mak" CFG="Client - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Client - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Client - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Client - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "Client - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "$(SDO4CPP)/include" /I "$(SCA4CPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(SDO4CPP)/lib" /libpath:"$(SCA4CPP)/lib" + +!ENDIF + +# Begin Target + +# Name "Client - Win32 Release" +# Name "Client - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Calc.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Calculator.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# End Target +# End Project diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.plg b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.plg new file mode 100644 index 0000000000..0f33cc8711 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Client.plg @@ -0,0 +1,16 @@ + + +
+

Build Log

+

+--------------------Configuration: Client - Win32 Debug-------------------- +

+

Command Lines

+ + + +

Results

+Client.exe - 0 error(s), 0 warning(s) +
+ + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/makefile b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/makefile new file mode 100644 index 0000000000..4fed2ace08 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/makefile @@ -0,0 +1,43 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ROOT := .. + +-include $(ROOT)/makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include $(SUBDIRS:%=%/subdir.mk) +-include objects.mk +ifneq ($(strip $(DEPS)),) +-include $(DEPS) +endif + +-include $(ROOT)/makefile.defs + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: CalculatorClient + +# Tool invocations +CalculatorClient: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: GCC C++ Linker' + @echo g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) + @g++ -L${SCA4CPP}/lib -L${SDO4CPP}/lib -L${AXISCPP_DEPLOY}/lib -oCalculatorClient $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) $(OBJS)$(DEPS)$(EXECUTABLES) CalculatorClient + -@echo ' ' + +.PHONY: all clean dependents +.SECONDARY: + +-include $(ROOT)/makefile.targets diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/objects.mk b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/objects.mk new file mode 100644 index 0000000000..a6aa648eba --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/objects.mk @@ -0,0 +1,7 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +LIBS := -ltuscany_sca -ltuscany_sdo -lxml2 -laxis_clientC -laxis_client + +USER_OBJS := \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/sources.mk b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/sources.mk new file mode 100644 index 0000000000..3c384d3f72 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/sources.mk @@ -0,0 +1,20 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +C_UPPER_SRCS := +CPP_SRCS := +O_SRCS := +ASM_SRCS := +S_SRCS := +CXX_SRCS := +CC_SRCS := +OBJ_SRCS := +OBJS := +DEPS := +EXECUTABLES := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +. \ + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/subdir.mk b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/subdir.mk new file mode 100644 index 0000000000..3328b2862f --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/Debug/subdir.mk @@ -0,0 +1,29 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +$(ROOT)/Calc.cpp + +OBJS += \ +./Calc.o + +DEPS += \ +${addprefix ./, \ +Calc.d \ +} + + +# Each subdirectory must supply rules for building sources it contributes +%.o: $(ROOT)/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + @echo g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< + @g++ -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ + echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ + g++ -MM -MG -P -w -D_DEBUG -I${SCA4CPP}/include -I${SDO4CPP}/include -I${SCA4CPP_HOME}/samples/Calculator/CalculatorModule -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/readme.txt b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/readme.txt new file mode 100644 index 0000000000..615f1533b1 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/readme.txt @@ -0,0 +1,53 @@ +Tuscany SCA for C++ Samples - Calculator Sample +=============================================== + +This is a very simple sample to show how an SCA module with a single component +can be built and called from an executable. + +There are three sub projects in this workspace: + - CalculatorModule + This contains the source code and SCA artifacts for the SCA module. This + is the module that will be deployed into the SCA runtime. + - CalculatorSubsystem + This contains the sca.subsystem file which describes a subsystem to the + SCA runtime. + - Client + An example client which will call the service exposed by the single component + in the CalculatorModule. + + +Build instructions +------------------ + +1) Build the SCA module. + - Set CalculatorModule project as the active project. + Right click->Set as active project + + - Run the SCA generation tool to create the proxy and wrapper classes. + Either Tools->SCA Gen if you have added SCA Gen as an external tool + Or run from the command line: + scagen -dir -output + where the projectDirectory is the directory with the sca.module file. + + - Rebuild All + Build->Rebuild All + +2) Package and deploy the SCA module + - There is a script file in the sca/samples/Calculator directory which will + copy across all the files needed for deployment to the Tuscany runtime. + On a command line run pack_deploy.cmd + As a default, the sample will be copied to sca/samples/runtime directory + Both the SCA module and the subsystem will be copied. + +3) Build the client + - Set the Client project as the active project. + Right click->Set as active project + + - Rebuild All + Build->Rebuild All + +4) Run the client + - Use the command file in the sca/samples/Calculator/Client directory to run the + client. This command file will set the SCA environment variables before running + the client. For example, + runclient add 4 9 diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/Client/runclient.cmd b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/runclient.cmd new file mode 100644 index 0000000000..8aa6f24f65 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/Client/runclient.cmd @@ -0,0 +1,14 @@ +@echo off +rem Runs the client after setting the SCA environment variables to use the +rem CalculatorSubsystem +setlocal +set SCA4CPP_SYSTEM_ROOT=%~d0%~p0\..\..\runtime + +rem Only need to specify the subsystem (and not the moduleComponent as well) because +rem there is only one moduleComponent in the subsystem - it is a very simple sample. +set SCA4CPP_DEFAULT_MODULE=CalculatorSubsystem + +rem Run the client +%~d0%~p0\debug\Client.exe %* + +endlocal \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/build.sh b/tags/cpp-stable-20060304/sca/samples/Calculator/build.sh new file mode 100755 index 0000000000..3e2dbcb0bc --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/build.sh @@ -0,0 +1,75 @@ +#!/bin/sh + +# Copyright 2005 The Apache Software Foundation or its licensors, as applicable. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +APFULLDIR=`pwd` + +export SCA4CPP_HOME="$APFULLDIR/../../" + +if [ x$SCA4CPP = x ]; then +export SCA4CPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$SDO4CPP = x ]; then +echo "SDO4CPP not set" +export SDO4CPP=$SCA4CPP_HOME/../sdo +fi +echo "Using SDO installed at $SDO4CPP" + +TEST_ROOT=$APFULLDIR + +cd $SCA4CPP/bin +./scagen.sh -dir $TEST_ROOT/CalculatorModule -output $TEST_ROOT/CalculatorModule +cd $TEST_ROOT/CalculatorModule/Debug +make clean +make + +cd $TEST_ROOT/Client/Debug +make clean +make + +TEST_SYSTEM=$TEST_ROOT/../runtime + +mkdir -p $TEST_SYSTEM/modules/CalculatorModule +mkdir -p $TEST_SYSTEM/subsystems/CalculatorSubsystem + +cp $TEST_ROOT/CalculatorModule/sca.module.lin $TEST_SYSTEM/modules/CalculatorModule/sca.module +cp $TEST_ROOT/CalculatorModule/*.componentType $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorModule/Calculator.h $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorModule/CalculatorImpl.h $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorModule/Debug/libCalculatorModule.so $TEST_SYSTEM/modules/CalculatorModule +cp $TEST_ROOT/CalculatorSubsystem/sca.subsystem $TEST_SYSTEM/subsystems/CalculatorSubsystem + +export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP=$SCA4CPP +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM +export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem + +cd $TEST_ROOT/Client +Debug/CalculatorClient add 4 9 diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/pack_deploy.cmd b/tags/cpp-stable-20060304/sca/samples/Calculator/pack_deploy.cmd new file mode 100644 index 0000000000..eed6af8411 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/pack_deploy.cmd @@ -0,0 +1,27 @@ +@echo off +rem Will copy the correct files from the source tree for packaging and deployment of the +rem SCA sample. +setlocal +set sourcePath=%~d0%~p0 +if . == %1. ( +set destinationPath=%sourcePath%..\runtime +) ELSE ( +set destinationPath=%1 +) + +mkdir %destinationPath%\modules +mkdir %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule +copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule + +copy %sourcePath%\CalculatorModule\debug\CalculatorModule.dll %destinationPath%\modules\CalculatorModule + + +mkdir %destinationPath%\subsystems +mkdir %destinationPath%\subsystems\CalculatorSubsystem +copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem + + +endlocal \ No newline at end of file diff --git a/tags/cpp-stable-20060304/sca/samples/Calculator/runclient.sh b/tags/cpp-stable-20060304/sca/samples/Calculator/runclient.sh new file mode 100755 index 0000000000..b16ec76414 --- /dev/null +++ b/tags/cpp-stable-20060304/sca/samples/Calculator/runclient.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# Copyright 2005 The Apache Software Foundation or its licensors, as applicable. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +APFULLDIR=`pwd` +export SCA4CPP_HOME="$APFULLDIR/../../" + +if [ x$SCA4CPP = x ]; then +export SCA4CPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$SDO4CPP = x ]; then +echo "SDO4CPP not set" +export SDO4CPP=$SCA4CPP_HOME/../sdo +fi +echo "Using SDO installed at $SDO4CPP" + +TEST_ROOT=$APFULLDIR +TEST_SYSTEM=$TEST_ROOT/../runtime + +export LD_LIBRARY_PATH=$SCA4CPP/lib:$SDO4CPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP=$SCA4CPP +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM +export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem + +cd $TEST_ROOT/Client +Debug/CalculatorClient add 4 9 -- cgit v1.2.3