diff options
Diffstat (limited to '')
14 files changed, 557 insertions, 0 deletions
diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild b/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild new file mode 100644 index 0000000000..68fe431c95 --- /dev/null +++ b/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtbuild @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 3.0.0?>
+
+<ManagedProjectBuildInfo>
+<project id="CalculatorClient.cdt.managedbuild.target.gnu.exe.1306251652" name="Executable (Gnu)" projectType="cdt.managedbuild.target.gnu.exe">
+<configuration artifactName="CalculatorClient" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.1274891422" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.336913789" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.787936814" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1771987671" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.2054136150" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="_DEBUG"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.1915103015" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP}/include"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/samples/Calculator/CalculatorModule"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.891767770" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.725133584" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+<option id="gnu.cpp.link.option.libs.1823730610" superClass="gnu.cpp.link.option.libs" valueType="libs">
+<listOptionValue builtIn="false" value="tuscany_sca"/>
+<listOptionValue builtIn="false" value="tuscany_sdo"/>
+<listOptionValue builtIn="false" value="xml2"/>
+<listOptionValue builtIn="false" value="axis_clientC"/>
+<listOptionValue builtIn="false" value="axis_client"/>
+</option>
+<option id="gnu.cpp.link.option.paths.2134416340" superClass="gnu.cpp.link.option.paths" valueType="stringList">
+<listOptionValue builtIn="false" value="${SCA4CPP}/lib"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/lib"/>
+<listOptionValue builtIn="false" value="${AXISCPP_DEPLOY}/lib"/>
+</option>
+<option id="gnu.cpp.link.option.shared.1172886600" superClass="gnu.cpp.link.option.shared" value="false" valueType="boolean"/>
+</tool>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1196223857" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug"/>
+<macros/>
+</toolChain>
+</configuration>
+<configuration artifactName="CalculatorClient" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1644385997" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.362092695" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1629456018" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.666893586" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1162480959" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.538369525" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.681891599" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release"/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject b/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject new file mode 100644 index 0000000000..48a12e6664 --- /dev/null +++ b/tags/cpp-sca-20060405/samples/Calculator/Client/.cdtproject @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse-cdt version="2.0"?>
+
+<cdtproject id="org.eclipse.cdt.managedbuilder.core.managedMake">
+<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
+<data>
+<item id="org.eclipse.cdt.core.pathentry">
+<pathentry kind="src" path=""/>
+<pathentry kind="out" path=""/>
+<pathentry kind="con" path="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
+</item>
+</data>
+</cdtproject>
diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.project b/tags/cpp-sca-20060405/samples/Calculator/Client/.project new file mode 100644 index 0000000000..20d79410f9 --- /dev/null +++ b/tags/cpp-sca-20060405/samples/Calculator/Client/.project @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>CalculatorClient</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.core.cnature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.core.ccnature</nature> + </natures> +</projectDescription> diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/tags/cpp-sca-20060405/samples/Calculator/Client/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000000..64ec20058b --- /dev/null +++ b/tags/cpp-sca-20060405/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=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1274891422=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/project=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.exe.debug.1274891422=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp b/tags/cpp-sca-20060405/samples/Calculator/Client/Calc.cpp new file mode 100644 index 0000000000..8322532617 --- /dev/null +++ b/tags/cpp-sca-20060405/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 <iostream> +#include <stdlib.h> + +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: <subsystem>/<moduleName> + //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-sca-20060405/samples/Calculator/Client/Calculator.h b/tags/cpp-sca-20060405/samples/Calculator/Client/Calculator.h new file mode 100644 index 0000000000..9284178d5f --- /dev/null +++ b/tags/cpp-sca-20060405/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-sca-20060405/samples/Calculator/Client/Client.dsp b/tags/cpp-sca-20060405/samples/Calculator/Client/Client.dsp new file mode 100644 index 0000000000..75a19ae815 --- /dev/null +++ b/tags/cpp-sca-20060405/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-sca-20060405/samples/Calculator/Client/Client.plg b/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg new file mode 100644 index 0000000000..0f33cc8711 --- /dev/null +++ b/tags/cpp-sca-20060405/samples/Calculator/Client/Client.plg @@ -0,0 +1,16 @@ +<html>
+<body>
+<pre>
+<h1>Build Log</h1>
+<h3>
+--------------------Configuration: Client - Win32 Debug--------------------
+</h3>
+<h3>Command Lines</h3>
+
+
+
+<h3>Results</h3>
+Client.exe - 0 error(s), 0 warning(s)
+</pre>
+</body>
+</html>
diff --git a/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/makefile new file mode 100644 index 0000000000..4fed2ace08 --- /dev/null +++ b/tags/cpp-sca-20060405/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-sca-20060405/samples/Calculator/Client/Debug/objects.mk b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/objects.mk new file mode 100644 index 0000000000..a6aa648eba --- /dev/null +++ b/tags/cpp-sca-20060405/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-sca-20060405/samples/Calculator/Client/Debug/sources.mk b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/sources.mk new file mode 100644 index 0000000000..3c384d3f72 --- /dev/null +++ b/tags/cpp-sca-20060405/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-sca-20060405/samples/Calculator/Client/Debug/subdir.mk b/tags/cpp-sca-20060405/samples/Calculator/Client/Debug/subdir.mk new file mode 100644 index 0000000000..3328b2862f --- /dev/null +++ b/tags/cpp-sca-20060405/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-sca-20060405/samples/Calculator/Client/readme.txt b/tags/cpp-sca-20060405/samples/Calculator/Client/readme.txt new file mode 100644 index 0000000000..615f1533b1 --- /dev/null +++ b/tags/cpp-sca-20060405/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 <projectDirectory> -output <projectDirectory> + 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-sca-20060405/samples/Calculator/Client/runclient.cmd b/tags/cpp-sca-20060405/samples/Calculator/Client/runclient.cmd new file mode 100644 index 0000000000..8aa6f24f65 --- /dev/null +++ b/tags/cpp-sca-20060405/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 |