Mass++ manager class.
More...
#include <MsppManager.h>
Mass++ manager class.
Definition at line 28 of file MsppManager.h.
| kome::core::MsppManager::MsppManager |
( |
| ) |
|
|
protected |
constructor
process ID
Definition at line 41 of file MsppManager.cpp.
60 #if defined(_WIN64) || defined(__amd64__)
64 #endif // _WIN64 || __amd64__
void deleteTmpFiles()
deletes temporary files
bool m_bInitializedMATLAB
unsigned int getprocessid()
gets procsess ID
void setPath()
sets file path
void setPluginDir()
set mspp plugin dir
| const char * kome::core::MsppManager::getAppName |
( |
| ) |
|
gets the application name
- Returns
- application name
Definition at line 77 of file MsppManager.cpp.
| const char * kome::core::MsppManager::getConfDir |
( |
| ) |
|
gets config directory
- Returns
- config directory
Definition at line 176 of file MsppManager.cpp.
| IniFile * kome::core::MsppManager::getIniFile |
( |
| ) |
|
| static MsppManager & kome::core::MsppManager::getInstance |
( |
| ) |
|
|
static |
| const char * kome::core::MsppManager::getMsppDir |
( |
| ) |
|
gets Mass++ directory
- Returns
- Mass++ directory
Definition at line 171 of file MsppManager.cpp.
| IniFile * kome::core::MsppManager::getParameters |
( |
void |
| ) |
|
gets parameters
- Returns
- parameters file object
Definition at line 282 of file MsppManager.cpp.
| unsigned int kome::core::MsppManager::getPid |
( |
| ) |
|
| const char * kome::core::MsppManager::getPlatformName |
( |
| ) |
|
gets the platform name
- Returns
- platform name
Definition at line 82 of file MsppManager.cpp.
| std::vector< std::string > kome::core::MsppManager::getPluginDir |
( |
| ) |
|
get mspp plugin dir
- Returns
- plugins path
Definition at line 307 of file MsppManager.cpp.
std::vector< std::string > m_pluginPaths
| const char * kome::core::MsppManager::getRegName |
( |
| ) |
|
gets the registory name
- Returns
- gegistory name
Definition at line 87 of file MsppManager.cpp.
| const char * kome::core::MsppManager::getTmpDir |
( |
| ) |
|
gets temporary file directory name
- Returns
- temporary file directory name
Definition at line 181 of file MsppManager.cpp.
184 std::string pidStr = FMT(
"%04x",
m_pid );
bool makedirs(const char *path)
make directories
bool fileexists(const char *path)
judge whether file exists
std::string getpath(const char *dir, const char *file)
get file path
| std::string kome::core::MsppManager::getTmpFileName |
( |
const char * |
prefix, |
|
|
const char * |
suffix, |
|
|
const char * |
dir = NULL |
|
) |
| |
gets temporary file name
- Parameters
-
| [in] | prefix | prefix of temporary file name |
| [in] | suffix | suffix of temporary file name |
| [in] | dir | directory name |
- Returns
- temporary file name
Definition at line 197 of file MsppManager.cpp.
200 std::string fileName;
201 std::string d =
NVL( dir,
"" );
205 if( tmpDir.empty() ) {
214 d =
getpath( tmpDir.c_str(), d.c_str() );
225 localtime_s( &date, &now );
227 date = *( localtime( &now ) );
232 while( path.empty() && count >= 0 ) {
235 "%s%02d%02d%02d%04x%s",
243 for(
unsigned int i = 0; i < fileName.length(); i++ ) {
244 char c = fileName[ i ];
245 if( c ==
'/' || c ==
'\\' || c ==
':' || c ==
'?'
246 || c ==
'>' || c ==
'<' || c ==
'|' || c ==
' '
247 || c ==
'\r' || c ==
'\t' || c ==
'\n' || c ==
',' ) {
261 LOG_TRACE( FMT(
"Temporary File [%s]", path.c_str() ) );
bool isabsolutepath(const char *file)
judges whether the specified file path is absolute file path or not.
bool makedirs(const char *path)
make directories
bool fileexists(const char *path)
judge whether file exists
std::string getabsolutepath(const char *dir, const char *file)
get absolute path
const char * getTmpDir()
gets temporary file directory name
#define NVL(checkVal, replaceVal)
std::string getpath(const char *dir, const char *file)
get file path
| const char * kome::core::MsppManager::getVersion |
( |
| ) |
|
gets Mass++ version
- Returns
- Mass++ version
Definition at line 92 of file MsppManager.cpp.
| bool kome::core::MsppManager::isInitializedMATLAB |
( |
void |
| ) |
|
gets MATLAB's initialized flag value
- Returns
- MATLAB's initialized flag value (true:already initialized,false:Uninitailize)
Definition at line 315 of file MsppManager.cpp.
bool m_bInitializedMATLAB
| void kome::core::MsppManager::setIniFile |
( |
IniFile * |
ini | ) |
|
| void kome::core::MsppManager::setParameters |
( |
IniFile * |
params | ) |
|
sets parameters file
- Parameters
-
| [in] | params | parameters file |
Definition at line 277 of file MsppManager.cpp.
| std::string kome::core::MsppManager::m_app |
|
protected |
| bool kome::core::MsppManager::m_bInitializedMATLAB |
|
protected |
initialized flag of MATLAB application
Definition at line 82 of file MsppManager.h.
| std::string kome::core::MsppManager::m_confDir |
|
protected |
| IniFile* kome::core::MsppManager::m_ini |
|
protected |
| std::string kome::core::MsppManager::m_msppDir |
|
protected |
| IniFile* kome::core::MsppManager::m_params |
|
protected |
| unsigned long kome::core::MsppManager::m_pid |
|
protected |
| std::string kome::core::MsppManager::m_pidTmpDir |
|
protected |
process temporary file directory
Definition at line 62 of file MsppManager.h.
| std::string kome::core::MsppManager::m_platform |
|
protected |
| std::vector< std::string > kome::core::MsppManager::m_pluginPaths |
|
protected |
| std::string kome::core::MsppManager::m_reg |
|
protected |
| std::string kome::core::MsppManager::m_tmpDir |
|
protected |
| std::string kome::core::MsppManager::m_version |
|
protected |
The documentation for this class was generated from the following files: