Commit 2f4d3338 authored by legoc's avatar legoc

Adapted C++ to gcc 6.3 and versions

parent c608ee95
......@@ -11,12 +11,12 @@
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>cameo-server</artifactId>
<version>0.1.5-SNAPSHOT</version>
<version>0.1.5</version>
</dependency>
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>cameo-api</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.4</version>
</dependency>
</dependencies>
......
......@@ -11,12 +11,12 @@
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>cameo-server-jzmq</artifactId>
<version>0.1.5-SNAPSHOT</version>
<version>0.1.5</version>
</dependency>
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>cameo-api</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.4</version>
<exclusions>
<exclusion>
<groupId>fr.ill.ics</groupId>
......
......@@ -42,7 +42,7 @@
<dependency>
<groupId>fr.ill.ics</groupId>
<artifactId>cameo-api</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.4</version>
</dependency>
</dependencies>
</profile>
......
......@@ -34,14 +34,14 @@ void cancelAll() {
application::This::cancelWaitings();
}
void cancelInstance(shared_ptr<application::Instance> instance) {
void cancelInstance(boost::shared_ptr<application::Instance> instance) {
boost::this_thread::sleep(boost::posix_time::seconds(1));
instance->cancelWaitFor();
}
void cancelPublisher(shared_ptr<application::Publisher> publisher) {
void cancelPublisher(boost::shared_ptr<application::Publisher> publisher) {
boost::this_thread::sleep(boost::posix_time::seconds(1));
......@@ -49,7 +49,7 @@ void cancelPublisher(shared_ptr<application::Publisher> publisher) {
}
void killInstance(shared_ptr<application::Instance> instance) {
void killInstance(boost::shared_ptr<application::Instance> instance) {
boost::this_thread::sleep(boost::posix_time::seconds(1));
......@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) {
cout << "starting stopcpp for cancelWaitFor" << endl;
// Use a shared_ptr to use it in the thread and the main thread.
shared_ptr<application::Instance> stopApplication(server.start("stopcpp"));
boost::shared_ptr<application::Instance> stopApplication(server.start("stopcpp"));
// Start thread
auto_ptr<thread> cancelThread(new thread(bind(&cancelInstance, stopApplication)));
......@@ -112,7 +112,7 @@ int main(int argc, char *argv[]) {
cout << "creating publisher and waiting for 1 subscriber..." << endl;
// Use a shared_ptr to use it in the thread and the main thread.
shared_ptr<application::Publisher> publisher(application::Publisher::create("publisher", 1));
boost::shared_ptr<application::Publisher> publisher(application::Publisher::create("publisher", 1));
// Start thread
auto_ptr<thread> cancelThread(new thread(bind(&cancelPublisher, publisher)));
......@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) {
cout << "starting publoopcpp for killing" << endl;
// Use a shared_ptr to use it in the thread and the main thread.
shared_ptr<application::Instance> pubLoopApplication(server.start("publoopcpp"));
boost::shared_ptr<application::Instance> pubLoopApplication(server.start("publoopcpp"));
// Start thread
auto_ptr<thread> killThread(new thread(bind(&killInstance, pubLoopApplication)));
......@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) {
cout << "starting publoopcpp for testing cancel of a subscriber" << endl;
// Use a shared_ptr to use it in the thread and the main thread.
shared_ptr<application::Instance> pubLoopApplication(server.start("publoopcpp"));
boost::shared_ptr<application::Instance> pubLoopApplication(server.start("publoopcpp"));
// Create a subscriber
auto_ptr<application::Subscriber> subscriber = application::Subscriber::create(*pubLoopApplication, "publisher");
......
......@@ -33,9 +33,9 @@ struct StopData {
struct Handler {
shared_ptr<StopData> data;
boost::shared_ptr<StopData> data;
Handler(shared_ptr<StopData> sharedData) : data(sharedData) {}
Handler(boost::shared_ptr<StopData> sharedData) : data(sharedData) {}
void operator()(bool available) {
if (available) {
......@@ -57,7 +57,7 @@ int main(int argc, char *argv[]) {
Server server("tcp://localhost:9000");
server.setTimeout(1000);
shared_ptr<StopData> data(new StopData());
boost::shared_ptr<StopData> data(new StopData());
auto_ptr<ConnectionChecker> ConnectionChecker = server.createConnectionChecker(Handler(data), 1000);
while (!data->stop) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment