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

C++ Measure函数代码示例

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

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



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

示例1: Report

void Report(CHAIN **Chain, int NChain, HBOND **HBond, COMMAND *Cmd) 
{

  FILE *Out;

  if( !strlen(Cmd->OutFile) )
    Out = stdout;
  else 
  if( !(Out = fopen(Cmd->OutFile,"w")) )
    die("Can not open output file %s\n",Cmd->OutFile);
  
  if( !Cmd->ReportSummaryOnly )
    ReportGeneral(Chain,Out);

  ReportSummary(Chain,NChain,Out,Cmd);
  ReportShort(Chain,NChain,Out,Cmd);
  ReportTurnTypes(Chain,NChain,Out,Cmd);
  ReportSSBonds(Chain,Out);

  if( !Cmd->ReportSummaryOnly )
    ReportDetailed(Chain,NChain,Out,Cmd);

  if( Cmd->ReportBonds )
    ReportHydrBonds(Chain,NChain,HBond,Out,Cmd);


  if( Cmd->Measure ) {
    Measure(Chain,NChain,0,Cmd,Out);
    Measure(Chain,NChain,1,Cmd,Out);
  }

  if( Out != stdout )
    fclose(Out);

}
开发者ID:YummyYang,项目名称:MyBioPerl,代码行数:35,代码来源:report.c


示例2: Pipeline1

//TSP -> NN -> Generations( g, ForkJoin ( n, SA -> 2-OPT ) ) -> TSP'
void Pipeline1(tsp_class& tsp_instance, unsigned int number_of_tasks, unsigned int number_of_generations)
{
	#pragma region "PipelineConfiguration"
	auto a = Args<General_args_type>(make_General_args(number_of_generations, number_of_tasks));
	auto sa = Args<SA_args_type>(make_SA_args(1000.0, 0.00001, 0.999, 400));
	auto aco = Args<ACO_args_type>();
	auto ga = Args<GA_args_type>();

	const char* pipeline_description = "TSP -> NN -> Generations( g, ForkJoin ( n, SA -> 2-OPT ) ) -> TSP'";
	display_args(pipeline_description, a, sa, aco, ga);
	
	auto g = a[0].number_of_iterations_or_generations;
	auto n = a[0].number_of_tasks_in_parallel;
	auto _TSP = TSP(just(tsp_instance));
	auto _DisplayInput = Display("TSP INPUT", DisplayFlags::All);
	auto _NN = Measure(NN(), Display("NEAREST NEIGHBOUR", DisplayFlags::EmitMathematicaGraphPlot));	
	auto _SA_2OPT = Chain(SA(sa[0].initial_temperature, sa[0].stopping_criteria_temperature, 
							 sa[0].decreasing_factor, sa[0].monte_carlo_steps), _2OPT());
	auto _ForkJoin = [](unsigned int n, TSP::transformer_type map_fun){ return Measure(ForkJoin(n, map_fun)); };
	auto _DisplayOutput = Display("TSP OUTPUT", DisplayFlags::EmitMathematicaGraphPlot); 
	#pragma endregion

	//TSP -> NN -> Generations( g, ForkJoin ( n, SA -> 2-OPT ) ) -> TSP'
	auto result = _TSP
					.map(_DisplayInput)
					.map(_NN)
					.map(Generations(g, _ForkJoin(n, _SA_2OPT)))
					.map(_DisplayOutput);
}
开发者ID:fabiogaluppo,项目名称:samples,代码行数:30,代码来源:program.cpp


示例3: Pipeline2

//TSP -> NN -> Generations( g, ForkJoin ( n, GA -> 2-OPT ) ) -> TSP'
void Pipeline2(tsp_class& tsp_instance, unsigned int number_of_tasks, 
			                            unsigned int number_of_generations)
{
	#pragma region "PipelineConfiguration"
	auto a = Args<General_args_type>(make_General_args(number_of_generations, number_of_tasks));
	auto sa = Args<SA_args_type>();
	auto aco = Args<ACO_args_type>();
	auto ga = Args<GA_args_type>(make_GA_args(1000, 10, 5, 50000, 10, 0.9));

	const char* pipeline_description = "TSP -> NN -> Generations( g, ForkJoin ( n, GA -> 2-OPT ) ) -> TSP'";
	display_args(pipeline_description, a, sa, aco, ga);
	
	auto g = a[0].number_of_iterations_or_generations;
	auto n = a[0].number_of_tasks_in_parallel;
	auto _TSP = TSP(just(tsp_instance));
	auto _DisplayInput = Display("TSP INPUT", DisplayFlags::All);
	auto _NN = Measure(NN(), Display("NEAREST NEIGHBOUR", DisplayFlags::EmitMathematicaGraphPlot));	
	auto _GA_2OPT = Chain(GA(ga[0].population_size, ga[0].mutation_percentage, ga[0].group_size, 
							 ga[0].number_of_generations, ga[0].nearby_cities, ga[0].nearby_cities_percentage), _2OPT());
	auto _ForkJoin = [](unsigned int n, TSP::transformer_type map_fun){ return Measure(ForkJoin(n, map_fun)); };
	auto _DisplayOutput = Display("TSP OUTPUT", DisplayFlags::EmitMathematicaGraphPlot); 
	#pragma endregion

	//TSP -> NN -> Generations( g, ForkJoin ( n, GA -> 2-OPT ) ) -> TSP'
	auto result = _TSP
					.map(_DisplayInput)
					.map(_NN)
					.map(Generations(g, _ForkJoin(n, _GA_2OPT)))
					.map(_DisplayOutput);
}
开发者ID:fabiogaluppo,项目名称:samples,代码行数:31,代码来源:program.cpp


示例4: Measure

// raise a measure to a power, like c in e=mc^2
Measure Measure::power (int power)
{
  double  d = quantity;
  int     i;
  int     powTmp = (power > 0) ? power : -power;

  if (power == 0) return Measure (1, &Unit::UNITLESS);
  if (power == 1) return *this;
  for (i = 1; i < powTmp; i++) d *= quantity;
  if (power < 0) d = 1.0 / d;
  return Measure (d, unit->power (power));
}
开发者ID:davearonson,项目名称:meascpp,代码行数:13,代码来源:measure.cpp


示例5: main

int main (int argc, char * argv[])
{
  Measure height = Measure (&METER);
  Measure time = Measure (&SECOND);

  ParseArgs (argc, argv, &time);

  height = G * 0.5 * time.power (2);  // d = 1/2 a t^2
  cout << "At " << G.GetQuantity();
  cout << " meters per second per second," << endl << "an object will fall ";
  cout << height.GetQuantity() << " meters in ";
  cout << time.GetQuantity() << " seconds." << endl;
  exit (0);
}
开发者ID:davearonson,项目名称:meascpp,代码行数:14,代码来源:falldist.cpp


示例6: FindCharacterIndexAtOffset

int32 FSlateFontMeasure::FindFirstWholeCharacterIndexAfterOffset( const FString& Text, int32 StartIndex, int32 EndIndex, const FSlateFontInfo& InFontInfo, const int32 HorizontalOffset, bool IncludeKerningWithPrecedingChar, float FontScale ) const
{
	int32 FoundLastCharacterIndex = FindCharacterIndexAtOffset( Text, StartIndex, EndIndex, InFontInfo, HorizontalOffset, IncludeKerningWithPrecedingChar, FontScale );

	float TextWidth = Measure( Text, StartIndex, EndIndex, InFontInfo, IncludeKerningWithPrecedingChar, FontScale ).X;
	float AvailableWidth = TextWidth - HorizontalOffset;

	float RightStringWidth = Measure( Text, FoundLastCharacterIndex, EndIndex, InFontInfo, IncludeKerningWithPrecedingChar, FontScale ).X;
	if ( AvailableWidth < RightStringWidth )
	{
		++FoundLastCharacterIndex;
	}

	return FoundLastCharacterIndex;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:15,代码来源:FontMeasure.cpp


示例7: main

int main(int argc, char **argv)
{
	
	/* The command line argument: -d is used to determine if the test is being run
	in debug mode. The regress tool requires only one line output:PASS or FAIL.
	All of the printfs associated with this test has been handled with a if (debug_mode)
	test.
	Usage: test_name -d
	*/
	PLOptStatus os;
	PLOptState *opt = PL_CreateOptState(argc, argv, "d:");
	while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
    {
		if (PL_OPT_BAD == os) continue;
        switch (opt->option)
        {
        case 'd':  /* debug mode */
			debug_mode = 1;
            break;
         default:
            break;
        }
    }
	PL_DestroyOptState(opt);

 /* main test */
	
    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
    PR_STDIO_INIT();

    if (argc > 2) {
	count = atoi(argv[2]);
    } else {
	count = DEFAULT_COUNT;
    }

#if defined(XP_UNIX)
    Measure(NativeSelectTest, "time to call 1 element select()");
#endif
    Measure(EmptyPRSelect, "time to call Empty PR_select()");
    Measure(EmptyNativeSelect, "time to call Empty select()");
    Measure(PRSelectTest, "time to call 1 element PR_select()");

	if (!debug_mode) Test_Result (NOSTATUS);
    PR_Cleanup();


}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:48,代码来源:select2.c


示例8: WXUNUSED

void Lyrics::OnPaint(wxPaintEvent & WXUNUSED(event))
{
   if (!this->GetParent()->IsShown())
      return;

   if (mLyricsStyle == kBouncingBallLyrics)
   {
      wxPaintDC dc(this);

      if (!mMeasurementsDone)
         Measure(&dc);

      #ifdef __WXMAC__
         // Mac OS X automatically double-buffers the screen for you,
         // so our bitmap is unneccessary
         HandlePaint(dc);
      #else
         wxBitmap bitmap(mWidth, mKaraokeHeight);
         wxMemoryDC memDC;
         memDC.SelectObject(bitmap);
         HandlePaint(memDC);
         dc.Blit(0, 0, mWidth, mKaraokeHeight, &memDC, 0, 0, wxCOPY, FALSE);
      #endif
   }
   else // (mLyricsStyle == kHighlightLyrics)
   {
      //v causes flicker in ported version
      //    this->SetHighlightFont();
   }
}
开发者ID:ShockingIce,项目名称:audacity,代码行数:30,代码来源:Lyrics.cpp


示例9: PrintStatus

static uint8_t PrintStatus(const CLS1_StdIOType *io) {
  uint8_t buf[64], buf2[16];
  QuadTime_t timing;
  int i;
  
  CLS1_SendStatusStr((unsigned char*)"quadcalib", (unsigned char*)"\r\n", io->stdOut);
  for(i=0; i<NOF_SIGNALS; i++) {
    if (Measure(i, &timing)==ERR_OK) {
      buf[0] = '\0';
      UTIL1_strcatNum8u(buf, sizeof(buf), timing.lowPercent);
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)"% to ");
      UTIL1_strcatNum8u(buf, sizeof(buf), timing.highPercent);
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)"%, ");
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)"high: ");
      UTIL1_strcatNum32u(buf, sizeof(buf), timing.highTicks);
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)" ticks, low: ");
      UTIL1_strcatNum32u(buf, sizeof(buf), timing.lowTicks);
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)" ticks\r\n");
    } else {
      UTIL1_strcpy(buf, sizeof(buf), (uint8_t*)"TIMEOUT\r\n");
    }
    if (i==0) {
      UTIL1_strcpy(buf2, sizeof(buf2), (uint8_t*)"  Right A,C0");
    } else if (i==1) {
      UTIL1_strcpy(buf2, sizeof(buf2), (uint8_t*)"  Right B,C1");
    } else if (i==2) {
      UTIL1_strcpy(buf2, sizeof(buf2), (uint8_t*)"  Left  C,C2");
    } else {
      UTIL1_strcpy(buf2, sizeof(buf2), (uint8_t*)"  Left  D,C3");
    }
    CLS1_SendStatusStr(buf2, buf, io->stdOut);
  }
  return ERR_OK;
}
开发者ID:tbmathis,项目名称:SUMO,代码行数:34,代码来源:QuadCalib.c


示例10: if

Boolean CComposingView::MoveCursor(
    /* [in] */ Int32 keyCode)
{
    if (keyCode != IKeyEvent::KEYCODE_DPAD_LEFT
            && keyCode != IKeyEvent::KEYCODE_DPAD_RIGHT) {
        return FALSE;
    }

    if (EDIT_PINYIN == mComposingStatus) {
        Int32 offset = 0;
        if (keyCode == IKeyEvent::KEYCODE_DPAD_LEFT) {
            offset = -1;
        }
        else if (keyCode == IKeyEvent::KEYCODE_DPAD_RIGHT) offset = 1;
        mDecInfo->MoveCursor(offset);
    }
    else if (SHOW_STRING_LOWERCASE == mComposingStatus) {
        if (keyCode == IKeyEvent::KEYCODE_DPAD_LEFT
                || keyCode == IKeyEvent::KEYCODE_DPAD_RIGHT) {
            mComposingStatus = EDIT_PINYIN;

            Measure(IViewGroupLayoutParams::WRAP_CONTENT, IViewGroupLayoutParams::WRAP_CONTENT);
            RequestLayout();
        }

    }
    Invalidate();
    return TRUE;
}
开发者ID:maerson,项目名称:CPP_Framework_Elastos5,代码行数:29,代码来源:CComposingView.cpp


示例11: Tune

static uint8_t Tune(const CLS1_StdIOType *io, uint8_t channel, MOT_MotorDevice *motorHandle) {
	#define TUNE_MOTOR_PERCENT 20
  uint16_t dac;
  int i;
  QuadTime_t timing;
  uint8_t buf[48];
  uint8_t res;
 
//#if PL_HAS_DRIVE
//  DRV_SetMode(DRV_MODE_NONE); /* turn off drive mode */
//#endif

MOT_SetSpeedPercent(motorHandle, TUNE_MOTOR_PERCENT);
  CLS1_SendStr((uint8_t*)"Tuning channel...\r\n", io->stdOut);
  res = ERR_FAILED;
  for(i=0,dac=0;dac<=MCP4728_MAX_DAC_VAL;i++) {
    UTIL1_strcpy(buf, sizeof(buf), (uint8_t*)"Channel: ");
    UTIL1_chcat(buf, sizeof(buf), (uint8_t)('A'+channel)); /* 0:A, 1:B, 2:C, 3:D */
    UTIL1_strcat(buf, sizeof(buf), (uint8_t*)" DAC: 0x");
    UTIL1_strcatNum16Hex(buf, sizeof(buf), dac);
    UTIL1_chcat(buf, sizeof(buf), ' ');
    CLS1_SendStr(buf, io->stdOut);
    if (MCP4728_FastWriteDAC(channel, dac)!=ERR_OK) { /* writes single channel DAC value, not updating EEPROM */
      CLS1_SendStr((uint8_t*)"ERROR writing DAC channel!\r\n", io->stdErr);
      res = ERR_FAILED;
      break;
    }
    WAIT1_WaitOSms(100); /* wait some time to allow DAC and OP-Amp change */
    if (Measure(channel, &timing)==ERR_OK) {
      buf[0] = '\0';
      UTIL1_strcatNum8u(buf, sizeof(buf), timing.highPercent);
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)"% high, low ");
      UTIL1_strcatNum8u(buf, sizeof(buf), timing.lowPercent);
      UTIL1_strcat(buf, sizeof(buf), (uint8_t*)"%\r\n");
      CLS1_SendStr(buf, io->stdOut);
      if (timing.highPercent==50 || timing.lowPercent==50) {
        CLS1_SendStr((uint8_t*)"Set!\r\n", io->stdErr);
        CLS1_SendStr((uint8_t*)"Writing to EEPROM...\r\n", io->stdOut);
        if (MCP4728_WriteDACandEE(channel, dac)!=ERR_OK) {
          CLS1_SendStr((uint8_t*)"ERROR writing DAC/EEPROM\r\n", io->stdErr);
          res = ERR_FAILED;
          break;
        }
        CLS1_SendStr((uint8_t*)"...done!\r\n", io->stdOut);
        res = ERR_OK;
        break; /* go to next channel */
      }
      dac += 0x1; /* smaller increase */
    } else {
      CLS1_SendStr((uint8_t*)"No signal\r\n", io->stdErr);
      dac += 0x10; /* larger increase */
    }
  } /* for finding DAC value */
  MOT_SetSpeedPercent(motorHandle, 0); /* turn off again */
  if (res!=ERR_OK) {
    CLS1_SendStr((uint8_t*)"ERROR!\r\n", io->stdErr);
  }
  CLS1_SendStr((uint8_t*)"Tuning finished!\r\n", io->stdOut);
  return res;
}
开发者ID:tbsimmen,项目名称:INTRO_Robotfiles,代码行数:60,代码来源:QuadCalib.c


示例12: dc

void CXTPMarkupUIElement::Arrange(CRect rcFinalRect)
{
	if (GetVisibility() == xtpMarkupVisibilityCollapsed)
	{
		m_rcFinalRect = rcFinalRect;
		m_bArrangeDirty = FALSE;
		m_bNeverArranged = FALSE;
		return;
	}

	if (m_bNeverMeasured)
	{
		CXTPMarkupDrawingContext dc(GetMarkupContext());
		Measure(&dc, rcFinalRect.Size());
	}

	if ((m_bArrangeDirty || m_bNeverArranged) || (rcFinalRect != m_rcFinalRect))
	{
		m_bNeverArranged = FALSE;
		m_bArrangeInProgress = TRUE;
		ArrangeCore(rcFinalRect);
		m_bArrangeInProgress = FALSE;

		UpdateBoundRect();
	}

	m_rcFinalRect = rcFinalRect;
	m_bArrangeDirty = FALSE;
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:29,代码来源:XTPMarkupUIElement.cpp


示例13: GetDesiredSize

void CXTPMarkupUIElement::InvalidateMeasureOverride(CXTPMarkupDrawingContext* pDC)
{
	if (!m_bMeasureInProgress && !m_bNeverMeasured)
	{
		m_bMeasureDirty = TRUE;
		m_bArrangeDirty = TRUE;

		CSize sz = GetDesiredSize();

		Measure(pDC, m_szPreviousAvailableSize);

		if (sz != GetDesiredSize())
		{
			m_bMeasureDirty = TRUE;
			m_bArrangeDirty = TRUE;

			CXTPMarkupUIElement* pParent = MARKUP_DYNAMICCAST(CXTPMarkupUIElement, GetVisualParent());
			if (pParent)
			{
				pParent->InvalidateMeasureOverride(pDC);
			}
			else if (m_pMarkupContext)
			{
				m_pMarkupContext->OnInvalidateArrange(this);
			}
		}
		else
		{
			Arrange(m_rcFinalRect);
			InvalidateVisual();
		}
	}
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:33,代码来源:XTPMarkupUIElement.cpp


示例14: main

void main(int argc, char **argv)
{
    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
    PR_STDIO_INIT();

    if (argc > 1) {
	count = atoi(argv[1]);
    } else {
	count = DEFAULT_COUNT;
    }

    Measure(statPRStat, "time to call PR_GetFileInfo()");
    Measure(statStat, "time to call stat()");

    PR_Cleanup();
}
开发者ID:AbrahamJewowich,项目名称:FreeSWITCH,代码行数:16,代码来源:stat.c


示例15: Measure

// ================================== Battery ==================================
void Battery_t::Task() {
    if(!Delay.Elapsed(&Timer, 999)) return;
    Measure();
    // Discharging slope
    if ((State == bsFull) && (IValue < BATTERY_HALF)) {
        State = bsHalf;
        return;
    }
    if ((State == bsHalf) && (IValue < BATTERY_EMPTY)) {
        State = bsEmpty;
        return;
    }
    // Charging slope
    if ((State == bsHalf) && (IValue > (BATTERY_HALF+60))) {
        State = bsFull;
        return;
    }
    if ((State == bsEmpty) && (IValue > (BATTERY_EMPTY+60))) {
        State = bsHalf;
        return;
    }
    // Indicate discharged battery
    if ((State == bsEmpty) && (Door.State == dsClosed) && (Leds.Led[0].Mode != lmBlink)) {
        Leds.Led[0].Blink(Settings.ColorDoorClosed, Settings.BlinkDelay);
        Leds.Led[2].Blink(Settings.ColorDoorClosed, Settings.BlinkDelay);
    }
}
开发者ID:Kreyl,项目名称:nute,代码行数:28,代码来源:main.cpp


示例16: GetData

void GetData(nav_msgs::OccupancyGrid msg)
{
	m = msg.info.height;
	n = msg.info.width;
	
	int d[m*n];
	int i,j,k=0;
	for(i=0;i<m*n;i++)			// Converting values into 0 and 1 only
	{
		if(msg.data[i] != 0)		// All values other than 0 converted into 1
		d[i] = 1;
		else
		d[i] = 0;
	}

	data **grid = (data**)malloc(m*sizeof(data*)); 
	for (i=0;i<m;i++)
    	grid[i] = (data*)malloc(n*sizeof(data));

	
	for(i=0;i<m;i++)				// converting 1-D array into 2-D array-Grid map
	{
		for(j=0;j<n;j++)
		{
			grid[i][j].prob = 0;	
			grid[i][j].walkable = d[k];
			k++;
		}
	}
	grid = Motion_Update(grid);
	Measure(grid);
	
}
开发者ID:gjain0,项目名称:PathPlanning-CollisionAvoidance-and-SkeletalDetection-using-ROS,代码行数:33,代码来源:Measure.cpp


示例17: VALIDATE_NOT_NULL

ECode CComposingView::MoveCursor(
    /* [in] */ Int32 keyCode,
    /* [out] */ Boolean* result)
{
    VALIDATE_NOT_NULL(result);
    if (keyCode != IKeyEvent::KEYCODE_DPAD_LEFT
            && keyCode != IKeyEvent::KEYCODE_DPAD_RIGHT) {
        *result = FALSE;
        return NOERROR;
    }

    if (ComposingStatus_EDIT_PINYIN == mComposingStatus) {
        Int32 offset = 0;
        if (keyCode == IKeyEvent::KEYCODE_DPAD_LEFT)
            offset = -1;
        else if (keyCode == IKeyEvent::KEYCODE_DPAD_RIGHT) offset = 1;
        mDecInfo->MoveCursor(offset);
    } else if (ComposingStatus_SHOW_STRING_LOWERCASE == mComposingStatus) {
        if (keyCode == IKeyEvent::KEYCODE_DPAD_LEFT
                || keyCode == IKeyEvent::KEYCODE_DPAD_RIGHT) {
            mComposingStatus = ComposingStatus_EDIT_PINYIN;

            Measure(IViewGroupLayoutParams::WRAP_CONTENT, IViewGroupLayoutParams::WRAP_CONTENT);
            RequestLayout();
        }

    }

    Invalidate();
    *result = TRUE;
    return NOERROR;
}
开发者ID:XilongPei,项目名称:Elastos5,代码行数:32,代码来源:CComposingView.cpp


示例18: CrashIf

// called when either the window size changed (as a result
// of WM_SIZE) or when the content of the window changes
void HwndWrapper::TopLevelLayout()
{
    CrashIf(!hwndParent);
    ClientRect rc(hwndParent);
    Size availableSize(rc.dx, rc.dy);
    //lf("(%3d,%3d) HwndWrapper::TopLevelLayout()", rc.dx, rc.dy);
    Size s = Measure(availableSize);

    if (firstLayout && sizeToFit) {
        firstLayout = false;
        desiredSize = s;
        ResizeHwndToClientArea(hwndParent, s.Width, s.Height, false);
    } else {
        desiredSize = availableSize;
        Rect r(0, 0, availableSize.Width, availableSize.Height);
        SetPosition(r);
        if (centerContent) {
            int n = availableSize.Width - s.Width;
            if (n > 0) {
                r.X = n / 2;
                r.Width = s.Width;
            }
            n = availableSize.Height - s.Height;
            if (n > 0) {
                r.Y = n / 2;
                r.Height = s.Height;
            }
        }
        Arrange(r);
    }
    layoutRequested = false;
}
开发者ID:Jshauk,项目名称:sumatrapdf,代码行数:34,代码来源:MuiHwndWrapper.cpp


示例19: Measure

ECode CComposingView::SetDecodingInfo(
    /* [in] */ CPinyinIME::DecodingInfo* decInfo,
    /* [in] */ CPinyinIME::ImeState imeStatus)
{
    mDecInfo = decInfo;

    if (CPinyinIME::STATE_INPUT == imeStatus) {
        mComposingStatus = SHOW_PINYIN;
        mDecInfo->MoveCursorToEdge(FALSE);
    }
    else {
        if (decInfo->GetFixedLen() != 0
                || EDIT_PINYIN == mComposingStatus) {
            mComposingStatus = EDIT_PINYIN;
        }
        else {
            mComposingStatus = SHOW_STRING_LOWERCASE;
        }
        mDecInfo->MoveCursor(0);
    }

    Measure(IViewGroupLayoutParams::WRAP_CONTENT, IViewGroupLayoutParams::WRAP_CONTENT);
    RequestLayout();
    return Invalidate();
}
开发者ID:maerson,项目名称:CPP_Framework_Elastos5,代码行数:25,代码来源:CComposingView.cpp


示例20: GetGSMBLER

bool CRFTester::GetGSMBLER(double &f)
{
	if (!m_GSMMeasStatus.bBLER && !Measure(GSM_BLER))
		return false;

	f = m_GSMMeasStatus.fBLER;
	return true;
}
开发者ID:lidongqiang,项目名称:PCBATool,代码行数:8,代码来源:RFTester.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MeasureTime函数代码示例发布时间:2022-05-30
下一篇:
C++ MaybeStopParser函数代码示例发布时间: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