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

C++ clear_all函数代码示例

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

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



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

示例1: create_modal_dialog

void Ge::activate_new()
{
    if ( graph->is_modified()) {
        int rv = create_modal_dialog( "New", "Graph is not saved.\nDo you want to continue?", "Yes", "Cancel", NULL, NULL);
        if ( rv == wow_eModalDialogReturn_Button1)
            clear_all();
    }
    else
        clear_all();
}
开发者ID:Strongc,项目名称:proview,代码行数:10,代码来源:ge.cpp


示例2: assert

void LIR_OopMapGenerator::process_move(LIR_Op* op) {
  LIR_Op1* op1 = op->as_Op1();
  LIR_Opr src = op1->in_opr();
  LIR_Opr dst = op1->result_opr();
  
  assert(!src->is_stack() || !dst->is_stack(), "No memory-memory moves allowed");
  if ((src->is_stack() && frame_map()->is_spill_pos(src)) ||
      (dst->is_stack() && frame_map()->is_spill_pos(dst))) {
    // Oops in the spill area are handled by another mechanism (see
    // CodeEmitInfo::record_spilled_oops)
    return;
  }
  if (dst->is_oop()) {
    assert((src->is_oop() &&
            (src->is_stack() || src->is_register() || src->is_constant())
           ) ||
           src->is_address(), "Wrong tracking of oops/non-oops in LIR");
    assert(!src->is_stack() || is_marked(src->single_stack_ix()),
           "Error in tracking of oop stores to stack");
    if (dst->is_stack()) {
      mark(dst->single_stack_ix());
    } else if (dst->is_register()) {
      if (LIRCacheLocals) {
        if (local_mapping()->is_cache_reg(dst)) {
          mark(dst);
        }
      } else {
        assert(local_mapping() == NULL, "expected no local mapping");
      }
    }
  } else {
    // !dst->is_oop()
    // Note that dst may be an address
    assert(!src->is_single_stack() || !is_marked(src->single_stack_ix()), "Error in tracking of oop stores to stack");
    assert(!src->is_double_stack() || !is_marked(src->double_stack_ix()), "Error in tracking of oop stores to stack");
    assert(!src->is_double_stack() || !is_marked(1 + src->double_stack_ix()), "Error in tracking of oop stores to stack");
    if (dst->is_stack()) {
      if (dst->is_single_stack()) {
        clear_all(dst->single_stack_ix());
      } else {
        clear_all(dst->double_stack_ix());
        clear_all(1 + dst->double_stack_ix());
      }
    } else if (dst->is_register()) {
      if (LIRCacheLocals) {
        if (local_mapping()->is_cache_reg(dst)) {
          clear_all(dst);
        }
      } else {
        assert(local_mapping() == NULL, "expected no local mapping");
      }
    }
  }
}
开发者ID:fatman2021,项目名称:myforthprocessor,代码行数:54,代码来源:c1_LIROopMapGenerator.cpp


示例3: test_colors

void test_colors(){
    PORTB |= (1<<PB3) | (1<<PB2) | (1<<PB1);
    _delay_ms(2500);
    clear_all();
    PORTB |= (1<<PB3);
    _delay_ms(2500);
    clear_all();
    PORTB |= (1<<PB2);
    _delay_ms(2500);
    clear_all();
    PORTB |= (1<<PB1);
    _delay_ms(2500);
    clear_all();
}
开发者ID:Nephirus,项目名称:moodlamp,代码行数:14,代码来源:main.c


示例4: while

void *recv_line(void *arg) {
    recv_info_t *info = (recv_info_t *)arg;
    int sockfd = info->sockfd;
    Display* display = info->display;
    GC gc = info->gc;
    GC his_gc = info->his_gc;
    GC refresh_gc = info->refresh_gc;
    int window = info->window;
    int i = 0;
    while(sending) {
        int data[5];
        int n = read(sockfd,data,5*sizeof(int));
        if(n < 0) error("ERROR reading from socket");
        if(data[4] == 0) {
            if(is_OK2(data[2], data[3])) {
                XDrawLine(display, window, his_gc, data[0], data[1], data[2], data[3]);
                XDrawLine(display, back_buffer, his_gc, data[0], data[1], data[2], data[3]);
            }
        }
        else if(data[4] == 1) XSetLineAttributes(display, his_gc, data[0], line_style, cap_style, join_style);
        else if(data[4] == 2) XSetForeground(display, his_gc, data[0]);
        else if(data[4] == 3) clear_all(display, window, refresh_gc);
        else if(data[4] == -1) sending = 0; //Our friend died
        XFlush(display);
    }
}
开发者ID:daniel3735928559,项目名称:potato,代码行数:26,代码来源:potato.c


示例5: clear_all

EdbusMessage::~EdbusMessage() {
	if(!dm)
		return;

	clear_all();
	delete dm;
}
开发者ID:edeproject,项目名称:edelib,代码行数:7,代码来源:EdbusMessage.cpp


示例6: set_device_map

		void set_device_map(const device_option_map_t& devmap)
		{
			clear_all();
			for (device_option_map_t::const_iterator iter = devmap.begin(); iter != devmap.end(); ++iter) {
				this->add_new_row(iter->first, iter->second, false);
			}
		}
开发者ID:BackupTheBerlios,项目名称:gsmartcontrol-svn,代码行数:7,代码来源:gsc_preferences_window.cpp


示例7: vidmix_source_enable

/**
 * Enable/disable vidmix source
 *
 * @param src    Video mixer source
 * @param enable True to enable, false to disable
 */
void vidmix_source_enable(struct vidmix_source *src, bool enable)
{
	if (!src)
		return;

	if (src->le.list && enable)
		return;

	if (!src->le.list && !enable)
		return;

	pthread_rwlock_wrlock(&src->mix->rwlock);

	if (enable) {
		if (src->frame_rx)
			clear_frame(src->frame_rx);

		list_append(&src->mix->srcl, &src->le, src);
	}
	else {
		list_unlink(&src->le);
	}

	clear_all(src->mix);

	pthread_rwlock_unlock(&src->mix->rwlock);
}
开发者ID:traviscross,项目名称:librem,代码行数:33,代码来源:vidmix.c


示例8: vidmix_source_put

/**
 * Put a video frame into the video mixer
 *
 * @param src   Video source
 * @param frame Video frame
 */
void vidmix_source_put(struct vidmix_source *src, const struct vidframe *frame)
{
	if (!src || !frame || frame->fmt != VID_FMT_YUV420P)
		return;

	if (!src->frame_rx || !vidsz_cmp(&src->frame_rx->size, &frame->size)) {

		struct vidframe *frm;
		int err;

		err = vidframe_alloc(&frm, VID_FMT_YUV420P, &frame->size);
		if (err)
			return;

		pthread_rwlock_wrlock(&src->mix->rwlock);

		mem_deref(src->frame_rx);
		src->frame_rx = frm;

		clear_all(src->mix);

		pthread_rwlock_unlock(&src->mix->rwlock);
	}

	vidframe_copy(src->frame_rx, frame);
}
开发者ID:traviscross,项目名称:librem,代码行数:32,代码来源:vidmix.c


示例9: main

int main( void )
{
  // Stop watchdog timer to prevent time out reset
	
  unsigned char i,j;
  WDTCTL = WDTPW + WDTHOLD;
  init_fstn();
  clear_all();
  show_hanzi(hanzi_table,0,0);
  show_hanzi(hanzi_table+32,0,16);
  show_hanzi(hanzi_table+64,0,32);
  
  for(i=0;i<4;i++)
  {
	  for(j=0;j<6;j++)
	  {
		  show_hanzi(poem_table+(6*i+j)*32,2*(i+1),j*16);
	  }	  
  }
  
  show_str("123456",//ASCII字符
			   8,//参数page取值为0~11,从上到下
			   120,//参数col取值为0~127从左到右
			   1//是否反显呢?1是0否
			   );
  while(1)
  {
	
  }
}
开发者ID:super-1943,项目名称:MCU,代码行数:30,代码来源:main.c


示例10: main

int main(void){
  int count, v, i, j, start;
  
  pi = atan(1)*4;
  count = 0;
  while (scanf("%d\n", &num_edges) == 1 && num_edges > 0) {
    if (count > 0) printf("\n");
    printf("Case %d\n", ++count);
    clear_all();
    build_graph();
    while ((v = next_node(&start)) != -1) {
      traverse(v, 1, start, start);

      /* DEBUG */      
      printf("\nGraph:\n\n");
      for (i = 0; i < num_nodes; i++) {
	for (j = 0; j < num_nodes; j++) {
	  printf("%3d", graph[i][j]);
	}
	printf("\n");
      }
      printf("\n");
      /* End of DEBUG */
    }
    print_freq();
  }
  return 0;
}
开发者ID:AssaultKoder95,项目名称:codejam,代码行数:28,代码来源:traverse.cpp


示例11: whatdoto_1_svc

control *
whatdoto_1_svc(control *argp, struct svc_req *rqstp)
{
	static control  result;
	if(reset) //se host atual detectou que coordenador caiu
	{
		clear_all();
		result.action = 100;
		reset = 0;
	}
	else if((current_user == manager && was_send == 0) || has_new_player) //envia perguntas caso seja coordenador e nao envio as perguntas
	{									// ou se existe um novo usuario
		result.action = 1;
		has_new_player = 0;
	}
	else if(has_ask == 3 && questions_answered < 3) // requisita resposta quando tem as perguntas e nao forao todas respondidas
	{
		result.action = 2;
	}
	else if(questions_answered == 3 && finished == 0) // requita fim de jogo
	{
		finished = 1;
		result.action = 3;
	}
	//else if(current_user == manager)
	//{
	//	result.action = 4;
	//}
	else
	{
		result.action = 0;
	}

	return &result;
}
开发者ID:Digoss,项目名称:rpc_game,代码行数:35,代码来源:trab_server.c


示例12: module_reset

int module_reset()
{
  if (!win_anthy)
    return 0;
  int v = !is_empty();

  clear_all();
  return v;
}
开发者ID:CarterTsai,项目名称:hime,代码行数:9,代码来源:anthy.cpp


示例13: test_atoi_not_good_string

void test_atoi_not_good_string()
{
	clear_all();
	//not int value in string for atoi
	strcpy(a,"142c123");
	int x;
	int f = myAtoi(a,&x);
	assert(f==-1);
}
开发者ID:smatov,项目名称:task5-6,代码行数:9,代码来源:test.c


示例14: test_atoi_empty

void test_atoi_empty()
{
	clear_all();
	//empty string 
	a[0]='\0';
	int x;
	int f=myAtoi(a,&x);
	assert(f==-1);
}
开发者ID:smatov,项目名称:task5-6,代码行数:9,代码来源:test.c


示例15: on_dot_clicked

//当小数点按下时
void on_dot_clicked(GtkButton * button, gpointer data){
    gint i;
    if(have_result)
        clear_all(); //全部清除
    if(have_dot == FALSE){
        have_dot = TRUE;
        i = g_strlcat(number, ".", 100);
        gtk_entry_set_text(GTK_ENTRY(entry), number);
    }
}
开发者ID:zerist,项目名称:c-,代码行数:11,代码来源:calc.c


示例16: test_reverse_empty

void test_reverse_empty()
{
	clear_all();
	//reverse of emtpy string
	a[0]='\0';
	reverse(a);
	assert(strlen(a)==0);
	assert(a[0]=='\0');
	//accepted
}
开发者ID:smatov,项目名称:task5-6,代码行数:10,代码来源:test.c


示例17: test_strcmp_e2

void test_strcmp_e2()
{
	clear_all();
	//compare 2 empty strings
	a[0]='\0';
	b[0]='\0';
	int x=myStrcmp(a,b,20);
	assert(x==0);
	//accepted
}
开发者ID:smatov,项目名称:task5-6,代码行数:10,代码来源:test.c


示例18: clear_all

void SpriteFrames::_set_frames(const Array &p_frames) {

	clear_all();
	Map<StringName, Anim>::Element *E = animations.find(SceneStringNames::get_singleton()->_default);
	ERR_FAIL_COND(!E);

	E->get().frames.resize(p_frames.size());
	for (int i = 0; i < E->get().frames.size(); i++)
		E->get().frames.write[i] = p_frames[i];
}
开发者ID:UgisBrekis,项目名称:godot,代码行数:10,代码来源:animated_sprite.cpp


示例19: test_strcmp_same

void test_strcmp_same()
{
	clear_all();
	//same strings. n>strlen()
	strcpy(a,"abc");
	strcpy(b,"abc");
	int x=myStrcmp(a,b,5);
	assert(x==0);
	//accepted
}
开发者ID:smatov,项目名称:task5-6,代码行数:10,代码来源:test.c


示例20: test_strcat_over

void test_strcat_over()
{
	//very long string to very short string
	clear_all();
	int n=70;
	strcpy(e,"petya");
	strcpy(d,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
	int f = myStrcat(e,d,n);
	assert(f==-1);
	assert(strlen(e)==5);
}
开发者ID:smatov,项目名称:task5-6,代码行数:11,代码来源:test.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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