void OTSocket::Listen(const OTString &strBind)
{
	if (NULL != m_pSocket)
		delete m_pSocket;
//	m_pSocket = NULL;
	m_pSocket = new zmq::socket_t(*m_pContext, ZMQ_REP);  // RESPONSE socket (Request / Response.)
	OT_ASSERT_MSG(NULL != m_pSocket, "OTSocket::Listen: new zmq::socket(context, ZMQ_REP)");
	
	OTString strTemp(strBind); // In case m_strBindPath is what was passed in. (It happens.)
	m_strBindPath.Set(strTemp); // In case we have to close/reopen the socket to finish a send/receive.
	
	// ------------------------
	//  Configure socket to not wait at close time
    //
	const int linger = 0; // close immediately
	m_pSocket->setsockopt (ZMQ_LINGER, &linger, sizeof (linger));
    /*
     int zmq_setsockopt (void *socket, int option_name, const void *option_value, size_t option_len);
     
     Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects.     
     */
    
	// ------------------------
    
	m_pSocket->bind(strBind.Get());
}
Foam::string Foam::equationReader::stringPreconditioner
(
    const string& rawText
)
{
    string rawWorking(rawText);

    // Negative exponent workaround
    for (label i = 0; i < 10; i++)
    {
        string strTemp(name(i));
        string strTempU(name(i));
        string strTemp2(name(i));
        strTemp.append("e-");
        strTempU.append("E-");
        strTemp2.append("&");
        stringReplaceAll(rawWorking, strTemp, strTemp2);
        stringReplaceAll(rawWorking, strTempU, strTemp2);
    }

    stringReplaceAll(rawWorking, "^", " : ");
    stringReplaceAll(rawWorking, "(", " ( ");
    stringReplaceAll(rawWorking, ")", " ) ");
    stringReplaceAll(rawWorking, "+", " + ");
    stringReplaceAll(rawWorking, "-", " - ");
    stringReplaceAll(rawWorking, "&", "e-");
    stringReplaceAll(rawWorking, "*", " * ");
    stringReplaceAll(rawWorking, "/", " / ");
    stringReplaceAll(rawWorking, ",", " , ");

    return rawWorking;
}
void CToolManagerHardDisk::OnBnClickedBtnPartation()
{
	// TODO: 在此添加控件通知处理程序代码
	if (m_nPartNo == -1 || m_nPhyNo == -1 || m_nLogicNo == -1)
	{
		return;
	}
	CDlgDiskPartation dlg;
	dlg.m_nRecord = m_diskinfo.vStorageDeviceInfoAll[m_nLogicNo].diPartitions[0].uiTotalSpace;
	dlg.m_nSnap = m_diskinfo.vStorageDeviceInfoAll[m_nLogicNo].diPartitions[1].uiTotalSpace;
	dlg.m_nTotal = dlg.m_nSnap + dlg.m_nRecord;
	if (IDOK == dlg.DoModal())
	{
		CString strTemp("");
		strTemp.Format("%s", _CS("HDDManager.SuceToExecute"));
		if ( IDOK == MessageBox( strTemp , _CS( "OneClick.Prompt" ) , MB_OKCANCEL  | MB_ICONQUESTION ) )
		{
			memset(&m_DiskCtl, 0, sizeof(m_DiskCtl));
			m_DiskCtl.iAction = SDK_STORAGE_DEVICE_CONTROL_PARTITIONS;
			m_DiskCtl.iSerialNo = m_nLogicNo;
			m_DiskCtl.iPartSize[0] = dlg.m_nRecord;
			m_DiskCtl.iPartSize[1] = dlg.m_nSnap;
			OnExecute(&m_DiskCtl);
		}
	}
}
Esempio n. 4
0
//TCHARファイル名をSJISファイル名に変換する。正しく変換できない場合には、falseを返す
bool UtilPathT2A(CStringA &strA,LPCTSTR lpPath,bool bOnDisk)
{
#if defined(_UNICODE)||defined(UNICODE)
	CStringA strTemp(lpPath);
	if(strTemp==lpPath){
		//欠損無く変換できた
		strA=strTemp;
		return true;
	}
	if(!bOnDisk){
		//ディスク上のファイルではないので、以降の代替手段は執れない
		return false;
	}
	//ショートファイル名で代用してみる
	WCHAR szPath[_MAX_PATH+1];
	GetShortPathNameW(lpPath,szPath,_MAX_PATH+1);

	//欠損無くSJISに変換できているかどうかチェックする
	return UtilPathT2A(strA,szPath,false);

#else//defined(_UNICODE)||defined(UNICODE)
	//SJISそのまま
	strA=lpPath;
	return true;
#endif//defined(_UNICODE)||defined(UNICODE)
}
Esempio n. 5
0
BOOL CSetupWnd::LoadWndParameter(CString& strParameter)
{
	CStringArray arData;

	if (!m_edPath)
		return FALSE;

	CString sToken = _T("");
	int i = 0;
	while (AfxExtractSubString(sToken, strParameter, i, ','))
	{
		arData.Add(sToken);
		i++;
	}

	if (arData.GetCount() != $VALUE_MAX)
		return FALSE;
		
	m_btnEnable->SetCheck(_tstoi(arData.GetAt($VALUE_ENABLE)));

	CString strTemp(arData.GetAt($VALUE_PATH));
	strTemp.Replace(L"\\", L"\\\\");
	m_edPath->SetWindowText(strTemp);


	return TRUE;
}
CMyString& CMyString::operator = (const CMyString& str){
	//这种实现不能保证异常安全性,如果内存不够,执行结束后m_pData = NULL
	// if(this == &str){
	// 	return *this;
	// }

	// delete[] m_pData;
	// m_pData = NULL;				//考虑这句的意义

	// m_pData = new char[strlen(str.m_pData) + 1];
	// strcpy(m_pData, str.m_pData);

	// return *this;

	if(this != &str){
		//利用临时变量在作用域后自动释放,同时利用拷贝构造函数创建空间

		CMyString strTemp(str);

		char* tmp = strTemp.m_pData;
		strTemp.m_pData = m_pData;
		m_pData = tmp;
	}

	return *this;
}
// 检测浮点数
// "+73.24745e-363"
BOOL CStringChecker::CheckDouble( LPCTSTR cStr )
{
	char str[] = "^([\\+\\-])?\\d+(\\.\\d+)?([Ee][\\+\\-]?\\d+)?$";
	CString strTemp(cStr);
	strTemp.Trim(' ');
	BOOL b = RegexMatch(strTemp, str);
	//BOOL b = RegexMatch(cStr, str);
	if(!b)
	{
		SetLastErr(TYPE_DOUBLE);
		return FALSE; //"浮点数不合规则";
	}
	std::stringstream ss;
	double n;
	ss << cStr;
	ss >> n;
	if(ss.fail())
	{
		SetLastErr("浮点数越界");
		return FALSE;
	}
	else if(n == numeric_limits<double>::infinity() || n == -numeric_limits<double>::infinity())
	{
		SetLastErr("浮点数越界");
		return FALSE;
	}

	return TRUE; //"";
}
Esempio n. 8
0
std::string StringUtil::WStrToUTF8(const wchar_t* src) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
	int len = WideCharToMultiByte(CP_UTF8, 0, src, -1, NULL, 0, NULL, NULL);
	char* str = new char[len + 1];
	memset(str, 0, len + 1);
	WideCharToMultiByte(CP_UTF8, 0, src, -1, str, len, NULL, NULL);
	std::string strTemp(str);
	if (str) delete[] str;
	return strTemp;
#else
	/*wchar_t *wszString = (wchar_t *)src;

	std::string curLocale = setlocale(LC_ALL, NULL);
	setlocale(LC_ALL, "chs");

	std::wstring ws(wszString);

	const wchar_t *_Source = ws.c_str();
	size_t _Dsize = 2 * ws.size() + 1;

	char *_Dest = new char[_Dsize];
	memset(_Dest, 0, _Dsize);

	wcstombs(_Dest, _Source, _Dsize);

	std::string result = _Dest;
	delete[]_Dest;

	setlocale(LC_ALL, curLocale.c_str());

	return result;*/
	return "";
#endif
}
Esempio n. 9
0
void CMDXProcessPage::InitCycleTime()
{
	m_dCycleTime = m_dInjectionTime + m_dPackTime + m_dCoolTime + m_dMoldOpenTime;

	CString strTemp("");
	strTemp.Format("%.1f", m_dCycleTime);
	GetDlgItem(IDC_EDIT_CYCLE_TIME)->SetWindowText(strTemp);
}
Esempio n. 10
0
void CModelPropPage::SetRefGLAPath(LPCSTR psRefGLAPath)
{
	CString strTemp(psRefGLAPath);
	strTemp.Replace(" ", "");
	strTemp.Replace("\t", "");

	m_RefGLAPath = strTemp;
}
Esempio n. 11
0
void CModelPropPage::AddPCJEntry(LPCSTR psPCJName)
{
	CString strTemp(psPCJName);
			strTemp.Replace(" ","");
			strTemp.Replace("\t","");
			
	m_PCJList.push_back(strTemp);
}
bool OTSocket::HandleReceivingError()
{
	bool bRetVal = false;
	
	switch (errno) {
			// Non-blocking mode was requested and no messages are available at the moment.
		case EAGAIN:
			OTLog::vOutput(0, "OTSocket::HandleReceivingError: Non-blocking mode was requested and no messages are available at the moment. Re-trying...\n");
			bRetVal = true;
			break;
			// The zmq_recv() operation is not supported by this socket type.
		case ENOTSUP:
			OTLog::Error("OTSocket::HandleReceivingError: Failure: The zmq_recv() operation is not supported by this socket type.\n");
			break;
			// The zmq_recv() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.
		case EFSM:
			OTLog::vOutput(0, "OTSocket::HandleReceivingError: The zmq_recv() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. (Deleting socket and listening again...)\n");
		{ OTString strTemp(m_strBindPath); this->Listen(strTemp); }
			break;
			// The ØMQ context associated with the specified socket was terminated.
		case ETERM:
			OTLog::Error("OTSocket::HandleReceivingError: The ØMQ context associated with the specified socket was terminated. (Re-creating the context, and listening again with a new socket...)\n");
			this->NewContext();
		{ OTString strTemp(m_strBindPath); this->Listen(strTemp); }
			break;
			// The provided socket was invalid.
		case ENOTSOCK:
			OTLog::Error("OTSocket::HandleReceivingError: The provided socket was invalid. (Deleting socket and listening again.)\n");
		{ OTString strTemp(m_strBindPath); this->Listen(strTemp); }
			break;
			// The operation was interrupted by delivery of a signal before a message was available.
		case EINTR:
			OTLog::Error("OTSocket::HandleSendingError: The operation was interrupted by delivery of a signal before the message was sent. (Re-trying...)\n");
			bRetVal = true;
			break;
			// The message passed to the function was invalid.
		case EFAULT:
			OTLog::Error("OTSocket::HandleReceivingError: Failure: The message passed to the function was invalid.\n");
			break;
		default:
			OTLog::Error("OTSocket::HandleReceivingError: Default case. Re-trying...\n");
			bRetVal = true;
			break;
	}
	return bRetVal;
}
Esempio n. 13
0
 void getKMaxSim(int K, const char* source="movielens")
 {
     cout << "begin initialization: " << endl;
     char rateStr[256];
     char* pch;    
     vector<float> simArray;
     int itemNum = 0;
     string dst = string(SIM_FILE) + "_kmax";
     std::ifstream from(SIM_FILE);
     ofstream to(dst.c_str());
     if (!from.is_open()) {
         cout << "can't open  operation failed!\n";
         exit(1);
     }
     int itemI = 0, itemJ = 0;
     float sim = 0.0;
     while(from.getline(rateStr,256)){
         string strTemp(rateStr);
         int pos = strTemp.find(":");
         if(-1 != pos) {
             itemJ = itemI; //store the last item
             itemI = atoi(strTemp.substr(0,pos).c_str());
             if(0 == itemJ) {//the first line
                 continue;
             }
             if(0 == itemI ) {
                 cout<<strTemp<<"#####################"<<endl;
                 exit(1);
             }
             float kmaxValue = getKmax(simArray,K); //get the k-max of the last item
             to << itemJ << "\t" << kmaxValue <<endl;
             simArray.clear(); //清空vector,为获取下一个item的k-max similarity做准备    
             ++itemNum;     
             if(itemNum %3000 ==0) {
                 cout<<"read item "<<itemNum<<" sucessfully!"<<endl;
             }
             continue;
         }
         if(strTemp.length() < 3)continue;
         int i = 0;
         pch = strtok (rateStr,RATE_SP);
         while (pch != NULL) {
             if(0 == i) itemJ = atoi(pch);
             else if(1 == i) sim = atof(pch);
             else if(i > 1) break;
             ++i;
             pch = strtok (NULL,RATE_SP);
         }
         if(0 == itemI || 0 == itemJ) {
             cout<<strTemp<<"#####################"<<endl;
             exit(1);
         }        
         simArray.push_back(sim);
     }
     from.close();
     cout<<"end load similarity!"<<endl;
     cout<<"successfully exit!"<<endl;
 }
Esempio n. 14
0
void CButton::updateText()
{
    QFontMetrics qfm(m_TextLabel.font());
    QString strTemp(qfm.elidedText(m_Text,Qt::ElideRight,GetTextWidth()));
    m_TextLabel.setText(strTemp);
    m_TextLabel.setAlignment(Qt::AlignCenter);
    //m_TextLabel.setGeometry((this->width() - m_TextLabel.width()) / 2, (this->height() - m_TextLabel.height()) / 2, m_TextLabel.width(), m_TextLabel.height());
    m_TextLabel.setAttribute(Qt::WA_TranslucentBackground, true);
}
Esempio n. 15
0
void Shortcuts::EditItem(VMenu* Menu, ShortcutItem* Item, bool Root)
{
	string strNewDir = Item->strFolder;
	string strNewPluginModule = Item->strPluginModule;
	string strNewPluginFile = Item->strPluginFile;
	string strNewPluginData = Item->strPluginData;

	DialogBuilder Builder(MFolderShortcutsTitle, HelpFolderShortcuts);
	Builder.AddText(MFSShortcut);
	Builder.AddEditField(&strNewDir, 50, L"FS_Path", DIF_EDITPATH);
	if (!strNewPluginModule.IsEmpty())
	{
		Builder.AddSeparator();
		Builder.AddText(MFSShortcutModule);
		Builder.AddEditField(&strNewPluginModule, 50, nullptr, DIF_READONLY);
		Builder.AddText(MFSShortcutFile);
		Builder.AddEditField(&strNewPluginFile, 50, nullptr, DIF_READONLY);
		Builder.AddText(MFSShortcutData);
		Builder.AddEditField(&strNewPluginData, 50, nullptr, DIF_READONLY);
	}
	Builder.AddOKCancel();

	if (Builder.ShowDialog())
	{
		Unquote(strNewDir);

		if (!IsLocalRootPath(strNewDir))
			DeleteEndSlash(strNewDir);

		bool Save=true;
		string strTemp(strNewDir);
		apiExpandEnvironmentStrings(strNewDir,strTemp);

		if (apiGetFileAttributes(strTemp) == INVALID_FILE_ATTRIBUTES)
		{
			Save=!Message(MSG_WARNING | MSG_ERRORTYPE, 2, MSG(MError), strNewDir, MSG(MSaveThisShortcut), MSG(MYes), MSG(MNo));
		}

		if (Save)
		{
			Item->strPluginData.Clear();
			Item->strPluginFile.Clear();
			Item->strPluginModule.Clear();
			Item->strFolder = strNewDir;

			MenuItemEx* MenuItem = Menu->GetItemPtr();
			MenuItem->strName = Item->strFolder;
			if(Root)
			{
				MakeItemName(Menu->GetSelectPos(), MenuItem);
			}
			Menu->SetPosition(-1, -1, -1, -1);
			Menu->SetUpdateRequired(TRUE);
			Menu->Show();
		}
	}
}
Esempio n. 16
0
 static CString FileNameRemoveSuffix(LPCTSTR szFileName)
 {
     CString strTemp(szFileName);
     int nPos = -1;
     nPos = strTemp.ReverseFind(_T('.'));
     if (-1 == nPos) 
         return strTemp;
     return strTemp.Left(nPos);
 }
Esempio n. 17
0
TCHAR SMaskEdit::ConvertUnicodeAlpha(TCHAR nChar, BOOL bUpperCase) const
{
    SStringT strTemp(nChar);
    if (bUpperCase)
        strTemp.MakeUpper();
    else
        strTemp.MakeLower();

    return strTemp[0];
}
Esempio n. 18
0
void CMDXProcessPage::InitResidenceTime()
{
	double hrV = DataCenter::getInstance().GetHotRunnerVolume();
	m_dResidenceTime = (hrV+m_dPartVolume+m_dColdRunnerVolume)
						/(m_dPartVolume+m_dColdRunnerVolume)
						/m_dVolumeExpansion*m_dCycleTime;
	
	CString strTemp("");
	strTemp.Format("%.1f", m_dResidenceTime);
	GetDlgItem(IDC_EDIT_RESIDENCE_TIME)->SetWindowText(strTemp);
}
Esempio n. 19
0
void CMDXProcessPage::InitMoldOpenTime()
{
	m_dMoldOpenTime = 5.0;
	m_dMoldOpenTime_step = m_dMoldOpenTime * 0.01;
	m_dMoldOpenTime_max = m_dMoldOpenTime * 1.1;
	m_dMoldOpenTime_min = m_dMoldOpenTime * 0.9;

	CString strTemp("");
	strTemp.Format("%.1f", m_dMoldOpenTime);
	GetDlgItem(IDC_EDIT_MOLDOPEN_TIME)->SetWindowText(strTemp);
}
Esempio n. 20
0
 static CString PathToFolderPath(LPCTSTR szFullPath)
 {
     CString strTemp(szFullPath);
     int nPos = -1;
     nPos = strTemp.ReverseFind(_T('\\'));
     if (-1 == nPos)
         nPos = strTemp.ReverseFind(_T('/'));
     if (-1 == nPos)
         return _T("");
     return strTemp.Left(nPos + 1);
 }
Esempio n. 21
0
//重载赋值运算符,参考了剑指offer,考虑到了new新的对象的时候抛出异常的情况,并返回自身引用,实现链式赋值,例如a=b=c等
String & String::operator=(const String & other)
{
	if(this != &other)
	{
		String strTemp(other);   //strTemp为临时对象,超出作用范围的时候将被析构掉
		char *pTemp = other.m_pData;  //此处为"狸猫换太子"
		m_pData = other.m_pData;
		other.m_pData = pTemp;
	}
	return *this;
}
string WChar2Ansi(LPCWSTR pwszSrc)
{
	int nLen = WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, NULL, 0, NULL, NULL);
	if (nLen <= 0) return std::string("");
	char* pszDst = new char[nLen];
	if (NULL == pszDst) return std::string("");
	WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, pszDst, nLen, NULL, NULL);
	pszDst[nLen - 1] = 0;
	std::string strTemp(pszDst);
	delete[] pszDst;
	return strTemp;
}
Esempio n. 23
0
void CMDXProcessPage::InitPackTimeRatio()
{
	//預設為 1:1
	m_iPackTimeRatio_1 = 1;
	m_iPackTimeRatio_2 = 1;

	CString strTemp("");
	strTemp.Format("%d", m_iPackTimeRatio_1);
	GetDlgItem(IDC_EDIT_PACKINGTIME_1)->SetWindowText(strTemp);
	strTemp.Format("%d", m_iPackTimeRatio_2);
	GetDlgItem(IDC_EDIT_PACKINGTIME_2)->SetWindowText(strTemp);
}
Esempio n. 24
0
void CMDXProcessPage::InitPackPressurePercent()
{
	//預設為機器壓力的 70%:40%
	m_iPackPressurePercent_1 = 70;
	m_iPackPressurePercent_2 = 40;

	CString strTemp("");
	strTemp.Format("%d", m_iPackPressurePercent_1);
	GetDlgItem(IDC_EDIT_PACKINGPRESSURE_1)->SetWindowText(strTemp);
	strTemp.Format("%d", m_iPackPressurePercent_2);
	GetDlgItem(IDC_EDIT_PACKINGPRESSURE_2)->SetWindowText(strTemp);
}
Esempio n. 25
0
string OSMapEx::GererateAndInsert(SInt64 lastingTime)
{
	OSMutexLocker mutexLocker(&m_Mutex);
	string  strSessionId;
	do
	{
		strSessionId = OSMapEx::GenerateSessionId();//生成sessionid
	} while (m_Map.find(strSessionId) != m_Map.end());//如果是重复的就一直生成直到不是重复的
	strMapData strTemp(lastingTime + OS::Microseconds(), 0);//0表示自动删除,验证1次就删除
	m_Map.insert(MapType::value_type(strSessionId, strTemp));
	return strSessionId;
}
Esempio n. 26
0
bool OSMapEx::Insert(const string& strSessionId, SInt64 lastingTime)
{
	OSMutexLocker mutexLocker(&m_Mutex);
	if (m_Map.find(strSessionId) != m_Map.end())//已经存在
		return false;
	else
	{
		strMapData strTemp(lastingTime + OS::Microseconds(), 1);//1表示不自动删除,直到超时再删除
		m_Map.insert(MapType::value_type(strSessionId, strTemp));
		return true;
	}
}
Esempio n. 27
0
bool Utils::mkdir(const std::string folder) {
  std::string folder_builder;
  std::string sub;
  sub.reserve(folder.size());
  for (auto it = folder.begin(); it != folder.end(); ++it) {
    const char c = *it;
    sub.push_back(c);
    if (c == PATH_DELIMITER || it == folder.end() - 1) {
      folder_builder.append(sub);
#ifdef OS_WINDOWS
      if (0 != ::_access(folder_builder.c_str(), 0)) {
#else
      if (0 != ::access(folder_builder.c_str(), 0)) {
#endif
        // this folder not exist
#ifdef OS_WINDOWS
        if (0 != ::_mkdir(folder_builder.c_str())) {
#else
        if (0 != ::mkdir(folder_builder.c_str(), S_IRWXU)) {
#endif
          // create failed
          return false;
        }
      }
      sub.clear();
    }
  }
  return true;
}

bool Utils::imwrite(const std::string &file, const cv::Mat &image) {
  auto folder = file.substr(0, utils::get_last_slash(file));
  Utils::mkdir(folder);
  return cv::imwrite(file, image);
}

#ifdef OS_WINDOWS
std::string Utils::utf8_to_gbk(const char* utf8) {
  int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
  wchar_t* wszGBK = new wchar_t[len + 1];
  memset(wszGBK, 0, len * 2 + 2);
  MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wszGBK, len);
  len = WideCharToMultiByte(CP_ACP, 0, wszGBK, -1, NULL, 0, NULL, NULL);
  char* szGBK = new char[len + 1];
  memset(szGBK, 0, len + 1);
  WideCharToMultiByte(CP_ACP, 0, wszGBK, -1, szGBK, len, NULL, NULL);
  std::string strTemp(szGBK);
  if (wszGBK)
    delete[] wszGBK;
  if (szGBK)
    delete[] szGBK;
  return strTemp;
}
CMyString& CMyString::operator=(const CMyString& rhs)
{
    if(this != &rhs)
    {
        CMyString strTemp(rhs);

        char* pTemp = strTemp.m_pData;
        strTemp.m_pData = m_pData;
        m_pData = pTemp;
    }
    return *this;
}
Esempio n. 29
0
 static std::string WChar2Ansi(const String& str )  
 {  
   int nLen = WideCharToMultiByte(CP_ACP, 0, str.c_str(), -1, NULL, 0, NULL, NULL);  
   if (nLen<= 0) return std::string("");  
   char* pszDst = new char[nLen];  
   if (NULL == pszDst) return std::string("");  
   WideCharToMultiByte(CP_ACP, 0, str.c_str(), -1, pszDst, nLen, NULL, NULL);  
   pszDst[nLen -1] = 0;  
   std::string strTemp(pszDst);  
   delete [] pszDst;  
   return strTemp;  
 }  
Esempio n. 30
0
bool CScriptSystem::ReloadScript(const char* sFileName)
{
    CPathID strTemp(sFileName);
    ScriptFileListItor itor = this->findFile(strTemp);

    if (itor == m_dqLoadedFiles.end())
    {
        RaiseError(m_pLS, "Error reloading \"%s\" the file was not loaded", sFileName);
        return false;
    }

    return _ExecuteFile(sFileName);
}