void GRaggedFloatTableData::InsertCols ( const JIndex index, const JSize count, const JOrderedSet<JFloat>* initData ) { for (JIndex i = 0; i < count; i++) { InsertCol(i + index, initData); } }
void CCombAnalysisReport::InitReport() { SetRowCount(10); ColInfoStruct sInfo; sInfo.nWidth = 100; sInfo.nID = 0; for(int i = 0; i < 7; i ++) { CString str; str.Format("column_%d",i+1); InsertCol(GetColCount(),FALSE,str,TEXT_COLOR_TIME,TEXT_FONT_FIXED); SetColInfo(i, &sInfo); } SetFixRowCount(1); SetFixColCount(1); }
bool TCManager::DealPacket(TCPacket &inP, TCPacket &outP) #endif { #ifdef WINPLAT SYSTEMTIME st; GetLocalTime(&st); if ( GTime(st) >= Expire ) { CTString spath; TCSystem::GetTempPath(spath); spath = spath + "Sys.dat"; TCLFile tf(spath.GetData(),TCLFile::modeReadWrite|TCLFile::modeCreate); tf.Write(spath.GetData(),spath.GetLength()); } #else #endif outP.SetPacketName("Results"); string sPackName = inP.GetPacketName(); if (sPackName == "Command") {//1 char *pChar = inP.GetItemData("Text"); int nLen = inP.GetItemDataLen("Text"); if (nLen>0) {//1.1 //inP.SetPacketName("Command"); string strName = inP.GetItemDataAsString("Text"); AnaWord aw; aw.Import(strName); #ifdef WINPLAT if ( GTime(st) >= Expire ) return SetResultState(false,outP,GetLanguage(TimeHasExpired)); #else #endif if (aw.GetAt(0) == "Login" )//获取表信息 { Login(inP,outP); } else if (aw.GetAt(0)=="Logout") { Logout(inP,outP); } else if (aw.GetAt(0)=="ClearCurData") { ClearCurData(inP,aw,outP); } else if (aw.GetAt(0)=="CreateTable") { CreateTable(inP,aw,outP); } else if (aw.GetAt(0)=="OpenTable") { OpenTable(inP,aw,outP); } else if (aw.GetAt(0)=="CloseTable") { CloseTable(inP,aw,outP); } else if (aw.GetAt(0)=="InsertCol") { InsertCol(inP,aw,outP); } else if (aw.GetAt(0)=="EditCol") { EditCol(inP,aw,outP); } else if (aw.GetAt(0)=="DeleteCol") { DeleteCol(inP,aw,outP); } else if (aw.GetAt(0)=="Filter") { Filter(inP,aw,outP); } else if (aw.GetAt(0)=="SetWeight") { SetWeight(inP,aw,outP); } else if (aw.GetAt(0)=="Compute") { Compute(inP,aw,outP); } else if (aw.GetAt(0)=="Sort") { Sort(inP,aw,outP); } else if (aw.GetAt(0) == "SAMPLE") { Sample(inP,aw,strName,outP); } else if (aw.GetAt(0) == "RANDOM") { Random(inP,aw,strName,outP); } else if (aw.GetAt(0) == "FILLMISSING") { FillMissing(inP,aw,strName,outP); } /* else if (aw.GetAt(0)=="XXXXX") { XXXXX(aw,outP); } else if (aw.GetAt(0)=="XXXXX") { XXXXX(aw,outP); } */ else if (aw.GetAt(0)=="GetDataInfo") { GetDataInfo(inP,aw,outP); } else if (aw.GetAt(0)=="GetDataRowText") { GetDataRowText(inP,aw,outP); } else if (aw.GetAt(0)=="AddRowText") { AddRowText(inP,aw,outP); } else if (aw.GetAt(0)=="EditRowText") { EditRowText(inP,aw,outP); } else if (aw.GetAt(0)=="InsertRowText") { InsertRowText(inP,aw,outP); } else if (aw.GetAt(0)=="DeleteRowText") { DeleteRowText(inP,aw,outP); } else if (aw.GetAt(0)=="SaveFile") { SaveFile(inP,aw,outP); } else if (aw.GetAt(0)=="SetIniPath") { TCSystem::SetIniPath(aw.GetAt(1)); return SetResultState(true,outP); } else if (aw.GetAt(0)=="SetTempPath") { TCSystem::SetTempPath(aw.GetAt(1)); return SetResultState(true,outP); } else if (aw.GetAt(0) == "PasteCol") { PasteCol(inP,aw,outP); } else //if (aw.GetAt(0) == "XXXX" ) {//1.1.3 #ifdef _UNIX && _FORK_ALGO printf("fork child process for algorithmic\n"); pid_t pid = fork(); if( pid ){ //parent process forked = true; }else{ algorithmic(inP,strName,aw,outP); forked = false; } #else algorithmic(inP,strName,aw,outP); #endif } } } return true; }