コード例 #1
0
ファイル: tpdf_get.cpp プロジェクト: etihwnad/toped
int tellstdfunc::stdGETLAYREFSTR::execute()
{
   telldata::TtLayout* tx = static_cast<telldata::TtLayout*>(OPstack.top());OPstack.pop();
   if ((laydata::_lmref != tx->data()->lType()) && (laydata::_lmaref != tx->data()->lType()))
   {
      tellerror(std::string("Runtime error.Invalid layout type")); // FIXME?! tellerror is a parser function. MUST not be used during runtime
      delete tx;
      return EXEC_ABORT;
   }
   else
   {
      OPstack.push(DEBUG_NEW telldata::TtString(static_cast<laydata::TdtCellRef*>(tx->data())->cellname()));
      delete tx;
      return EXEC_NEXT;
   }
}
コード例 #2
0
int tellstdfunc::stdGETLAYREFSTR::execute()
{
   telldata::ttlayout* tx = static_cast<telldata::ttlayout*>(OPstack.top());OPstack.pop();
   if ((laydata::_lmref != tx->data()->ltype()) && (laydata::_lmaref != tx->data()->ltype()))
   {
      tellerror("Runtime error.Invalid layout type");
      delete tx;
      return EXEC_ABORT;
   }
   else
   {
      OPstack.push(DEBUG_NEW telldata::ttstring(static_cast<laydata::tdtcellref*>(tx->data())->cellname()));
      delete tx;
      return EXEC_NEXT;
   }
}
コード例 #3
0
//=============================================================================
int parsercmd::cmdASSIGN::execute() {
   TELL_DEBUG(cmdREALASSIGN);
   telldata::tell_var *op = OPstack.top();OPstack.pop();
   telldata::typeID typeis = _var->get_type();
   if (TLISALIST(typeis)) {
      typeis = typeis & ~telldata::tn_listmask;
   }
   if ((TLCOMPOSIT_TYPE(typeis)) && (NULL == CMDBlock->getTypeByID(typeis)))
      tellerror("Bad or unsupported type in assign statement");
   else {
      _var->assign(op); OPstack.push(_var->selfcopy());
   }
   delete op;
   return EXEC_NEXT;

}