INT tagLogInfo::nSetConfigData(xmlNodePtr pNodePtr) { //pNodePtr = pNodePtr->xmlChildrenNode; vClear(); //To give Initial Values INT nRetValue = S_OK; m_sLogTrigger.startId = -1; m_sLogTrigger.stopId = -1; while (pNodePtr != NULL) { if ( pNodePtr->xmlChildrenNode != NULL ) { if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"IsEnabled"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_bEnabled = xmlUtils::getBooleanValue((char*)key); xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"Time_Mode"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_eLogTimerMode = xmlUtils::eGetTimerMode((char*)key); xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"Numeric_Mode"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_eNumFormat = xmlUtils::eGetNumericMode((char*)key); xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"IsAppendLog_Enabled"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { BOOL bValue = xmlUtils::getBooleanValue((char*)key); m_eFileMode = OVERWRITE_MODE; if(bValue == TRUE) { m_eFileMode = APPEND_MODE; } xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"Reset_Absolute_Time"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_bResetAbsTimeStamp = xmlUtils::getBooleanValue((char*)key); xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"Channel"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_ChannelSelected = atoi((char*)key); if(m_ChannelSelected < 0 || m_ChannelSelected > CHANNEL_ALLOWED ) { m_ChannelSelected = CAN_CHANNEL_ALL; } xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"File_Path"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { if(PathIsRelative((char*)key) == TRUE) { std::string omStrConfigFolder; std::string omPath; char configPath[MAX_PATH]; AfxGetMainWnd()->SendMessage(MSG_GET_CONFIGPATH, (WPARAM)configPath, 0); CUtilFunctions::nGetBaseFolder(configPath, omStrConfigFolder ); char chAbsPath[MAX_PATH]; PathCombine(chAbsPath, omStrConfigFolder.c_str(), (char*)key); strcpy_s(m_sLogFileName, MAX_PATH, chAbsPath); } else { strcpy_s(m_sLogFileName, _MAX_PATH, (char*)key); } xmlFree(key); nRetValue = S_OK; } else { nRetValue = S_FALSE; } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"Trigger_Start_ID"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_sLogTrigger.startId = atoi((char*)key); xmlFree(key); } } else if ((!xmlStrcmp((const xmlChar*)pNodePtr->name, (const xmlChar*)"Trigger_Stop_ID"))) { xmlChar* key = xmlNodeListGetString(pNodePtr->doc, pNodePtr->xmlChildrenNode, 1); if(NULL != key) { m_sLogTrigger.stopId = atoi((char*)key); xmlFree(key); } } }//if Conditions pNodePtr = pNodePtr->next; }//While if (strlen(m_sLogFileName) == 0) { nRetValue = S_FALSE; } //0 - None, 1 - Start, 2 - Stop, 3 - Both m_sLogTrigger.triggerType = NONE; int nStartID = m_sLogTrigger.startId; int nStopID = m_sLogTrigger.stopId; if( nStartID >= 0 && nStopID < 0 ) { m_sLogTrigger.triggerType = START; } else if( nStartID < 0 && nStopID >= 0 ) { m_sLogTrigger.triggerType = STOP; } else if( nStartID < 0 && nStopID < 0 ) { m_sLogTrigger.triggerType = NONE; } else if( nStartID >= 0 && nStopID >= 0 ) { m_sLogTrigger.triggerType = BOTH; } return nRetValue; }
/****************************************************************************** Function Name : tagLogInfo Input(s) : - Output : - Functionality : Standard constructor Member of : tagLogInfo Friend of : - Author(s) : Ratnadip Choudhury Date Created : 1.12.2009 Modification date: Modification By : ******************************************************************************/ tagLogInfo::tagLogInfo() { vClear(); }
GdsCameraManagerDX9::~GdsCameraManagerDX9( void ) { vClear(); }
GdsCameraManagerDX9::GdsCameraManagerDX9( void ): m_pDevice(NULL) { SetName( OBJECT_CAMMGR_DX9 ); vClear(); }
GdsResTexture::~GdsResTexture() { vClear(); }
GdsResTexture::GdsResTexture(): m_pTexture( NULL ) { vClear(); }
GdsNode::~GdsNode() { vClear(); }