Commit 497903ed authored by Marco De Marco's avatar Marco De Marco
Browse files

Name space defined and sleeptime property added

parent 091d95de
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -6,6 +6,9 @@
#include <vector>
#include <boost/shared_ptr.hpp>

namespace FitsImporter_ns
{

class Configuration
{
public:
@@ -19,9 +22,9 @@ private:
//------------------------------------------------------------------------------
//	[Private] Constructor destructor deleter
//------------------------------------------------------------------------------
	Configuration(std::string watchPath, int workerNumber, int waitTime, 
	Configuration(std::string watchPath, int workerNumber, int sleepTime, int waitTime, 
		int connectionNumber, uint32_t iNotifyMask): m_watchPath(watchPath),
		m_workerNumber(workerNumber), m_waitTime(waitTime),		
		m_workerNumber(workerNumber), m_sleepTime(sleepTime), m_waitTime(waitTime),		
		m_connectionNumber(connectionNumber), m_iNotifyMask(iNotifyMask) {}
	virtual ~Configuration() {}

@@ -38,9 +41,9 @@ public:
//	[Public] User methods
//------------------------------------------------------------------------------
	static Configuration::SP create(std::string watchPath, int workerNumber,
        int waitTime, int connectionNumber, uint32_t iNotifyMask)		
        int sleepTime, int waitTime, int connectionNumber, uint32_t iNotifyMask)		
	{
		Configuration::SP c_sp(new Configuration(watchPath, workerNumber, 
		Configuration::SP c_sp(new Configuration(watchPath, workerNumber, sleepTime,
			 waitTime, connectionNumber, iNotifyMask), Configuration::Deleter());
			 
		return c_sp;
@@ -48,6 +51,7 @@ public:

	std::string getWatchPath() const { return m_watchPath; }
	int getWorkerNumber() const { return m_workerNumber; }
    int getSleepTime() const { return m_sleepTime; }
	int getWaitTime() const { return m_waitTime; }
	int getConnectionNumber() const { return m_connectionNumber; }
	uint32_t getINotifyMask() const { return m_iNotifyMask; }
@@ -62,6 +66,9 @@ private:
	//Worker thread number	
	const int m_workerNumber;

	//Event thread sleep time
	const int m_sleepTime;    
    
	//Worker thread wait time
	const int m_waitTime;

@@ -72,4 +79,6 @@ private:
	const uint32_t m_iNotifyMask;
};

}   //End of namespace

#endif /*!CONFIGURATION_H*/
+4 −1
Original line number Diff line number Diff line
@@ -7,6 +7,9 @@

#include <soci/mysql/soci-mysql.h>

namespace FitsImporter_ns
{

//=============================================================================
//	ConnectionManager::ConnectionManager()
//=============================================================================
@@ -121,4 +124,4 @@ ConnectionManager::SessionSP ConnectionManager::getSession(
	return session_sp;
}

/*___oOo___*/
}   //namespace
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@
#include <soci/connection-pool.h>
#include <soci/session.h>

namespace FitsImporter_ns
{

class ConnectionManager : public Tango::LogAdapter
{
public:
@@ -90,4 +93,6 @@ protected:
	std::map<PoolID, PoolSP> m_pool;
};

}   //End of namespace

#endif /*!CONNECTION_MANAGER_H*/
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,9 @@
#include <soci/boost-optional.h>
#include <soci/boost-tuple.h>

namespace FitsImporter_ns
{

//==============================================================================
//      DMDBImporter::DMDBImporter()
//==============================================================================
@@ -316,3 +319,5 @@ Mapping::SPVector DMDBImporter::getMapping(int destinationId)
    
    return mapping_spvector;     
}

}   //namespace
+5 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@
#include <soci/error.h>
#include <soci/session.h>

namespace FitsImporter_ns
{

class DMDBImporter : public Tango::LogAdapter
{
public:
@@ -128,4 +131,6 @@ protected:
    boost::scoped_ptr<soci::session> m_session_sp;        
};

}   //End of namespace

#endif	/* DMDB_IMPORTER_H */
Loading