Project

General

Profile

« Previous | Next » 

Revision eee13fa3

Added by david.sorber over 2 years ago

First mostly functional version; let's call it v0.1.0.

View differences:

src/CopyManagerOptions.h
{
public:
static const uint32_t LOG_LEVEL_DEFAULT{3};
static const uint32_t FC_THRESHOLD_DEFAULT{1000};
static const uint32_t NUM_PROC_THREADS_DEFAULT{4};
// Log option defaults
static const bool DEFAULT_DISABLE_LOG{false};
static const bool DEFAULT_LOG_TO_STDERR{true};
static const int DEFAULT_LOG_LEVEL{3};
static inline const std::string DEFAULT_LOG_FILE_PATH{"./copyfile.log"};
CopyManagerOptions(
const char* srcPath,
const char* destPath);
static const uint32_t DEFAULT_FC_THRESHOLD{1000};
static const uint32_t DEFAULT_NUM_COPY_THREADS{4};
static const bool DEFAULT_COPY_TOPLEVEL{false};
CopyManagerOptions(
const std::string srcPath,
const std::string destPath);
const std::string& srcPath,
const std::string& destPath,
bool disableLog,
bool logToStderr,
const std::string& logFilePath,
int logLevel,
uint32_t flowCtrlThreshold,
uint32_t numProcThreads,
bool copyTopLevel);
~CopyManagerOptions();
//--- Getters -------------------------------------------------------------
inline const std::string& getSrcPath() const
{
return m_srcPath;
return r_srcPath;
}
inline const std::string& getDestPath() const
......
return m_destPath;
}
inline uint32_t getLogLevel() const
inline bool getDisableLog() const
{
return m_disableLog;
}
inline bool getLogToStderr() const
{
return m_logToStderr;
}
inline int getLogLevel() const
{
return m_logLevel;
}
inline const std::string& getLogFilePath() const
{
return r_logFilePath;
}
inline uint32_t getFlowControlThreshold() const
{
return m_flowControlThreshold;
}
inline uint32_t getNumProcThreads() const
inline uint32_t getNumCopyThreads() const
{
return m_numCopyThreads;
}
inline bool getCopyTopLevel() const
{
return m_numProcThreads;
return m_copyTopLevel;
}
//--- Setters -------------------------------------------------------------
inline void setDestPath(const std::string& destPath)
{
m_destPath = destPath;
}
inline void setFlowControlThreshold(uint32_t threshold)
{
m_flowControlThreshold = threshold;
......
private:
std::string m_srcPath; // source path; "copy from"
// Fundamental options/settings
const std::string& r_srcPath; // source path; "copy from"
std::string m_destPath; // destination path; "copy to"
uint32_t m_logLevel;
uint32_t m_flowControlThreshold;
uint32_t m_numProcThreads;
// Logging related options
bool m_disableLog; // Enable/disable the log
bool m_logToStderr; // Write log messages to stderr instead of file
const std::string& r_logFilePath; // Path to log file
int m_logLevel; // Log messages >= selected level will be output
// Other options
uint32_t m_flowControlThreshold; // Max level of entry queue for flow control purposes
uint32_t m_numCopyThreads; // Number of copy threads to spawn
bool m_copyTopLevel; // Copy top level source dir to dest dir
};

Also available in: Unified diff