ParseMainArguments.hh 1.61 KB
/**
 * ParseMainArguments.hh
 *
 *  Created on: 15 oct. 2012
 *      Author: AKKA IS
 */

#ifndef PARSEMAINARGUMENTS_HH_
#define PARSEMAINARGUMENTS_HH_

#include <string>
#include <exception>
#include "log4cxx/logger.h"


#include "AMDA_exception.hh"
#include "OutputFormatTime.hh"

namespace AMDA {
namespace MainRequest {



/**
 * Exception specific for ParseMainArguments
 */
struct parseArg_error: virtual AMDA::AMDA_exception { };



/**
 *
 */
class ParseMainArguments {

public:
	/**
	 * @brief Equivalent typedef to ParamOutputASCIIFile::InfoNammeList.
	 */
	typedef std::vector<std::string> CalibrationInfoNameList;
    /**
    * Constructor
    * Return an exception if parse error
    */
    ParseMainArguments(int arcg, char *argv[]) ;


    /**
     * help message
     */
    static void printHelp(const char *name);

    /**
     * Getter of paramName
     */
	const std::string& getRequesteFile() const {
		return _requesteFile;
	}

    /**
     * Getter of _workPath
     */
	const std::string& getWorkPath() const {
		return _workPath;
	}


	/**
	 * if true, arg erreur we must stop process
	 */
	bool isStopProcess() const {
		return _stopProcess;
	}

    /*************************************/
private:

	static log4cxx::LoggerPtr logger;

    /**
     *
     */
    int parse(int argc,  char *argv[]);

    /**
     * equesteFile in arguments list
     */
    std::string _requesteFile;

    /**
     * work path in arguments list
     */
    std::string _workPath;
    
    /**
     * if true stopProcess
     */
    bool _stopProcess;
};
} /* namespace Main */
} /* namespace AMDA */


#endif /* PARSEMAINARGUMENTS_HH_ */