• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ settable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: pulsesequence

void pulsesequence()
{
   double          j1xh,
		   pwxlvl,
		   pwx,
		   tau;

   pwxlvl = getval("pwxlvl");
   pwx = getval("pwx");
   j1xh = getval("j1xh");
   tau = 1.0 / (2.0*j1xh);

  settable(t1, 4, ph1);
  settable(t2, 4, ph2);
  getelem(t1, ct, v1);
  getelem(t2, ct, oph);

/* BEGIN ACTUAL PULSE SEQUENCE CODE */
   status(A);
      decpower(pwxlvl);
      delay(d1);

   status(B);

      rgpulse(pw, zero, rof1, rof1);
      delay(tau - (2*pw/PI) - 2*rof1);
      simpulse(2*pw,pwx,v1,zero,rof1,rof2);
      decpower(dpwr);
      delay(tau - POWER_DELAY);

   status(C);
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:32,代码来源:pwxcalib.c


示例2: pulsesequence

pulsesequence() {

// Define Variables and Objects and Get Parameter Values
   MPSEQ dec = getblew("blewH",0,0.0,0.0,0,1);
   strncpy(dec.ch,"dec",3);
   putCmd("chHblew='dec'\n");

   CP hx = getcp("HX",0.0,0.0,0,1);
   strncpy(hx.fr,"dec",3);
   strncpy(hx.to,"obs",3);
   putCmd("frHX='dec'\n");
   putCmd("toHX='obs'\n");

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwH90") + getval("tHX") + getval("rd") + getval("ad") + at;
   d.dutyoff = d1 + 4.0e-6;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phH90,4,table1);
   settable(phXhx,4,table2);
   settable(phHhx,4,table3);
   settable(phRec,4,table4);
   setreceiver(phRec);

// Begin Sequence

   txphase(phXhx); decphase(phH90);
   obspwrf(getval("aXhx")); decpwrf(getval("aH90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// H to X Cross Polarization

   decrgpulse(getval("pwH90"),phH90,0.0,0.0);
   decphase(phHhx);
    _cp_(hx,phHhx,phXhx);

// Begin Acquisition

   _mpseqon(dec, phHhx);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _mpseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:60,代码来源:tancpxblew.c


示例3: pulsesequence

pulsesequence()
{   
  double cycles,
	 bigtau = getval("bigtau"),
	 tau = getval("tau"),
  	  satdly = getval("satdly");
  char  satmode[MAXSTR],
        sspul[MAXSTR];

  getstr("satmode",satmode);
  getstr("sspul",sspul);

  settable(t1,4,phs1);
  settable(t2,8,phs2);
  settable(t3,4,phs3);
  getelem(t1,ct,v1);
  getelem(t2,ct,v2);
  getelem(t3,ct,v4);
  assign(v1,oph);

/* calculate 'big tau' values */
   cycles = bigtau/(2.0*tau);
   cycles = (double)((int)((cycles/2.0) + 0.5)) * 2.0;
   initval(cycles,v3);


/* equilibration period */
   status(A);

   delay(5.0e-5);
   if (sspul[0] == 'y')
        steadystate();

   if (satmode[0] == 'y')
     {
        if ((d1-satdly) > 0.02)
                delay(d1-satdly);
        else
                delay(0.02);
        satpulse(satdly,v2,rof1,rof1);
     }
   else
        delay(d1);

/* calculate exact delay and phases */
   mod2(oph,v5);  
   incr(v5); 

/* spin-echo loop */
   status(B);
   rgpulse(pw,v1,rof1,0.0);
   starthardloop(v3);
      delay(tau - p1/2.0 - rof2);
      rgpulse(p1,v5,rof2,rof2); 
      delay(tau - p1/2.0 - rof2);
   endhardloop();

/* observation period */
   status(C);
} 
开发者ID:timburrow,项目名称:ovj3,代码行数:60,代码来源:CPMGT2.c


示例4: pulsesequence

void pulsesequence() {

// Define Variables and Objects and Get Parameter Values
   DSEQ dec = getdseq("H");
   strncpy(dec.t.ch,"dec",3);
   putCmd("chHtppm='dec'\n");
   strncpy(dec.s.ch,"dec",3);
   putCmd("chHspinal='dec'\n");

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Dutycycle Protection

   DUTY d = init_dutycycle();
   d.dutyon = getval("pwX90");
   d.dutyoff = d1 + 4.0e-6;
   d.c1 = d.c1 + (!strcmp(dec.seq,"tppm"));
   d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0));
   d.t1 = getval("rd") + getval("ad") + at;
   d.c2 = d.c2 + (!strcmp(dec.seq,"spinal"));
   d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0));
   d.t2 = getval("rd") + getval("ad") + at;
   d = update_dutycycle(d);
   abort_dutycycle(d,10.0);

// Set Phase Tables

   settable(phX90,4,table1);
   settable(phRec,4,table2);
   setreceiver(phRec);

// Begin Sequence

   txphase(phX90); decphase(zero);
   obspwrf(getval("aX90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// X Direct Polarization

   rgpulse(getval("pwX90"),phX90,0.0,0.0);

// Begin Acquisition

   _dseqon(dec);
   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   _dseqoff(dec);
   obsunblank(); decunblank(); _unblank34();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:58,代码来源:onepul.c


示例5: pulsesequence

pulsesequence()
{
	double	gzlvl1,
		gt1,
		gstab,
		hsglvl,
		hsgt;
	char	sspul[MAXSTR];

	gzlvl1 = getval("gzlvl1");
	gt1 = getval("gt1");
	gstab = getval("gstab");
	hsglvl = getval("hsglvl");
	hsgt = getval("hsgt");
	getstr("sspul",sspul);

	settable(t1,4,ph1);
	settable(t2,4,ph2);
	settable(t3,4,ph3);

	getelem(t1,ct,v1);
	getelem(t2,ct,v2);
	getelem(t3,ct,oph);

	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10);
		add(v1,v10,v1);
		add(oph,v10,oph);

status(A);

 	delay(5.0e-5);
	if (sspul[0] == 'y')
	{
		zgradpulse(hsglvl,hsgt);
		rgpulse(pw,zero,rof1,rof1);
		zgradpulse(hsglvl,hsgt);
	}

	delay(d1);

     if (getflag("wet")) 
      wet4(zero,one);

status(B);
	rgpulse(pw, v1, rof1, rof1);
	delay(d2); 
	zgradpulse(gzlvl1,gt1);
	delay(gstab);
	rgpulse(pw, v2, rof1, rof2);
	zgradpulse(gzlvl1,gt1);
	delay(gstab);

status(C);
}
开发者ID:timburrow,项目名称:ovj3,代码行数:54,代码来源:wetgCOSY.c


示例6: pulsesequence

void pulsesequence()
{

  double pwx;
  char rcvrsflag[MAXSTR];

  pwx = getval("pwx");
  getstr("rcvrs",rcvrsflag);

  /* check decoupling modes */

  if ( (dm[C] == 'y') || (dm[D] == 'y') || (homo[0] == 'y') )
  {
    printf("dm[C], dm[D] should be set to 'n' and/or homo should set to 'n'");
    psg_abort(1);
  }

  if (strcmp(rcvrsflag,"yy"))
    printf("rcvrs parameter should be set to 'yy'\n");
  
  settable(t1,4,ph1);
  getelem(t1,ct,v1);
  assign(v1,oph);

  settable(t2,4,ph2);

  status(A);
  obspower(tpwr);
  decpower(dpwr);
  delay(d1);

  status(B);
  delay(d2);
  rgpulse(pw, t2, rof1, rof2);
 
  status(C);
  setactivercvrs("yn");
  startacq(alfa);
  acquire(np,1.0/sw);
  endacq();

  status(B);
  delay(d2);
  decrgpulse(pwx, t2, rof1, rof2);

  status(D);
  setactivercvrs("ny");
  startacq(alfa);
  acquire(np,1.0/sw);
  endacq();

}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:52,代码来源:mrseq.c


示例7: pulsesequence

pulsesequence()
{
        double cmult = getval("cmult");

	settable(t1,8,ph1);
	settable(t2,8,ph2);
	settable(t3,8,ph3);

	getelem(t1,ct,v1);
	getelem(t2,ct,v2);
	getelem(t3,ct,oph);

/*
	mod2(id2,v10);
	dbl(v10,v10);
*/
  	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10);

	add(v1,v10,v1);
	add(oph,v10,oph);

	assign(v1,v4);

status(A);

   delay(5.0e-5);
   if (getflag("sspul"))
        steadystate();

   if (satmode[0] == 'y')
     {
        if ((d1-satdly) > 0.02)
                delay(d1-satdly);
        else
                delay(0.02);
        satpulse(satdly,v4,rof1,rof1);
     }
   else
        delay(d1);

   if (getflag("wet"))
     wet4(zero,one);


status(B);
	rgpulse(pw, v1, rof1, rof1);
	delay(d2); 
	rgpulse(cmult*pw, v2, rof1, rof2);

status(C);
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:51,代码来源:COSY.c


示例8: pulsesequence

pulsesequence() {

// Define Variables and Objects and Get Parameter Values

   initval(getval("periods"),v2); 

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Set Phase Tables

   settable(phX90,4,table1);
   settable(phRec,4,table2);
   setreceiver(phRec);

// Begin Sequence

   txphase(phX90); decphase(zero);
   obspwrf(getval("aX90"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);

   xgate(1.0);
   sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6);

// Apply a Rotorsync Delay

   rgpulse(getval("pwX90"),phX90,0.0,0.0);
   rotorsync(v2);
   rgpulse(getval("pwX90"),phX90,0.0,0.0);
   xgate(getval("xperiods")); 
   rgpulse(getval("pwX90"),phX90,0.0,0.0);
   delay(10.0e-6); 

// X Direct Polarization

   rgpulse(getval("pwX90"),phX90,0.0,0.0);

// Begin Acquisition

   obsblank(); _blank34();
   delay(getval("rd"));
   startacq(getval("ad"));
   acquire(np, 1/sw);
   endacq();
   obsunblank(); decunblank(); _unblank34();
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:50,代码来源:rotorsynctest.c


示例9: pulsesequence

void pulsesequence()
{

  char compshape[MAXSTR],
	sspul[MAXSTR],
	wet[MAXSTR],
	composit[MAXSTR];
  getstr("compshape",compshape);
  getstr("composit",composit);
  getstr("sspul",sspul);
  getstr("wet",wet);

  settable(t1,4,phs1);
  settable(t2,8,phs2);
  getelem(t1,ct,oph);
  getelem(t2,ct,v2);
  assign(oph,v1);

   /* equilibrium period */
   status(A);

   delay(5.0e-5);
   if (sspul[0] == 'y')
        steadystate();

	delay(d1);

   if (wet[0] == 'y')
     wet4(zero,one);

   status(B);

   pulse(p1,zero); 
   hsdelay(d2); 

   if (composit[0] == 'y')
    {
       if (rfwg[OBSch-1] == 'y')
          shaped_pulse(compshape,4.0*pw+0.8e-6,v1,rof1,rof2);
       else
          comp90pulse(pw,v1,rof1,rof2);
    }
   else
      rgpulse(pw,v1,rof1,rof2);

   status(C);
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:47,代码来源:wet1D.c


示例10: intToRoman

char* intToRoman(int num) {
    int ary[4] = {-1};
    char *ans;
    if(num == 0) {
        return NULL;
    }
    
    Roman *table = (Roman*)malloc(7*sizeof(Roman));
    if(table == 0) {
        return NULL;
    }
    
    settable(table);
    
    int dig = getdigitnumber(num);
    
    ary[0] = num % 10;
    ary[1] = (num /10) % 10;
    ary[2] = (num /100) % 10;
    ary[3] = (num /1000) % 10;
    
    for(int i = dig+1 ; i < 4; i++) {
        ary[i] = -1;
    }
    
    
    ans = malloc(150*sizeof(char));
    memset(ans, 0, 150);
    
    for(int i = 3; i >=0; i--) {
        int j = 2*i;
        if(ary[i]>=0 && ary[i] <=3) {
            for(int k = 0; k < ary[i]; k++) {
                strcat(ans, table[j].letter);
            }
        }
        else if(ary[i] == 4) {
            strcat(ans, table[j].letter);
            strcat(ans, table[j+1].letter);
            
        }
        else if(ary[i] == 5) {
            strcat(ans, table[j+1].letter);
        }
        else if(ary[i] > 5 && ary[i] <= 8) {
            strcat(ans, table[j+1].letter);
            for(int k = 0; k < ary[i] - 5; k++) {
                strcat(ans, table[j].letter);
            }
        }
        else if(ary[i] == 9) {
            strcat(ans, table[j].letter);
            strcat(ans, table[j+2].letter);
        }
    }
    
    return ans;
    
}
开发者ID:LeetCodeBreaker,项目名称:LeetCode,代码行数:59,代码来源:IntegetToRoman.c


示例11: assert

void breakpoint_Relocation::set_target(address x) {
  assert(settable(), "must be settable");
  jint target_bits = (jint)internal() ? scaled_offset           (x)
				: runtime_address_to_index(x);
  short* p = &live_bits() + 1;
  add_long(p, target_bits);
  assert(p == instrs(), "new target must fit");
  _target = x;
}
开发者ID:fatman2021,项目名称:myforthprocessor,代码行数:9,代码来源:relocInfo.cpp


示例12: pulsesequence

pulsesequence()
{
   settable(t1,4,phasecycle);
      dec3power(dpwr3); 
      diplexer_override(0);
      delay(d1);
      dec3rgpulse(pw, t1, rof1, rof2);
    setreceiver(t1);
}
开发者ID:timburrow,项目名称:OpenVnmrJ,代码行数:9,代码来源:ddec4.c


示例13: pulsesequence

pulsesequence()
{
   double pd, seqtime;
   double minte,ted1,ted2;
   double restol, resto_local;

   int  vph180     = v2;  /* Phase of 180 pulse */
   init_mri();              /****needed ****/

   restol=getval("restol");   //local frequency offset
   roff=getval("roff");       //receiver offset

   init_rf(&p1_rf,p1pat,p1,flip1,rof1,rof2);   /* hard pulse */
   calc_rf(&p1_rf,"tpwr1","tpwr1f");
   init_rf(&p2_rf,p2pat,p2,flip2,rof1,rof2);   /* hard pulse */
   calc_rf(&p2_rf,"tpwr2","tpwr2f");

   seqtime = at+(p1/2.0)+rof1+d2;

   pd = tr - seqtime;  /* predelay based on tr */
   if (pd <= 0.0) {
      abort_message("%s: Requested tr too short.  Min tr = %f ms",seqfil,seqtime*1e3);
    }
   minte = p1/2.0 + p2 + 2*rof2 + rof1;
   if(d2 > 0) {
     if(d2 < minte+4e-6) 
       abort_message("%s: TE too short. Min te = %f ms",seqfil,minte*1e3);
   }
   ted1 = d2/2 - p1/2 - p2/2 + rof2 + rof1;
   ted2 = d2/2 - p2/2 + rof2;
   resto_local=resto-restol; 

   status(A);
   xgate(ticks);
   delay(pd);

   /* --- observe period --- */
   obsoffset(resto_local);
   obspower(p1_rf.powerCoarse);
   obspwrf(p1_rf.powerFine);
   shapedpulse(p1pat,p1,oph,rof1,rof2);
   /* if d2=0 no 180 pulse applied */
   if (d2 > 0) {
     obspower(p2_rf.powerCoarse);
     obspwrf(p2_rf.powerFine);   
     settable(t2,2,ph180);        /* initialize phase tables and variables */
     getelem(t2,ct,v6);  /* 180 deg pulse phase alternates +/- 90 off the rcvr */
     add(oph,v6,vph180);      /* oph=zero */
     delay(ted1);
     shapedpulse(p2pat,p2,vph180,rof1,rof2);
     delay(ted2);
   }
   startacq(alfa);
   acquire(np,1.0/sw);
   endacq();
}
开发者ID:OpenVnmrJ,项目名称:OpenVnmrJ,代码行数:56,代码来源:t2puls.c


示例14: pulsesequence

void pulsesequence(){

//Define Variables and Get Parameter Values

   double pwTune = getval("pwTune");
   pwTune = pwTune*6.0;
   at = pwTune*2.0;
   char atval[MAXSTR]; 
   sprintf(atval,"at = %f\n", at);
   putCmd(atval);
   int chTune = (int) getval("chTune");
   if ((chTune < 1) || (chTune > 4)) {
         abort_message("chTune(%d) must be between 1 and 4\n", chTune);
   }

//--------------------------------------
// Copy Current Parameters to Processed
//-------------------------------------

   putCmd("groupcopy('current','processed','acquisition')");

// Set Phase Tables

   settable(phTune,4,table1);
   settable(phRec,4,table2);
   setreceiver(t2);

//Begin Sequence

   obspwrf(getval("aTune"));
   obsunblank(); decunblank(); _unblank34();
   delay(d1);
   sp1on(); delay(2e-6); sp1off(); delay(2.0e-6);

//Begin Phase Detected Pulse

   set4Tune(chTune,getval("gain"));
   delay(1.0e-4);
   ShapedXmtNAcquire("phtran",pwTune,phTune,6.0e-6,chTune);
   obsunblank(); decunblank(); _unblank34();
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:41,代码来源:phtran.c


示例15: pulsesequence

pulsesequence()
{
	double	gzlvl1,pwClvl,
		gt1,
		gstab;

	gzlvl1 = getval("gzlvl1");
	gt1 = getval("gt1");
	gstab = getval("gstab");
        pwClvl = getval("pwClvl");

	settable(t1,4,ph1);
	settable(t2,4,ph2);
	settable(t3,4,ph3);

	getelem(t1,ct,v1);
	getelem(t2,ct,v2);
	getelem(t3,ct,oph);

	initval(2.0*(double)(((int)(d2*getval("sw1")+0.5)%2)),v10);
		add(v1,v10,v1);
		add(oph,v10,oph);

status(A);
        obspower(pwClvl);
        delay(d1); 

status(B);
	rgpulse(pw, v1, rof1, rof1);
	delay(d2); 
	zgradpulse(gzlvl1,gt1);
	delay(gstab);
	rgpulse(pw, v2, rof1, rof2);
	zgradpulse(gzlvl1,gt1);
	delay(gstab);

status(C);
}
开发者ID:timburrow,项目名称:ovj3,代码行数:38,代码来源:C13gcosy.c


示例16: pulsesequence

void pulsesequence()
{
   int		rxgate;
   double	pp,
		pplvl;

   pp = getval("pp");
   pplvl = getval("pplvl");

   rxgate = (rof1 == 0.0);
   if (rxgate)
      rof1 = 1.0e-6;			/* phase switching time */

   if (newdecamp)
   {
      if (rxgate)
         rof1 = 40.0e-6;
   }

   status(A);
      hsdelay(d1);
   status(B);
      settable(t1,4,phasecycle);
      pulse(pw, t1);
      delay(d2);
      if (newdecamp)
      {
         pplvl  = getval("pplvl");
         decpower(pplvl);  /* sets DEC atten = pplvl */
      }
      else
      {
         declvlon();         /* sets dhp = 255 level */
      }

      simpulse(p1, pp, t1, t1, rof1, rof1);
      if (newdecamp)
      {
         decpower(dpwr);  /* sets DEC atten = dpwr */
      }
      else
      {
         declvloff();
      }

      delay(d2);
   status(C);
   setreceiver(t1);
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:49,代码来源:ppcal.c


示例17: settables

void
settables(Page *p)
{
	Table *t;
	Item *i;

	if(p->doc==nil)
		return;
	for(i=p->items; i!=nil; i=i->next)
		if(i->tag == Itabletag)
			((Itable *)i)->table->flags |= Ttoplevel;

	for(t=p->doc->tables; t!=nil; t=t->next)
		settable(t);
}
开发者ID:99years,项目名称:plan9,代码行数:15,代码来源:tabs.c


示例18: data

int breakpoint_Relocation::pack_data() {
  short* p = data();

  assert(p == &live_bits(), "initializing live_bits");
  *p++ = _bits;

  jint target_bits = (jint) internal() ? scaled_offset           (_target)
				: runtime_address_to_index(_target);
  if (settable()) {
    // save space for set_target later
    add_long(p, target_bits);
  } else {
    add_int (p, target_bits);
  }

  for (int i = 0; i < instrlen(); i++) {
    add_short(p, (short)0x7777);    // placeholder value until bytes can be saved
  }

  return p - data();
}
开发者ID:fatman2021,项目名称:myforthprocessor,代码行数:21,代码来源:relocInfo.cpp


示例19: pulsesequence

void pulsesequence()
{
/* equilibrium period */
   status(A);
      hsdelay(d1);

/* tau delay */
   status(B);
      if (newdecamp)
      {
         decpower(tpwr);
         decrgpulse(p1, zero, rof1, rof2);
         decpower(dpwr);
      }
      else
      {
         declvlon();
         decrgpulse(p1, zero, rof1, rof2);
         declvloff();
      }
      hsdelay(d2);

/* observe period */
   status(C);
   settable(t1,4,phasecycle);
      if (newdecamp)
      {
         decpower(tpwr);
         decrgpulse(pw, t1, rof1, rof2);
         decpower(dpwr);
      }
      else
      {
         declvlon();
         decrgpulse(pw, t1, rof1, rof2);
         declvloff();
      }
   setreceiver(t1);
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:39,代码来源:d2pul.c


示例20: kv2t

	void kv2t(lua_State *L, FieldValueMap &m, const CFieldDict *dict) 	{
		CFieldDict::fconst_iterator fit;

		assert(dict);
		for (fit = dict->fbegin();fit != dict->fend();fit++)
		{
			const FIELD_ATTR &fa = fit->second;
			if (dict->IsRepeat(fa.m_fid))
			{
				const CFieldDict *dict2;
				size_t rn = 0;
				m.GetRepeatCount(fa.m_fid, rn);

				lua_pushnumber(L, fa.m_fid);
				lua_pushnumber(L, rn); 
				lua_settable(L, -3);

				if (dict->GetRepeat(fa.m_fid, dict2))
				{
//					cout<<fa.m_fid<<":"<<rn<<endl;
					for(unsigned int ri = 0; ri < rn; ri++)
					{
						char idx[128];
						sprintf(idx, "%d,%d", fa.m_fid, ri); 
						lua_pushstring(L, idx);
						lua_newtable(L);
						kv2t(L, m(fa.m_fid, ri), dict2);
						lua_settable(L, -3);
					}
				}
			}
			else
			{
				settable(L, m, fa.m_fid);
			}
		}	
	}//kv2t;
开发者ID:hejian1983,项目名称:helloworld,代码行数:37,代码来源:map2tbl.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setter函数代码示例发布时间:2022-05-30
下一篇:
C++ sett函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap