Reverting type resolution in C++ to Java types, e.g. byte and char instead of just...
[iot2.git] / iotjava / iotrmi / C++ / basics / TestClass_Stub.cpp
1 #include <iostream>
2 #include <string>
3 #include "TestClassComplete_Stub.hpp"
4
5 using namespace std;
6
7 int main(int argc, char *argv[])
8 {
9
10         int port = 5010;
11         const char* address = "localhost";
12         //const char* address = "128.195.136.170";      // dc-9.calit2.uci.edu
13         int rev = 0;
14         bool bResult = false;
15         vector<int> ports;
16         ports.push_back(12345);
17
18         TestClassComplete *tcStub = new TestClassComplete_Stub(port, address, rev, &bResult, ports);
19         cout << "Return value: " << tcStub->getByte(68) << endl;
20         cout << "Return value: " << tcStub->getShort(1234) << endl;
21         //cout << "Return value: " << tcStub->getLong(12345678) << endl;
22         cout << "Return value: " << tcStub->getFloat(12.345) << endl;
23         cout << "Return value: " << tcStub->getDouble(12345.678) << endl;
24         cout << "Return value: " << tcStub->getBoolean(true) << endl;
25         cout << "Return value: " << tcStub->getChar('c') << endl;
26
27         cout << "Return value: " << tcStub->getA() << endl;
28         cout << "Return value: " << tcStub->setAndGetA(123) << endl;
29         cout << "Return value: " << tcStub->setACAndGetA("string", 123) << endl;
30         vector<string> input;
31         input.push_back("123");
32         input.push_back("456");
33         input.push_back("987");
34
35         cout << "Return value: " << tcStub->sumArray(input) << endl;
36         
37         return 0;
38 }