/*************************************************************************** Parameter Manager Header ( parammanager.h ) ----------------------------------------- begin : 2011/02/16 copyright : (C) 2005 SolutionBox Inc. author : Service 1 Team email : svc1@solbox.com version : 3.0.1 CopyRight(C) 2005 SolutionBox Inc. All Rights reserved. Redistribution and use in source and binary forms, with or with out modification, are not permitted in outside of SolutionBox Inc. ***************************************************************************/ #ifndef __PARAMTER_MANAGER_H__ #define __PARAMTER_MANAGER_H__ class CParamManager { public: CParamManager(); ~CParamManager(); enum mode { SYNCMODE = 0, REGMODE = 1 }; // ÀÔ·Â ¹ÞÀº Á¤º¸ ºÐ¼® int inputparamAnalysis( int argc, char * const argv[] ); // load config bool loadconfig( const char * path ); // get mode inline int getMode( void ) { return m_mode; } // get service id inline const char * getServiceid( void ) { return m_serviceid.c_str(); } // get cal depth inline int getCaldepth( void ) { return m_depth; } // get depth inline int getDepth ( void ) { return m_depth; } // getlogptah const char* getLogPath( void ) { return m_logpath.c_str(); } // get log level int getLogLevel( void ) { return m_loglevel; } // get DB Host std::string& getDBHost( void ) { return m_dbhost; } // get DB port int getDBPort( void ) { return m_dbport; } // get DB Name std::string& getDBName( void ) { return m_dbnmae; } // get DB user std::string& getDBUser( void ) { return m_dbuser; } // get DB password std::string& getDBPasswd( void ) { return m_dbpasswd; } private: bool correctinput( void ); private: // input // job mode - 1 : register, 0 : sync(default) int m_mode; // service id std::string m_serviceid; // depth int m_depth; // config // log path std::string m_logpath; // log level; int m_loglevel; // RCDB // host std::string m_dbhost; // port int m_dbport; // database std::string m_dbnmae; // db user std::string m_dbuser; // db password std::string m_dbpasswd; }; #endif // __PARAMTER_MANAGER_H__