当前位置: 首页>>代码示例>>C++>>正文


C++ TILx类代码示例

本文整理汇总了C++中TILx的典型用法代码示例。如果您正苦于以下问题:C++ TILx类的具体用法?C++ TILx怎么用?C++ TILx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TILx类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LoadTxtExp

PExp TExp::LoadTxtExp(TILx& Lx, const TFSet& Expect){
  PExp Exp=LoadTxtRelExp(Lx, TFSet(Expect)|syQuestion);
  if (Lx.Sym==syQuestion){
    TExpOp ExpOp=GetExpOpFromLxSym(Lx.Sym);
    Lx.GetSym(ExpExpect);
    PExp ThenExp=LoadTxtExp(Lx, TFSet()|syColon);
    Lx.GetSym(ExpExpect);
    PExp ElseExp=LoadTxtExp(Lx, Expect);
    Exp=PExp(new TExp(ExpOp, Exp, ThenExp, ElseExp));
  }
  return Exp;
}
开发者ID:Accio,项目名称:snap,代码行数:12,代码来源:exp.cpp

示例2: LoadTxt

PSchObj TSchObj::LoadTxt(TILx& Lx){
  PSchObj SchObj=PSchObj(new TSchObj());
  Lx.GetVar("SchObj", true, true);
  // Nm
  SchObj->Nm=Lx.GetVarStr("Nm");
  // TaskV
  Lx.GetVar("TaskV", true, true);
  while (!Lx.PeekVarEnd(true, true)){
    PSchTask Task=TSchTask::LoadTxt(Lx);
    SchObj->TaskV.Add(TTmTaskKd(Task->GetStartTm(), Task));
  }
  Lx.GetVarEnd(true, true);
  Lx.GetVarEnd(true, true);
  return SchObj;
}
开发者ID:mkarlovc,项目名称:gcentralization,代码行数:15,代码来源:ssch.cpp

示例3: LoadTxtAddExp

PExp TExp::LoadTxtAddExp(TILx& Lx, const TFSet& Expect){
  TExpOp PrefExpOp=eoUndef;
  if (Lx.Sym==syPlus){PrefExpOp=eoUPlus; Lx.GetSym(MulExpExpect);}
  else if (Lx.Sym==syMinus){PrefExpOp=eoUMinus; Lx.GetSym(MulExpExpect);}
  PExp Exp=LoadTxtMulExp(Lx, TFSet(Expect)|AddOpSymSet);
  if (PrefExpOp!=eoUndef){
    Exp=PExp(new TExp(PrefExpOp, Exp));}
  while (AddOpSymSet.In(Lx.Sym)){
    TExpOp ExpOp=GetExpOpFromLxSym(Lx.Sym);
    Lx.GetSym(MulExpExpect);
    PExp RExp=LoadTxtMulExp(Lx, TFSet(Expect)|AddOpSymSet);
    Exp=PExp(new TExp(ExpOp, Exp, RExp));
  }
  return Exp;
}
开发者ID:Accio,项目名称:snap,代码行数:15,代码来源:exp.cpp

示例4: LoadTxtRelExp

PExp TExp::LoadTxtRelExp(TILx& Lx, const TFSet& Expect){
  PExp Exp=LoadTxtAddExp(Lx, TFSet(Expect)|RelOpSymSet);
  if (RelOpSymSet.In(Lx.Sym)){
    TExpOp ExpOp=GetExpOpFromLxSym(Lx.Sym);
    Lx.GetSym(AddExpExpect);
    PExp RExp=LoadTxtAddExp(Lx, Expect);
    Exp=PExp(new TExp(ExpOp, Exp, RExp));
  }
  return Exp;
}
开发者ID:Accio,项目名称:snap,代码行数:10,代码来源:exp.cpp

示例5: LoadTxtMulExp

PExp TExp::LoadTxtMulExp(TILx& Lx, const TFSet& Expect){
  PExp Exp=LoadTxtFact(Lx, TFSet(Expect)|MulOpSymSet);
  while (MulOpSymSet.In(Lx.Sym)){
    TExpOp ExpOp=GetExpOpFromLxSym(Lx.Sym);
    Lx.GetSym(FactExpExpect);
    PExp RExp=LoadTxtFact(Lx, TFSet(Expect)|MulOpSymSet);
    Exp=PExp(new TExp(ExpOp, Exp, RExp));
  }
  return Exp;
}
开发者ID:Accio,项目名称:snap,代码行数:10,代码来源:exp.cpp

示例6: ParseTup

TPlVal TPlBs::ParseTup(TILx& Lx, const TFSet& Expect, const PPlBs& PlBs){
  IAssert(TupExpect.In(Lx.Sym));
  int FuncId=PlBs->AtomH.AddKey(Lx.Str);
  TPlValV ValV;
  Lx.GetSym(syLParen);
  Lx.GetSym(ExpExpect);
  TPlVal Val=ParseExp(Lx, TFSet()|syComma|syRParen, PlBs);
  ValV.Add(Val);
  while (Lx.Sym==syComma){
    Lx.GetSym(ExpExpect);
    Val=ParseExp(Lx, TFSet()|syComma|syRParen, PlBs);
    ValV.Add(Val);
  }
  Lx.GetSym(Expect);
  // create and store tuple
  PPlTup Tup=TPlTup::New(FuncId, ValV);
  int TupId=PlBs->AddTup(Tup);
  TPlVal TupVal; TupVal.PutTupId(TupId);
  return TupVal;
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:20,代码来源:prolog.cpp

示例7: ParseExp

TPlVal TPlBs::ParseExp(TILx& Lx, const TFSet& Expect, const PPlBs& PlBs){
  IAssert(ExpExpect.In(Lx.Sym));
  TPlVal PlVal;
  if (Lx.Sym==syInt){
    PlVal.PutInt(Lx.Int);
    Lx.GetSym(Expect);
  } else
  if (Lx.Sym==syFlt){
    PlVal.PutFlt(Lx.Flt);
    Lx.GetSym(Expect);
  } else
  if (Lx.Sym==syStr){
    if (Lx.PeekSym()==syLParen){
      Fail;
    } else {
      int AtomId=PlBs->AtomH.AddKey(Lx.Str);
      PlVal.PutAtomId(AtomId);
      Lx.GetSym(Expect);
    }
  } else {
    Fail;
  }
  return PlVal;
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:24,代码来源:prolog.cpp

示例8: LoadTxtFact

PExp TExp::LoadTxtFact(TILx& Lx, const TFSet& Expect){
  PExp Exp;
  switch (Lx.Sym){
    case syFlt:{
      PExpVal ExpVal=TExpVal::New(Lx.Flt);
      Exp=PExp(new TExp(ExpVal));
      Lx.GetSym(Expect);
      break;}
    case syIdStr:{
      TStr ExpNm=Lx.Str;
      Lx.GetSym(TFSet(Expect)|syLParen);
      if (Lx.Sym==syLParen){
        TExpV ArgExpV;
        Lx.GetSym(TFSet(ExpExpect)|syRParen);
        while (Lx.Sym!=syRParen){
          if (Lx.Sym==syComma){Lx.GetSym(ExpExpect);}
          PExp ArgExp=LoadTxtExp(Lx, TFSet()|syComma|syRParen);
          ArgExpV.Add(ArgExp);
        }
        Lx.GetSym(Expect);
        Exp=PExp(new TExp(ExpNm, ArgExpV));
      } else {
        Exp=PExp(new TExp(ExpNm));
      }
      break;}
    case syQStr:{
      PExpVal ExpVal=TExpVal::New(Lx.Str);
      Exp=PExp(new TExp(ExpVal));
      Lx.GetSym(Expect);
      break;}
    case syLParen:{
      Lx.GetSym(ExpExpect);
      Exp=LoadTxtExp(Lx, TFSet()|syRParen);
      Exp->IsParen=true;
      Lx.GetSym(Expect);
      break;}
    default: Fail;
  }
  return Exp;
}
开发者ID:Accio,项目名称:snap,代码行数:40,代码来源:exp.cpp

示例9: GetValFromLx

PJsonVal TJsonVal::GetValFromLx(TILx& Lx){
  static TFSet ValExpect=TFSet()|syIdStr|syFlt|syQStr|syLBracket|syLBrace|syRBracket;
  PJsonVal Val=TJsonVal::New();
  if ((Lx.Sym==syIdStr)&&(Lx.Str=="null")){
    Val->PutNull(); Lx.GetSym();
  } else if ((Lx.Sym==syIdStr)&&(Lx.Str=="true")){
    Val->PutBool(true); Lx.GetSym();
  } else if ((Lx.Sym==syIdStr)&&(Lx.Str=="false")){
    Val->PutBool(false); Lx.GetSym();
  } else if (Lx.Sym==syFlt){
    Val->PutNum(Lx.Flt); Lx.GetSym();
  } else if (Lx.Sym==syQStr){
    Val->PutStr(Lx.Str); Lx.GetSym();
  } else if (Lx.Sym==syLBracket){
    Val->PutArr(); Lx.GetSym(ValExpect); // added ValExpect to correctly parse arrays of floats
    if (Lx.Sym!=syRBracket){
      forever{
        PJsonVal SubVal=TJsonVal::GetValFromLx(Lx);
        Val->AddToArr(SubVal);
        if (Lx.Sym==syComma){Lx.GetSym(ValExpect);}
        else if (Lx.Sym==syRBracket){break;}
        else {TExcept::Throw("JSON Array not properly formed.");}
      }
    }
开发者ID:lstopar,项目名称:qminer,代码行数:24,代码来源:json.cpp

示例10: ParseAndExeCmLn

void TWebTxtBsTrmSrv::ParseAndExeCmLn(
 const int& CltSockId, TILx& Lx, bool& SendMsgToClt, TChA& MsgChA){
  SendMsgToClt=true;
  if (Lx.UcStr=="TRALALA"){
    MsgChA+=TStr("Hopsasa")+Lx.GetStrToEoln()+"!\r\n";
  } else
  if (Lx.UcStr=="SYSECHO"){
    TStr SysMsgStr=Lx.GetStrToEoln(true).GetUc();
    if (SysMsgStr=="ACCEPT"){
      MsgChA+="\r\n";
      MsgChA+=TStr("      Welcome at WebBird/WebFly Index Engine (V1.0)!\r\n");
      //MsgChA+=TStr("          From:")+GetPeerIpNum()(CltSockId)+"\r\n";
      MsgChA+=TStr("          Time:")+TSecTm::GetCurTm().GetStr()+"\r\n";
      MsgChA+="\r\n";
    } else
    if (SysMsgStr=="CLOSE"){
      SendMsgToClt=false;
    } else {
      MsgChA+=SysMsgStr; MsgChA+="\r\n";
    }
  } else
  if (Lx.UcStr=="ECHO"){
    MsgChA+=Lx.GetStrToEoln(true);
  } else
  if (Lx.UcStr=="HELP"){
    Lx.GetSym(syEof);
    MsgChA+=GetHelpStr();
  } else
  if (Lx.UcStr=="MEM"){
    Lx.GetSym(syEof);
    PSysMemStat MemStat=PSysMemStat(new TSysMemStat());
    MsgChA+=MemStat->GetInfoStr();
  } else
  if (Lx.UcStr=="QUIT"){
    Lx.GetSym(syEof);
    CloseClt(CltSockId);
    SendMsgToClt=false;
  } else
  if (Lx.UcStr=="SET"){
    PPp WebTxtBsPp=WebTxtBs->GetPp();
    Lx.GetSym(syIdStr, syEof);
    if (Lx.Sym==syIdStr){
      TStr PpNm=Lx.UcStr; PPp Pp;
      if (WebTxtBsPp->IsPp(PpNm, Pp)){
        Lx.GetSym(syIdStr, syQStr, syInt, syEof);
        if (Lx.Sym==syEof){
          MsgChA+=Pp->GetStr();
        } else
        if (((Lx.Sym==syIdStr)||(Lx.Sym==syQStr))&&(Pp->GetTag()==ptStr)){
          Pp->PutValStr(Lx.Str);
        } else
        if ((Lx.Sym==syInt)&&(Pp->GetTag()==ptInt)){
          Pp->PutValInt(Lx.Int);
        } else {
          MsgChA+="Error: Bad value type.\r\n";
        }
      } else {
        MsgChA+=TStr("Error: Property '")+PpNm+"' not defined.\r\n";
      }
    } else
    if (Lx.Sym==syEof){
      MsgChA+=WebTxtBsPp->GetStr();
    } else {
      Fail;
    }
  } else
  if (Lx.UcStr=="NEW"){
    Lx.GetSym(syEof);
    TStr FPath; TStr Nm; GetWebTxtBsPp_FPath_Nm(FPath, Nm);
    WebTxtBs->TxtBsNew(Nm, FPath);
  } else
  if (Lx.UcStr=="OPEN"){
    Lx.GetSym(syEof);
    TStr FPath; TStr Nm; GetWebTxtBsPp_FPath_Nm(FPath, Nm);
    WebTxtBs->TxtBsOpenForUpdate(Nm, FPath);
  } else
  if (Lx.UcStr=="CLOSE"){
    Lx.GetSym(syEof);
    WebTxtBs->TxtBsClose();
  } else
  if (Lx.UcStr=="DEL"){
    Lx.GetSym(syEof);
    TStr FPath; TStr Nm; GetWebTxtBsPp_FPath_Nm(FPath, Nm);
    WebTxtBs->TxtBsDel(Nm, FPath);
  } else
  if (Lx.UcStr=="START"){
    Lx.GetSym(syEof);
    TStr FPath; TStr Nm; GetWebTxtBsPp_FPath_Nm(FPath, Nm);
    TStr WebFilterFNm; GetWebTxtBsPp_WebFilterFNm(WebFilterFNm);
    WebTxtBs->FetchStart(Nm, FPath, WebFilterFNm);
  } else
  if (Lx.UcStr=="STOP"){
    Lx.GetSym(syEof);
    WebTxtBs->FetchStop();
  } else
  if (Lx.UcStr=="CONT"){
    Lx.GetSym(syEof);
    TStr FPath; TStr Nm; GetWebTxtBsPp_FPath_Nm(FPath, Nm);
    WebTxtBs->FetchContinue(Nm, FPath);
  } else
//.........这里部分代码省略.........
开发者ID:mkarlovc,项目名称:gcentralization,代码行数:101,代码来源:webtxtbs.cpp

示例11: LoadTxt

TSecTm TSecTm::LoadTxt(TILx& Lx){
  return TSecTm(Lx.GetInt());
}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:3,代码来源:tm.cpp


注:本文中的TILx类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。