⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsacdobject.cpp

📁 dsacd_ivr 的实现
💻 CPP
📖 第 1 页 / 共 2 页
字号:

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Condition=" + pInfo->Condition + ";");
	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDMatch::ReadformFile(const CString &buf, dsMM_INFO *pInfo, CString &csItemText)
{
	pInfo->Condition = buf.Mid(buf.Find("Condition")+10, buf.Find("Comment")-buf.Find("Condition")-11);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if ((pInfo->Condition == "")&&(pInfo->Comment == ""))
		csItemText = "分支匹配: 空" ;
	else if (pInfo->Condition == "")
		csItemText = "分支匹配: 空 {" + pInfo->Comment + "}";
	else if (pInfo->Comment == "")
		csItemText = "分支匹配: " + pInfo->Condition;
	else
		csItemText = "分支匹配: " + pInfo->Condition + " {" + pInfo->Comment + "}";
}

//	循环控制语句中的文件读写
void dsACDCirculate::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Condition=" + pInfo->Condition + ";");
	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDCirculate::ReadformFile(const CString &buf, dsCir_INFO *pInfo, CString &csItemText)
{
	pInfo->Condition = buf.Mid(buf.Find("Condition")+10, buf.Find("Comment")-buf.Find("Condition")-11);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if ((pInfo->Condition == "")&&(pInfo->Comment == ""))
		csItemText = "循环控制: 空" ;
	else if (pInfo->Condition == "")
		csItemText = "循环控制: 空 {" + pInfo->Comment + "}";
	else if (pInfo->Comment == "")
		csItemText = "循环控制: " + pInfo->Condition;
	else
		csItemText = "循环控制: " + pInfo->Condition + " {" + pInfo->Comment + "}";
}

//	程序块语句中的文件读写
void dsACDFunction::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDFunction::ReadformFile(const CString &buf, dsFun_INFO *pInfo, CString &csItemText)
{
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if (pInfo->Comment == "")
		csItemText = "程序块";
	else
		csItemText = "程序块 {" + pInfo->Comment + "}";
}

//	标号位置语句中的文件读写
void dsACDSign::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Name=" + pInfo->Name + ";");
	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDSign::ReadformFile(const CString &buf, dsSig_INFO *pInfo, CString &csItemText)
{
	pInfo->Name = buf.Mid(buf.Find("Name")+5, buf.Find("Comment")-buf.Find("Name")-6);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if (pInfo->Comment == "")
		csItemText = "标号位置:" + pInfo->Name ;
	else
		csItemText = "标号位置:" + pInfo->Name + " {" + pInfo->Comment + "}";
}

//	跳转语句中的文件读写
void dsACDJump::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "SignPos=" + pInfo->SignPos + ";");
	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDJump::ReadformFile(const CString &buf, dsJmp_INFO *pInfo, CString &csItemText)
{
	pInfo->SignPos = buf.Mid(buf.Find("SignPos")+8, buf.Find("Comment")-buf.Find("SignPos")-9);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if (pInfo->Comment == "")
		csItemText = "跳转语句:" + pInfo->SignPos ;
	else
		csItemText = "跳转语句:" + pInfo->SignPos + " {" + pInfo->Comment + "}";
}

//	结束流程语句中的写文件操作
void dsACDEndFlow::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString(str + ":");

	str.Format("%d",flag);
	m_IOFile.WriteString( "Flag=" + str + ";\n");
}

//	重新开始语句中的写文件操作
void dsACDRestart::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString(str + ":");

	str.Format("%d",flag);
	m_IOFile.WriteString( "Flag=" + str + ";\n");
}

//	变量运算语句中的文件读写
void dsACDOperate::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Result=" + pInfo->Result + ";");
	m_IOFile.WriteString( "OpeType=" + pInfo->OpeType + ";");
	m_IOFile.WriteString( "DestVar=" + pInfo->DestVar + ";");
	m_IOFile.WriteString( "SrcVar=" + pInfo->SrcVar + ";");
	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDOperate::ReadformFile(const CString &buf, dsVO_INFO *pInfo, CString &csItemText)
{
	pInfo->Result = buf.Mid(buf.Find("Result")+7, buf.Find("OpeType")-buf.Find("Result")-8);
	pInfo->OpeType = buf.Mid(buf.Find("OpeType")+8, buf.Find("DestVar")-buf.Find("OpeType")-9);
	pInfo->DestVar = buf.Mid(buf.Find("DestVar")+8, buf.Find("SrcVar")-buf.Find("DestVar")-9);
	pInfo->SrcVar = buf.Mid(buf.Find("SrcVar")+7, buf.Find("Comment")-buf.Find("SrcVar")-8);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if (pInfo->Comment != "")
		csItemText = "变量运算:" + pInfo->Result + " = " + pInfo->DestVar + " " + pInfo->OpeType + " " + pInfo->SrcVar + " {" + pInfo->Comment + "}";
	else 
		csItemText = "变量运算:" + pInfo->Result + " = " + pInfo->DestVar + " " + pInfo->OpeType + " " + pInfo->SrcVar;
}

//	文字转换语句中的文件读写
void dsACDConvert::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Variable=" + pInfo->Variable + ";");
	m_IOFile.WriteString( "Type=" + pInfo->Type + ";");

	str.Format("%d",pInfo->SubstrPlace);
	m_IOFile.WriteString( "SubstrPlace=" + str + ";");

	str.Format("%d",pInfo->SubstrLength);
	m_IOFile.WriteString( "SubstrLength=" + str + ";");

	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDConvert::ReadformFile(const CString &buf, dsChar_INFO *pInfo, CString &csItemText)
{
	pInfo->Variable = buf.Mid(buf.Find("Variable")+9, buf.Find("Type")-buf.Find("Variable")-10);
	pInfo->Type = buf.Mid(buf.Find("Type")+5, buf.Find("SubstrPlace")-buf.Find("Type")-6);
	pInfo->SubstrPlace = atoi(buf.Mid(buf.Find("SubstrPlace")+12, buf.Find("SubstrLength")-buf.Find("SubstrPlace")-13));
	pInfo->SubstrLength = atoi(buf.Mid(buf.Find("SubstrLength")+13, buf.Find("Comment")-buf.Find("SubstrLength")-14));
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	CString str1, str2;
	if (pInfo->Type != "取子串(部分文字)")
	{
		str1 = "";	str2 = "";
	}
	else
	{
		str1.Format("%d",pInfo->SubstrPlace);
		str2.Format("%d",pInfo->SubstrLength);
	}

	if (pInfo->Comment != "")
		csItemText = "文字转换:" + pInfo->Variable + " " + pInfo->Type + " " + str1 + " " + str2 + " {" + pInfo->Comment + "}";
	else 
		csItemText = "文字转换:" + pInfo->Variable + " " + pInfo->Type + " " + str1 + " " + str2;
}

//	日期时间语句中的文件读写
void dsACDDateTime::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "Variable=" + pInfo->Variable + ";");
	m_IOFile.WriteString( "Style=" + pInfo->Style + ";");
	m_IOFile.WriteString( "Type=" + pInfo->Type + ";");
	m_IOFile.WriteString( "Comment=" + pInfo->Comment + "\n");
}
void dsACDDateTime::ReadformFile(const CString &buf, dsDT_INFO *pInfo, CString &csItemText)
{
	pInfo->Variable = buf.Mid(buf.Find("Variable")+9, buf.Find("Style")-buf.Find("Variable")-10);
	pInfo->Style = buf.Mid(buf.Find("Style")+6, buf.Find("Type")-buf.Find("Style")-7);
	pInfo->Type = buf.Mid(buf.Find("Type")+5, buf.Find("Comment")-buf.Find("Type")-6);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("Comment")-8);

	if (pInfo->Comment != "")
		csItemText = "日期时间:" + pInfo->Variable + " " + pInfo->Style + " " + pInfo->Type + " {" + pInfo->Comment + "}";
	else 
		csItemText = "日期时间:" + pInfo->Variable + " " + pInfo->Style + " " + pInfo->Type ;
}

//	数据库操作语句中的文件读写
void dsACDDBOperate::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "DB_CONNECT=" + pInfo->Name + ";");
	m_IOFile.WriteString( "OPE_TYPE=" + pInfo->Type + ";");
	m_IOFile.WriteString( "PLACE_VAR=" + pInfo->Variable + ";");
	m_IOFile.WriteString( "DB_COMMENT=" + pInfo->Comment + "\n");
}
void dsACDDBOperate::ReadformFile(const CString &buf, dsDBOpe_INFO *pInfo, CString &csItemText)
{
	pInfo->Name = buf.Mid(buf.Find("DB_CONNECT")+11, buf.Find("OPE_TYPE")-buf.Find("DB_CONNECT")-12);
	pInfo->Type = buf.Mid(buf.Find("OPE_TYPE")+9, buf.Find("PLACE_VAR")-buf.Find("OPE_TYPE")-10);
	pInfo->Variable = buf.Mid(buf.Find("PLACE_VAR")+10, buf.Find("DB_COMMENT")-buf.Find("PLACE_VAR")-11);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("DB_COMMENT")-11);

	if (pInfo->Comment != "")
		csItemText = "数据库操作:" + pInfo->Name + " " + pInfo->Type + " " + pInfo->Variable + " {" + pInfo->Comment + "}";
	else 
		csItemText = "数据库操作:" + pInfo->Name + " " + pInfo->Type + " " + pInfo->Variable ;
}

//	取字段值语句中的文件读写
void dsACDGetField::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "DB_CONNECT=" + pInfo->Name + ";");
	m_IOFile.WriteString( "DB_FIELD=" + pInfo->Field + ";");
	m_IOFile.WriteString( "SAVE_VAR=" + pInfo->Variable + ";");
	m_IOFile.WriteString( "DB_COMMENT=" + pInfo->Comment + "\n");
}
void dsACDGetField::ReadformFile(const CString &buf, dsField_INFO *pInfo, CString &csItemText)
{
	pInfo->Name = buf.Mid(buf.Find("DB_CONNECT")+11, buf.Find("DB_FIELD")-buf.Find("DB_CONNECT")-12);
	pInfo->Field = buf.Mid(buf.Find("DB_FIELD")+9, buf.Find("SAVE_VAR")-buf.Find("DB_FIELD")-10);
	pInfo->Variable = buf.Mid(buf.Find("SAVE_VAR")+9, buf.Find("DB_COMMENT")-buf.Find("SAVE_VAR")-10);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("DB_COMMENT")-11);

	if (pInfo->Comment != "")
		csItemText = "取字段值:" + pInfo->Name + " " + pInfo->Field + " " + pInfo->Variable + " {" + pInfo->Comment + "}";
	else 
		csItemText = "取字段值:" + pInfo->Name + " " + pInfo->Field + " " + pInfo->Variable ;
}

//	设置查询命令语句中的文件读写
void dsACDQueryCommand::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "DB_CONNECT=" + pInfo->Name + ";");
	m_IOFile.WriteString( "CMD_TYPE=" + pInfo->Type + ";");
	m_IOFile.WriteString( "CMD_CONTENT=" + pInfo->Content + ";");
	m_IOFile.WriteString( "DB_COMMENT=" + pInfo->Comment + "\n");
}
void dsACDQueryCommand::ReadformFile(const CString &buf, dsQC_INFO *pInfo, CString &csItemText)
{
	pInfo->Name = buf.Mid(buf.Find("DB_CONNECT")+11, buf.Find("CMD_TYPE")-buf.Find("DB_CONNECT")-12);
	pInfo->Type = buf.Mid(buf.Find("CMD_TYPE")+9, buf.Find("CMD_CONTENT")-buf.Find("CMD_TYPE")-10);
	pInfo->Content = buf.Mid(buf.Find("CMD_CONTENT")+12, buf.Find("DB_COMMENT")-buf.Find("CMD_CONTENT")-13);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("DB_COMMENT")-11);

	if (pInfo->Comment != "")
		csItemText = "设置查询命令:" + pInfo->Name + " " + pInfo->Type + " " + pInfo->Content + " {" + pInfo->Comment + "}";
	else 
		csItemText = "设置查询命令:" + pInfo->Name + " " + pInfo->Type + " " + pInfo->Content ;
}

//	设置查询参数语句中的文件读写
void dsACDQueryParameter::WritetoFile (CStdioFile& m_IOFile, int flag)
{
	CString str;
	str.Format("%x",nID);
	m_IOFile.WriteString( str + ":" );

	str.Format("%d",flag);		
	m_IOFile.WriteString( "Flag=" + str + ";");

	m_IOFile.WriteString( "DB_CONNECT=" + pInfo->Name + ";");
	m_IOFile.WriteString( "DB_PARAMETER=" + pInfo->Parameter + ";");
	m_IOFile.WriteString( "PAR_VALUE=" + pInfo->Value + ";");
	m_IOFile.WriteString( "DB_COMMENT=" + pInfo->Comment + "\n");
}
void dsACDQueryParameter::ReadformFile(const CString &buf, dsQP_INFO *pInfo, CString &csItemText)
{
	pInfo->Name = buf.Mid(buf.Find("DB_CONNECT")+11, buf.Find("DB_PARAMETER")-buf.Find("DB_CONNECT")-12);
	pInfo->Parameter = buf.Mid(buf.Find("DB_PARAMETER")+13, buf.Find("PAR_VALUE")-buf.Find("DB_PARAMETER")-14);
	pInfo->Value = buf.Mid(buf.Find("PAR_VALUE")+10, buf.Find("DB_COMMENT")-buf.Find("PAR_VALUE")-11);
	pInfo->Comment = buf.Right(buf.GetLength()-buf.Find("DB_COMMENT")-11);

	if (pInfo->Comment != "")
		csItemText = "设置查询参数:" + pInfo->Name + " " + pInfo->Parameter + " " + pInfo->Value + " {" + pInfo->Comment + "}";
	else 
		csItemText = "设置查询参数:" + pInfo->Name + " " + pInfo->Parameter + " " + pInfo->Value ;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -