[Swift-commit] cog r3972

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jun 25 11:15:04 CDT 2014


------------------------------------------------------------------------
r3972 | timgarmstrong | 2014-06-25 11:10:35 -0500 (Wed, 25 Jun 2014) | 1 line

Put all C++ classes into Coaster namespace.
------------------------------------------------------------------------
Index: modules/provider-coaster-c-client/src/CoasterChannel.h
===================================================================
--- modules/provider-coaster-c-client/src/CoasterChannel.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterChannel.h	(working copy)
@@ -30,13 +30,14 @@
 #include "Logger.h"
 #include "RemoteCoasterException.h"
 
+namespace Coaster {
+
 class Command;
 class Handler;
 class CoasterLoop;
 class CoasterClient;
 class HandlerFactory;
 
-
 class DataChunk {
 	private:
 		/* Disable default copy constructor */
@@ -125,4 +126,6 @@
 	return os;
 }
 
+}
+
 #endif /* COASTER_CHANNEL_H_ */
Index: modules/provider-coaster-c-client/src/CoasterSWIG.h
===================================================================
--- modules/provider-coaster-c-client/src/CoasterSWIG.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterSWIG.h	(working copy)
@@ -12,6 +12,8 @@
 %}
 #endif
 
+namespace Coaster {
+
 CoasterLoop* CoasterSWIGLoopCreate(void);
 int CoasterSWIGLoopDestroy(CoasterLoop* loop);
 
@@ -35,3 +37,4 @@
 //int CoasterSWIGTest(CoasterLoop *loop, char *service_URL);
 //int CoasterSWIGTest(CoasterClient *client);
 
+}
Index: modules/provider-coaster-c-client/src/CoasterLoop.h
===================================================================
--- modules/provider-coaster-c-client/src/CoasterLoop.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterLoop.h	(working copy)
@@ -19,8 +19,7 @@
 #include <ctime>
 #include <stdio.h>
 
-// 1 minute
-#define HEARTBEAT_CHECK_INTERVAL 60
+namespace Coaster {
 
 class CoasterLoop {
 	private:
@@ -77,4 +76,5 @@
 		void checkHeartbeats();
 };
 
+}
 #endif /* COASTER_LOOP_H_ */
Index: modules/provider-coaster-c-client/src/ChannelConfigurationCommand.cpp
===================================================================
--- modules/provider-coaster-c-client/src/ChannelConfigurationCommand.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/ChannelConfigurationCommand.cpp	(working copy)
@@ -2,6 +2,8 @@
 #include <sstream>
 #include "Logger.h"
 
+using namespace Coaster;
+
 using std::string;
 using std::stringstream;
 
Index: modules/provider-coaster-c-client/src/CoasterClient.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterClient.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterClient.cpp	(working copy)
@@ -23,6 +23,8 @@
 
 #include "Logger.h"
 
+using namespace Coaster;
+
 using std::list;
 using std::map;
 using std::string;
Index: modules/provider-coaster-c-client/src/CoasterClientTest.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterClientTest.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterClientTest.cpp	(working copy)
@@ -7,6 +7,8 @@
 #include "Job.h"
 #include "Settings.h"
 
+using namespace Coaster;
+
 using std::cerr;
 using std::cout;
 using std::exception;
Index: modules/provider-coaster-c-client/src/ConditionVariable.h
===================================================================
--- modules/provider-coaster-c-client/src/ConditionVariable.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/ConditionVariable.h	(working copy)
@@ -11,6 +11,8 @@
 #include <pthread.h>
 #include "Lock.h"
 
+namespace Coaster {
+
 class ConditionVariable {
 	private:
 		pthread_cond_t cv;
@@ -27,4 +29,6 @@
 		void broadcast();
 };
 
+}
+
 #endif /* CONDITIONVARIABLE_H_ */
Index: modules/provider-coaster-c-client/src/CmdCBCV.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CmdCBCV.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CmdCBCV.cpp	(working copy)
@@ -7,6 +7,8 @@
 
 #include "CmdCBCV.h"
 
+using namespace Coaster;
+
 using std::string;
 
 CmdCBCV::CmdCBCV() {
Index: modules/provider-coaster-c-client/src/HeartBeatCommand.h
===================================================================
--- modules/provider-coaster-c-client/src/HeartBeatCommand.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/HeartBeatCommand.h	(working copy)
@@ -12,6 +12,8 @@
 #include <sys/time.h>
 #include <string>
 
+namespace Coaster {
+
 class HeartBeatCommand: public Command {
 	private:
 		long sendtime;
@@ -24,4 +26,6 @@
 		virtual void replyReceived();
 };
 
+}
+
 #endif /* HEARTBEATCOMMAND_H_ */
Index: modules/provider-coaster-c-client/src/ClientHandlerFactory.cpp
===================================================================
--- modules/provider-coaster-c-client/src/ClientHandlerFactory.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/ClientHandlerFactory.cpp	(working copy)
@@ -8,6 +8,8 @@
 #include "ClientHandlerFactory.h"
 #include "JobStatusHandler.h"
 
+using namespace Coaster;
+
 ClientHandlerFactory::ClientHandlerFactory() {
 	addHandler<JobStatusHandler>("JOBSTATUS");
 }
Index: modules/provider-coaster-c-client/src/RequestReply.cpp
===================================================================
--- modules/provider-coaster-c-client/src/RequestReply.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/RequestReply.cpp	(working copy)
@@ -8,6 +8,8 @@
 #include "RequestReply.h"
 #include "CoasterError.h"
 
+using namespace Coaster;
+
 #include <sstream>
 
 using std::list;
Index: modules/provider-coaster-c-client/src/Settings.h
===================================================================
--- modules/provider-coaster-c-client/src/Settings.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Settings.h	(working copy)
@@ -11,6 +11,8 @@
 #include <string>
 #include <map>
 
+namespace Coaster {
+
 class Settings {
 	private:
 		/*
@@ -79,4 +81,5 @@
 	return os;
 }
 
+}
 #endif /* SETTINGS_H_ */
Index: modules/provider-coaster-c-client/src/HandlerFactory.h
===================================================================
--- modules/provider-coaster-c-client/src/HandlerFactory.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/HandlerFactory.h	(working copy)
@@ -12,6 +12,8 @@
 #include <string>
 #include "Handler.h"
 
+namespace Coaster {
+
 class Handler;
 
 class HandlerFactory {
@@ -31,5 +33,6 @@
 	creators[name] = &newHandler<T>;
 }
 
+}
 
 #endif /* HANDLERFACTORY_H_ */
Index: modules/provider-coaster-c-client/src/Buffer.h
===================================================================
--- modules/provider-coaster-c-client/src/Buffer.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Buffer.h	(working copy)
@@ -12,6 +12,8 @@
 #include <ostream>
 #include <stdexcept>
 
+namespace Coaster {
+
 /*
  * TODO: need documentation on behavior of buffers w.r.t memory lifespan.
  */
@@ -73,4 +75,6 @@
 		virtual char* getModifiableData();
 };
 
+}
+
 #endif /* BUFFER_H_ */
Index: modules/provider-coaster-c-client/src/JobStatus.cpp
===================================================================
--- modules/provider-coaster-c-client/src/JobStatus.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/JobStatus.cpp	(working copy)
@@ -9,6 +9,8 @@
 #include <time.h>
 #include "JobStatus.h"
 
+using namespace Coaster;
+
 using std::string;
 
 void JobStatus::init(JobStatusCode statusCode, time_t time, const string* message, RemoteCoasterException* exception) {
@@ -82,7 +84,7 @@
 	}
 }
 
-const char* statusCodeToStr(JobStatusCode code) {
+const char* Coaster::statusCodeToStr(JobStatusCode code) {
 	switch (code) {
 		case UNSUBMITTED: return "UNSUBMITTED";
 		case SUBMITTING: return "SUBMITTING";
Index: modules/provider-coaster-c-client/src/Logger.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Logger.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Logger.cpp	(working copy)
@@ -10,6 +10,8 @@
 #include <sys/time.h>
 #include <time.h>
 
+using namespace Coaster;
+
 using std::cout;
 using std::ostream;
 using std::string;
@@ -167,7 +169,7 @@
 	}
 }
 
-Logger& endl(Logger& l) {
+Logger& Coaster::endl(Logger& l) {
 	l.endItem();
 	return l;
 }
Index: modules/provider-coaster-c-client/src/Job.h
===================================================================
--- modules/provider-coaster-c-client/src/Job.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Job.h	(working copy)
@@ -16,6 +16,8 @@
 #include <vector>
 #include <map>
 
+namespace Coaster {
+
 /*
   Job represents a single Job that is to be submitted to coasters.
   The Job object is created and has its parameters set before submission.
@@ -135,4 +137,6 @@
 		const std::string* getStderr() const;
 };
 
+}
+
 #endif /* JOB_DESCRIPTION_H_ */
Index: modules/provider-coaster-c-client/src/CoasterError.h
===================================================================
--- modules/provider-coaster-c-client/src/CoasterError.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterError.h	(working copy)
@@ -13,7 +13,7 @@
 #include <stdio.h>
 #include <sstream>
 
-#define MAX_MSG_LEN 256
+namespace Coaster {
 
 class CoasterError: public std::exception {
 	private:
@@ -26,4 +26,6 @@
 		virtual const char* what() const throw();
 };
 
+}
+
 #endif /* COASTERERROR_H_ */
Index: modules/provider-coaster-c-client/src/RunCoasterJob.cpp
===================================================================
--- modules/provider-coaster-c-client/src/RunCoasterJob.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/RunCoasterJob.cpp	(working copy)
@@ -11,6 +11,8 @@
 #include "Settings.h"
 #include "Logger.h"
 
+using namespace Coaster;
+
 using std::cerr;
 using std::cout;
 using std::exception;
Index: modules/provider-coaster-c-client/src/JobStatusHandler.h
===================================================================
--- modules/provider-coaster-c-client/src/JobStatusHandler.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/JobStatusHandler.h	(working copy)
@@ -11,6 +11,8 @@
 #include "Handler.h"
 #include "JobStatus.h"
 
+namespace Coaster {
+
 class JobStatusHandler: public Handler {
 	public:
 		JobStatusHandler();
@@ -18,4 +20,6 @@
 		virtual void requestReceived();
 };
 
+}
+
 #endif /* JOBSTATUSHANDLER_H_ */
Index: modules/provider-coaster-c-client/src/Handler.h
===================================================================
--- modules/provider-coaster-c-client/src/Handler.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Handler.h	(working copy)
@@ -11,6 +11,8 @@
 #include "CoasterChannel.h"
 #include "RequestReply.h"
 
+namespace Coaster {
+
 class CoasterChannel;
 
 class Handler: public RequestReply {
@@ -29,4 +31,6 @@
 		virtual void dataSent(Buffer* buf);
 };
 
+}
+
 #endif /* HANDLER_H_ */
Index: modules/provider-coaster-c-client/src/coasters.cpp
===================================================================
--- modules/provider-coaster-c-client/src/coasters.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/coasters.cpp	(working copy)
@@ -30,7 +30,10 @@
 #include "CoasterClient.h"
 #include "CoasterError.h"
 #include "CoasterLoop.h"
+#include "Settings.h"
 
+using namespace Coaster;
+
 using std::malloc;
 using std::free;
 
Index: modules/provider-coaster-c-client/src/Command.h
===================================================================
--- modules/provider-coaster-c-client/src/Command.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Command.h	(working copy)
@@ -17,6 +17,8 @@
 #include "CommandCallback.h"
 #include "RemoteCoasterException.h"
 
+namespace Coaster {
+
 class CoasterChannel;
 class CommandCallback;
 
@@ -55,4 +57,6 @@
 	return os;
 }
 
+}
+
 #endif /* COMMAND_H_ */
Index: modules/provider-coaster-c-client/src/ChannelCallback.cpp
===================================================================
--- modules/provider-coaster-c-client/src/ChannelCallback.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/ChannelCallback.cpp	(working copy)
@@ -7,6 +7,8 @@
 
 #include "ChannelCallback.h"
 
+using namespace Coaster;
+
 ChannelCallback::ChannelCallback() {
 }
 
Index: modules/provider-coaster-c-client/src/Lock.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Lock.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Lock.cpp	(working copy)
@@ -9,6 +9,8 @@
 
 #include "Lock.h"
 
+using namespace Coaster;
+
 static int unique = 0;
 
 #define DEBUG_LOCKS 0
Index: modules/provider-coaster-c-client/src/CoasterChannel.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterChannel.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterChannel.cpp	(working copy)
@@ -18,6 +18,8 @@
 #include <algorithm>
 #include <sstream>
 
+using namespace Coaster;
+
 using std::exception;
 using std::list;
 using std::map;
Index: modules/provider-coaster-c-client/src/CoasterLoop.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterLoop.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterLoop.cpp	(working copy)
@@ -13,10 +13,15 @@
 #include <errno.h>
 #include <string.h>
 
+using namespace Coaster;
+
 using std::list;
 using std::map;
 using std::string;
 
+// 1 minute
+#define HEARTBEAT_CHECK_INTERVAL 60
+
 void* run(void* ptr);
 void checkSelectError(int ret);
 
Index: modules/provider-coaster-c-client/src/CoasterSWIG.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterSWIG.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterSWIG.cpp	(working copy)
@@ -11,6 +11,8 @@
 #include "Settings.h"
 #include "Job.h"
 
+using namespace Coaster;
+
 /** CoasterSWIGLoopCreate : create, starts and returns
  *  a pointer to a CoasterLoop object.
  */
Index: modules/provider-coaster-c-client/src/ServiceConfigurationCommand.h
===================================================================
--- modules/provider-coaster-c-client/src/ServiceConfigurationCommand.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/ServiceConfigurationCommand.h	(working copy)
@@ -7,6 +7,8 @@
 #include "Buffer.h"
 #include "Settings.h"
 
+namespace Coaster {
+
 class ServiceConfigurationCommand: public Command {
 	private:
 		Settings* settings;
@@ -19,4 +21,6 @@
 		void serialize();
 };
 
+}
+
 #endif
Index: modules/provider-coaster-c-client/src/ConditionVariable.cpp
===================================================================
--- modules/provider-coaster-c-client/src/ConditionVariable.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/ConditionVariable.cpp	(working copy)
@@ -7,6 +7,8 @@
 
 #include "ConditionVariable.h"
 
+using namespace Coaster;
+
 ConditionVariable::ConditionVariable() {
 	pthread_cond_init(&cv, NULL);
 }
Index: modules/provider-coaster-c-client/src/HeartBeatCommand.cpp
===================================================================
--- modules/provider-coaster-c-client/src/HeartBeatCommand.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/HeartBeatCommand.cpp	(working copy)
@@ -9,6 +9,8 @@
 #include "Logger.h"
 #include <sstream>
 
+using namespace Coaster;
+
 using std::string;
 
 string HeartBeatCommand::NAME("HEARTBEAT");
Index: modules/provider-coaster-c-client/src/StagingSetEntry.h
===================================================================
--- modules/provider-coaster-c-client/src/StagingSetEntry.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/StagingSetEntry.h	(working copy)
@@ -10,6 +10,8 @@
 
 #include <string>
 
+namespace Coaster {
+
 enum StagingMode { ALWAYS = 1, IF_PRESENT = 2, ON_ERROR = 4, ON_SUCCESS = 8 };
 
 class StagingSetEntry {
@@ -25,4 +27,6 @@
 		virtual ~StagingSetEntry();
 };
 
+}
+
 #endif /* STAGINGSETENTRY_H_ */
Index: modules/provider-coaster-c-client/src/CommandCallback.h
===================================================================
--- modules/provider-coaster-c-client/src/CommandCallback.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CommandCallback.h	(working copy)
@@ -11,6 +11,8 @@
 #include <string>
 #include "RemoteCoasterException.h"
 
+namespace Coaster {
+
 class Command;
 
 class CommandCallback {
@@ -19,5 +21,6 @@
 		virtual void replyReceived(Command* cmd) = 0;
 };
 
+}
 
 #endif /* COMMANDCALLBACK_H_ */
Index: modules/provider-coaster-c-client/src/RemoteCoasterException.h
===================================================================
--- modules/provider-coaster-c-client/src/RemoteCoasterException.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/RemoteCoasterException.h	(working copy)
@@ -10,6 +10,8 @@
 
 #include <string>
 
+namespace Coaster {
+
 class RemoteCoasterException {
 	private:
 		std::string* className;
@@ -20,4 +22,6 @@
 		std::string& str();
 };
 
+}
+
 #endif /* REMOTECOASTEREXCEPTION_H_ */
Index: modules/provider-coaster-c-client/src/Settings.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Settings.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Settings.cpp	(working copy)
@@ -7,6 +7,8 @@
 
 #include "Settings.h"
 
+using namespace Coaster;
+
 using std::string;
 using std::map;
 
Index: modules/provider-coaster-c-client/src/JobSubmitCommand.h
===================================================================
--- modules/provider-coaster-c-client/src/JobSubmitCommand.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/JobSubmitCommand.h	(working copy)
@@ -7,6 +7,8 @@
 #include <string>
 #include "Buffer.h"
 
+namespace Coaster {
+
 class JobSubmitCommand: public Command {
 	private:
 		Job* job;
@@ -21,4 +23,6 @@
 		void serialize();
 };
 
+}
+
 #endif
Index: modules/provider-coaster-c-client/src/ChannelConfigurationCommand.h
===================================================================
--- modules/provider-coaster-c-client/src/ChannelConfigurationCommand.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/ChannelConfigurationCommand.h	(working copy)
@@ -6,6 +6,8 @@
 #include <string>
 #include "Buffer.h"
 
+namespace Coaster {
+
 class ChannelConfigurationCommand: public Command {
 	private:
 		std::string localId;
@@ -21,4 +23,6 @@
 		void serialize();
 };
 
+}
+
 #endif
Index: modules/provider-coaster-c-client/src/CoasterClient.h
===================================================================
--- modules/provider-coaster-c-client/src/CoasterClient.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterClient.h	(working copy)
@@ -26,6 +26,8 @@
 
 #endif 
 
+namespace Coaster {
+
 class ClientHandlerFactory;
 class HandlerFactory;
 class CoasterLoop;
@@ -112,4 +114,6 @@
 		void updateJobStatusNoLock(Job* job, JobStatus* status);
 };
 
+}
+
 #endif /* COASTER_CLIENT_H_ */
Index: modules/provider-coaster-c-client/src/HandlerFactory.cpp
===================================================================
--- modules/provider-coaster-c-client/src/HandlerFactory.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/HandlerFactory.cpp	(working copy)
@@ -7,6 +7,8 @@
 
 #include "HandlerFactory.h"
 
+using namespace Coaster;
+
 using std::string;
 using std::map;
 
Index: modules/provider-coaster-c-client/src/CmdCBCV.h
===================================================================
--- modules/provider-coaster-c-client/src/CmdCBCV.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/CmdCBCV.h	(working copy)
@@ -13,6 +13,8 @@
 #include "ConditionVariable.h"
 #include "RemoteCoasterException.h"
 
+namespace Coaster {
+
 class CmdCBCV: public CommandCallback {
 	private:
 		bool done;
@@ -26,4 +28,5 @@
 		void wait();
 };
 
+}
 #endif /* CMDCBCV_H_ */
Index: modules/provider-coaster-c-client/src/Buffer.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Buffer.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Buffer.cpp	(working copy)
@@ -9,6 +9,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+using namespace Coaster;
+
 using std::string;
 using std::out_of_range;
 using std::logic_error;
Index: modules/provider-coaster-c-client/src/ClientHandlerFactory.h
===================================================================
--- modules/provider-coaster-c-client/src/ClientHandlerFactory.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/ClientHandlerFactory.h	(working copy)
@@ -10,10 +10,14 @@
 
 #include "HandlerFactory.h"
 
+namespace Coaster {
+
 class ClientHandlerFactory: public HandlerFactory {
 	public:
 		ClientHandlerFactory();
 		virtual ~ClientHandlerFactory();
 };
 
+}
+
 #endif /* CLIENTHANDLERFACTORY_H_ */
Index: modules/provider-coaster-c-client/src/RequestReply.h
===================================================================
--- modules/provider-coaster-c-client/src/RequestReply.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/RequestReply.h	(working copy)
@@ -14,6 +14,8 @@
 #include <vector>
 #include <list>
 
+namespace Coaster {
+
 class CoasterChannel;
 
 class RequestReply: public ChannelCallback {
@@ -61,4 +63,6 @@
 		virtual void receiveCompleted(int flags) = 0;
 };
 
+}
+
 #endif /* REQUESTREPLY_H_ */
Index: modules/provider-coaster-c-client/src/CoasterError.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterError.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/CoasterError.cpp	(working copy)
@@ -8,9 +8,13 @@
 #include "CoasterError.h"
 #include <cstdlib>
 
+using namespace Coaster;
+
 using std::string;
 using std::stringstream;
 
+#define MAX_MSG_LEN 256
+
 CoasterError::CoasterError(const string& msg) {
 	this->message = msg;
 }
Index: modules/provider-coaster-c-client/src/Job.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Job.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Job.cpp	(working copy)
@@ -2,6 +2,8 @@
 #include <sstream>
 #include <cstring>
 
+using namespace Coaster;
+
 using std::map;
 using std::pair;
 using std::string;
Index: modules/provider-coaster-c-client/src/JobStatusHandler.cpp
===================================================================
--- modules/provider-coaster-c-client/src/JobStatusHandler.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/JobStatusHandler.cpp	(working copy)
@@ -9,6 +9,8 @@
 
 #include <sstream>
 
+using namespace Coaster;
+
 using std::string;
 using std::stringstream;
 
Index: modules/provider-coaster-c-client/src/Handler.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Handler.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Handler.cpp	(working copy)
@@ -2,6 +2,8 @@
 
 #include "Logger.h"
 
+using namespace Coaster;
+
 using std::list;
 using std::string;
 using std::vector;
Index: modules/provider-coaster-c-client/src/Command.cpp
===================================================================
--- modules/provider-coaster-c-client/src/Command.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/Command.cpp	(working copy)
@@ -7,6 +7,8 @@
 using std::string;
 using std::vector;
 
+using namespace Coaster;
+
 Command::Command(const string* pname) {
 	name = pname;
 	ferrorReceived = false;
Index: modules/provider-coaster-c-client/src/JobStatus.h
===================================================================
--- modules/provider-coaster-c-client/src/JobStatus.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/JobStatus.h	(working copy)
@@ -13,6 +13,8 @@
 #include "RemoteCoasterException.h"
 #include "coaster-defs.h"
 
+namespace Coaster {
+
 class JobStatus {
 	private:
 		JobStatusCode statusCode;
@@ -62,4 +64,6 @@
 	return os;
 }
 
+}
+
 #endif /* JOB_STATUS_H_ */
Index: modules/provider-coaster-c-client/src/Logger.h
===================================================================
--- modules/provider-coaster-c-client/src/Logger.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Logger.h	(working copy)
@@ -16,6 +16,7 @@
 #include <string>
 #include "Lock.h"
 
+namespace Coaster {
 
 class Logger: public std::ostream {
 	public:
@@ -74,4 +75,6 @@
 #define LogInfo Logger::singleton().setFile(__FILE__) << Logger::INFO
 #define LogDebug Logger::singleton().setFile(__FILE__) << Logger::DEBUG
 
+}
+
 #endif /* LOGGER_H_ */
Index: modules/provider-coaster-c-client/src/ServiceConfigurationCommand.cpp
===================================================================
--- modules/provider-coaster-c-client/src/ServiceConfigurationCommand.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/ServiceConfigurationCommand.cpp	(working copy)
@@ -1,6 +1,8 @@
 #include "ServiceConfigurationCommand.h"
 #include <map>
 
+using namespace Coaster;
+
 using std::map;
 using std::string;
 
Index: modules/provider-coaster-c-client/src/coasters.h
===================================================================
--- modules/provider-coaster-c-client/src/coasters.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/coasters.h	(working copy)
@@ -49,8 +49,13 @@
   manipulation of the rbjects.
  */
 #ifdef __cplusplus
-typedef class Settings coaster_settings;
-typedef class Job coaster_job;
+namespace Coaster {
+  class Settings;
+  class Job;
+}
+
+typedef class Coaster::Settings coaster_settings;
+typedef class Coaster::Job coaster_job;
 #else
 // Treat these types as opaque pointer to unimplemented struct for C
 typedef struct coaster_settings_opaque_ coaster_settings;
Index: modules/provider-coaster-c-client/src/ChannelCallback.h
===================================================================
--- modules/provider-coaster-c-client/src/ChannelCallback.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/ChannelCallback.h	(working copy)
@@ -10,6 +10,8 @@
 
 #include "Buffer.h"
 
+namespace Coaster {
+
 class ChannelCallback {
 	public:
 		ChannelCallback();
@@ -23,4 +25,6 @@
 		virtual void dataSent(Buffer* buf);
 };
 
+}
+
 #endif /* CHANNELCALLBACK_H_ */
Index: modules/provider-coaster-c-client/src/StagingSetEntry.cpp
===================================================================
--- modules/provider-coaster-c-client/src/StagingSetEntry.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/StagingSetEntry.cpp	(working copy)
@@ -7,6 +7,8 @@
 
 #include "StagingSetEntry.h"
 
+using namespace Coaster;
+
 using std::string;
 
 StagingSetEntry::StagingSetEntry(string psource, string pdestination, StagingMode pmode) {
Index: modules/provider-coaster-c-client/src/RemoteCoasterException.cpp
===================================================================
--- modules/provider-coaster-c-client/src/RemoteCoasterException.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/RemoteCoasterException.cpp	(working copy)
@@ -9,6 +9,8 @@
 #include <stdio.h>
 #include <iostream>
 
+using namespace Coaster;
+
 using std::exception;
 using std::string;
 
Index: modules/provider-coaster-c-client/src/JobSubmitCommand.cpp
===================================================================
--- modules/provider-coaster-c-client/src/JobSubmitCommand.cpp	(revision 3971)
+++ modules/provider-coaster-c-client/src/JobSubmitCommand.cpp	(working copy)
@@ -3,6 +3,8 @@
 #include <cstring>
 #include <string>
 
+using namespace Coaster;
+
 using std::cout;
 using std::map;
 using std::ostream;
Index: modules/provider-coaster-c-client/src/Lock.h
===================================================================
--- modules/provider-coaster-c-client/src/Lock.h	(revision 3971)
+++ modules/provider-coaster-c-client/src/Lock.h	(working copy)
@@ -10,6 +10,8 @@
 
 #include <pthread.h>
 
+namespace Coaster {
+
 class Lock {
 	int id;
 	private:
@@ -42,4 +44,6 @@
 		};
 };
 
+}
+
 #endif /* LOCK_H_ */



More information about the Swift-commit mailing list