/*---------------- 读取dstbase.txt文件-Begin --------------*/
vector<string>vctFile_dstbase;
DATASTREAMoneDataStream;
OpenFile2Vector("E:\\Project\\Daewoo\\dstbase.txt",vctFile_dstbase);
for(inti = 0;i < vctFile_dstbase.size();i++)
{
strings = vctFile_dstbase[i];
if(s.find("[DATASTREAM]")< s.length())//一块内容的开始
{
flag= 1;
oneDataStream.Index= s.substr(8,4);//取得索引号
continue;
}
if(flag)
{
stringstrTmp = s.substr(s.find_first_of("=") + 1,-1);
stringstrTmp1 = strTmp.substr(0,strTmpn)
{
oneDSChildMenu.DStreamCmd= strTmp1;
}
elseif(s.find("ItemNum") < len)
{
oneDSChildMenu.ItemNum= String2Int(strTmp1);
}
elseif(s.find("Item") < len)
{
oneDSChildMenu.vct_Item.push_back(strTmp1);
if(oneDSChildMenu.vct_Item.size()== oneDSChildMenu.ItemNum)
{
break;
}
}
elseif(s.find("MenuNum") < len)
{
oneDSChildMenu.MenuNum= String2Int(strTmp1);
}
elseif(s.find("Menu") < len)
{
oneDSChildMenu.vct_menu.push_back(strTmp.substr(0,6));
if(oneDSChildMenu.vct_menu.size()== oneDSChildMenu.MenuNum)
{
break;
}
}
}
oneDataStream.m_DSChildMenu[oneDSChildMenu.Index]= oneDSChildMenu;
}
}
if(s[0]== '"')//一块内容的结束
{
m_DataStream[oneDataStream.Index]= oneDataStream;
DataStream_Init(oneDataStream);
flag= 0;
}
}