Commit e98697d0 authored by yannick legoc's avatar yannick legoc

Replaced auto_ptr by unique_ptr

parent 6d059e8b
......@@ -159,14 +159,14 @@ private:
CommandLauncher * _commandLauncher;
CompletionHandlerDirectImpl* _completionHandler;
std::auto_ptr<SessionResponder> m_sessionResponder;
std::auto_ptr<DatabaseResponder> m_databaseResponder;
std::auto_ptr<ServantManagerResponder> m_servantManagerResponder;
std::auto_ptr<CommandLineResponder> m_commandLineResponder;
std::auto_ptr<ConditionManagerResponder> m_conditionManagerResponder;
std::auto_ptr<CommandZoneResponder> m_commandBoxResponder;
std::auto_ptr<CommandZoneEventPublisher> m_commandZoneEventPublisher;
std::auto_ptr<UserVariableManagerResponder> m_variableManagerResponder;
std::unique_ptr<SessionResponder> m_sessionResponder;
std::unique_ptr<DatabaseResponder> m_databaseResponder;
std::unique_ptr<ServantManagerResponder> m_servantManagerResponder;
std::unique_ptr<CommandLineResponder> m_commandLineResponder;
std::unique_ptr<ConditionManagerResponder> m_conditionManagerResponder;
std::unique_ptr<CommandZoneResponder> m_commandBoxResponder;
std::unique_ptr<CommandZoneEventPublisher> m_commandZoneEventPublisher;
std::unique_ptr<UserVariableManagerResponder> m_variableManagerResponder;
LogAccessor* _logAccessor;
SurveyAccessor* _surveyAccessor;
......
......@@ -370,7 +370,7 @@ void ConditionManagerResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -69,8 +69,8 @@ private:
void processGetConditionState(const std::string & message, std::string & response);
void processGetConditionsXMLContent(const std::string & message, std::string & response);
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (ConditionManagerResponder:: *ProcessFunctionType)(const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
......
......@@ -531,7 +531,7 @@ void DatabaseResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -97,8 +97,8 @@ private:
dataprovider::PropertyAccessorDirectImpl* m_propertyAccessor;
dataprovider::CommandAccessorDirectImpl* m_commandAccessor;
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (DatabaseResponder:: *ProcessFunctionType)(const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
......
......@@ -516,7 +516,7 @@ void ServantManagerResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -97,8 +97,8 @@ private:
dataprovider::ServantAccessorDirectImpl* m_servantAccessor;
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (ServantManagerResponder:: *ProcessFunctionType)(const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
......
......@@ -114,7 +114,7 @@ void SessionResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -57,14 +57,14 @@ private:
void processLogin(cameo::application::Request * request, const std::string & message, std::string & response);
void setNonStandAloneApplication(cameo::application::Request * request);
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (SessionResponder:: *ProcessFunctionType)(cameo::application::Request *, const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
std::auto_ptr<cameo::Server> m_nonStandAloneApplicationServer;
std::auto_ptr<cameo::application::Instance> m_nonStandAloneApplication;
std::unique_ptr<cameo::Server> m_nonStandAloneApplicationServer;
std::unique_ptr<cameo::application::Instance> m_nonStandAloneApplication;
};
}
......
......@@ -226,7 +226,7 @@ void UserVariableManagerResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -62,8 +62,8 @@ private:
void processGetVariablesXMLContent(const std::string & message, std::string & response);
void processGetUsableVariableListValue(const std::string & message, std::string & response);
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (UserVariableManagerResponder:: *ProcessFunctionType)(const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
......
......@@ -166,7 +166,7 @@ void CommandLineResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -66,8 +66,8 @@ private:
void processGetParserType(const std::string & message, std::string & response);
void processSimulateCommand(const std::string & message, std::string & response);
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (CommandLineResponder:: *ProcessFunctionType)(const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
......
......@@ -88,7 +88,7 @@ private:
boost::recursive_mutex _mutex;
std::auto_ptr<cameo::application::Publisher> m_publisher;
std::unique_ptr<cameo::application::Publisher> m_publisher;
};
}
......
......@@ -2752,7 +2752,7 @@ void CommandZoneResponder::loop() {
// Loop until cancel is done.
while (true) {
// Wait for a new request.
auto_ptr<application::Request> request = m_responder->receive();
unique_ptr<application::Request> request = m_responder->receive();
// Stop the loop if cancel is called.
if (request.get() == 0) {
......
......@@ -173,8 +173,8 @@ private:
void processGetVariableList(const std::string & message, std::string & response);
std::auto_ptr<boost::thread> m_thread;
std::auto_ptr<cameo::application::Responder> m_responder;
std::unique_ptr<boost::thread> m_thread;
std::unique_ptr<cameo::application::Responder> m_responder;
typedef void (CommandZoneResponder:: *ProcessFunctionType)(const std::string &, std::string &);
std::map<int, ProcessFunctionType> m_processFunctions;
......
......@@ -108,7 +108,7 @@ private:
boost::mutex _mutex;
// Publisher for the client classes.
std::auto_ptr<cameo::application::Publisher> m_publisher;
std::unique_ptr<cameo::application::Publisher> m_publisher;
};
......
......@@ -57,7 +57,7 @@ public:
void notifyLogImageDataReady(const std::string& imageName);
private:
std::auto_ptr<cameo::application::Publisher> m_publisher;
std::unique_ptr<cameo::application::Publisher> m_publisher;
};
}
......
......@@ -47,7 +47,7 @@ public:
void notifySurveyXML(const std::string& message);
private:
std::auto_ptr<cameo::application::Publisher> m_publisher;
std::unique_ptr<cameo::application::Publisher> m_publisher;
};
}
......
......@@ -71,7 +71,7 @@ void SimulatedConfigurationManager::init() {
// Connect to the running Nomad server.
string nomadAppNames[] = {"ns", "nsd", "nsg", "nsv"};
std::auto_ptr<application::Instance> nomad;
std::unique_ptr<application::Instance> nomad;
for (int i = 0; i < 4; ++i) {
// Connect to the server.
......
......@@ -65,7 +65,7 @@ private:
void loadExperimentControllers();
void loadTestControllers();
std::auto_ptr<cameo::application::Requester> m_servantManagerRequester;
std::unique_ptr<cameo::application::Requester> m_servantManagerRequester;
static SimulatedConfigurationManager* m_instance;
};
......
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