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


C++ BB_T函数代码示例

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


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

示例1: gcMark

bbString t_mx2_Translator::m_AllocGCTmp(t_mx2_Type* l_type){
  struct f0_t : public bbGCFrame{
    t_mx2_Translator_GCTmp* l_tmp{};
    void gcMark(){
      bbGCMarkPtr(l_tmp);
    }
  }f0{};
  {
    bbInt l_i=bbInt(0);
    for(;(l_i<this->m__0gcframe->m_tmps->m_Length());l_i+=1){
      struct f2_t : public bbGCFrame{
        t_mx2_Translator_GCTmp* l_tmp{};
        void gcMark(){
          bbGCMarkPtr(l_tmp);
        }
      }f2{};
      f2.l_tmp=this->m__0gcframe->m_tmps->m__idx(l_i);
      if((f2.l_tmp->m_used||!f2.l_tmp->m_type->m_Equals(l_type))){
        continue;
      }
      f2.l_tmp->m_used=true;
      return ((this->m__0gcframe->m_ident+BB_T("."))+f2.l_tmp->m_ident);
    }
  }
  f0.l_tmp=bbGCNew<t_mx2_Translator_GCTmp>();
  f0.l_tmp->m_used=true;
  f0.l_tmp->m_type=l_type;
  f0.l_tmp->m_ident=(BB_T("t")+bbString(this->m__0gcframe->m_tmps->m_Length()));
  this->m__0gcframe->m_tmps->m_Push(f0.l_tmp);
  return ((this->m__0gcframe->m_ident+BB_T("."))+f0.l_tmp->m_ident);
}
开发者ID:abakobo,项目名称:m2,代码行数:31,代码来源:mx2cc_translator.cpp

示例2:

bbString t_mx2_GenArgType::m_ToString(){
  bbString l_str=(this->m_ident+BB_T("?"));
  if(bbBool(this->m_types)){
    l_str+=((BB_T("<")+g_mx2_Join_1Tt_mx2_Type_2(this->m_types,BB_T(",")))+BB_T(">"));
  }
  return l_str;
}
开发者ID:abakobo,项目名称:m2,代码行数:7,代码来源:mx2cc_type.cpp

示例3: gcMark

t_mx2_Stmt* t_mx2_ThrowStmtExpr::m_OnSemant(t_mx2_Block* l_block){
  if(bbBool(this->m_expr)){
    struct f1_t : public bbGCFrame{
      t_mx2_ClassType* l_ctype{};
      t_mx2_Value* l_value{};
      t_mx2_Stmt* t0{};
      void gcMark(){
        bbGCMarkPtr(l_ctype);
        bbGCMarkPtr(l_value);
        bbGCMarkPtr(t0);
      }
    }f1{};
    f1.l_value=this->m_expr->m_SemantRValue(((t_mx2_Scope*)(l_block)),((t_mx2_Type*)0));
    f1.l_ctype=g_mx2_TCast_1Tt_mx2_ClassType_2(f1.l_value->m_type);
    if((!bbBool(f1.l_ctype)||!f1.l_ctype->m_ExtendsType(((t_mx2_Type*)(g_mx2_Type_ThrowableClass))))){
      throw bbGCNew<t_mx2_SemantEx>(BB_T("Thrown value type must extend 'Throwable'"));
    }
    l_block->m_Emit(f1.t0=((t_mx2_Stmt*)(bbGCNew<t_mx2_ThrowStmt>(((t_mx2_PNode*)(this)),f1.l_value))));
    l_block->m_reachable=false;
  }else if(l_block->m_inex){
    struct f1_t : public bbGCFrame{
      t_mx2_Stmt* t0{};
      void gcMark(){
        bbGCMarkPtr(t0);
      }
    }f1{};
    l_block->m_Emit(f1.t0=((t_mx2_Stmt*)(bbGCNew<t_mx2_ThrowStmt>(((t_mx2_PNode*)(this)),((t_mx2_Value*)0)))));
    l_block->m_reachable=false;
  }else{
    throw bbGCNew<t_mx2_SemantEx>(BB_T("Exceptions can only be rethrown inside 'Catch' blocks"));
  }
  return ((t_mx2_Stmt*)0);
}
开发者ID:abakobo,项目名称:m2,代码行数:33,代码来源:mx2cc_stmtexpr.cpp

示例4: g_mx2_EmitStmts

void t_mx2_RepeatStmtExpr::m_Emit(t_std_collections_Stack_1s* l_buf,bbString l_spc){
  l_buf->m_Push((l_spc+BB_T("repeat")));
  g_mx2_EmitStmts(this->m_stmts,l_buf,l_spc);
  if(bbBool(this->m_expr)){
    l_buf->m_Push(((l_spc+BB_T("until "))+this->m_expr->m_ToString()));
  }else{
    l_buf->m_Push((l_spc+BB_T("forever")));
  }
}
开发者ID:abakobo,项目名称:m2,代码行数:9,代码来源:mx2cc_stmtexpr.cpp

示例5: BB_T

bbString t_mx2_PrimType::m_TypeId(){
  if(this==g_mx2_Type_IntType){
    return BB_T("i");
  }else if(this==g_mx2_Type_FloatType){
    return BB_T("f");
  }else if(this==g_mx2_Type_StringType){
    return BB_T("s");
  }
  return BB_T("?");
}
开发者ID:abakobo,项目名称:m2,代码行数:10,代码来源:mx2cc_type.cpp

示例6:

t_mx2_VarValue::t_mx2_VarValue(t_mx2_VarDecl* l_vdecl,t_mx2_Scope* l_scope){
  this->m_pnode=((t_mx2_PNode*)(l_vdecl));
  this->m_vdecl=l_vdecl;
  this->m_scope=l_scope;
  this->m_transFile=l_scope->m_FindFile()->m_fdecl;
  this->m_cscope=bb_object_cast<t_mx2_ClassScope*>(l_scope);
  if((((l_vdecl->m_kind==BB_T("global"))||(l_vdecl->m_kind==BB_T("local")))||(l_vdecl->m_kind==BB_T("param")))){
    this->m_flags|=(g_mx2_VALUE_0LVALUE|g_mx2_VALUE_0ASSIGNABLE);
  }
}
开发者ID:abakobo,项目名称:m2,代码行数:10,代码来源:mx2cc_var.cpp

示例7: return

t_mx2_Value* t_mx2_VarValue::m_ToValue(t_mx2_Value* l_instance){
  if((this->m_vdecl->m_kind==BB_T("field"))){
    if(!bbBool(l_instance)){
      throw bbGCNew<t_mx2_SemantEx>(((BB_T("Field '")+this->m_vdecl->m_ident)+BB_T("' cannot be accessed without an instance")));
    }
    if(!l_instance->m_type->m_ExtendsType(((t_mx2_Type*)(this->m_cscope->m_ctype)))){
      throw bbGCNew<t_mx2_SemantEx>(((BB_T("Field '")+this->m_vdecl->m_ident)+BB_T("' cannot be accessed from an instance of a different class")));
    }
    return ((t_mx2_Value*)(bbGCNew<t_mx2_MemberVarValue>(l_instance,this)));
  }
  return ((t_mx2_Value*)(this));
}
开发者ID:abakobo,项目名称:m2,代码行数:12,代码来源:mx2cc_var.cpp

示例8:

void t_mx2_Translator::m_Emit(bbString l_str){
  if(!bbBool(l_str)){
    return;
  }
  if(l_str.startsWith(BB_T("}"))){
    this->m__0indent=this->m__0indent.slice(bbInt(0),-2);
  }
  this->m__0buf->m_Push((this->m__0indent+l_str));
  if(l_str.endsWith(BB_T("{"))){
    this->m__0indent+=BB_T("  ");
  }
}
开发者ID:abakobo,项目名称:m2,代码行数:12,代码来源:mx2cc_translator.cpp

示例9: return

bbString t_mx2_Translator::m_CFuncType(t_mx2_FuncType* l_type){
  bbString l_retType=this->m_TransType(l_type->m_retType);
  bbString l_argTypes=bbString{};
  {
    bbInt l_i=bbInt(0);
    for(;(l_i<l_type->m_argTypes->length());l_i+=1){
      if(bbBool(l_argTypes)){
        l_argTypes+=BB_T(",");
      }
      l_argTypes+=this->m_TransType(l_type->m_argTypes->at(l_i));
    }
  }
  return (((l_retType+BB_T("("))+l_argTypes)+BB_T(")"));
}
开发者ID:abakobo,项目名称:m2,代码行数:14,代码来源:mx2cc_translator.cpp

示例10: g_mx2_IsGCType

bbBool g_mx2_IsGCType(t_mx2_Type* l_type){
  struct f0_t : public bbGCFrame{
    t_mx2_ClassType* l_ctype{};
    void gcMark(){
      bbGCMarkPtr(l_ctype);
    }
  }f0{};
  if(bbBool(g_mx2_TCast_1Tt_mx2_FuncType_2(l_type))){
    return true;
  }
  if(bbBool(g_mx2_TCast_1Tt_mx2_ArrayType_2(l_type))){
    return true;
  }
  f0.l_ctype=g_mx2_TCast_1Tt_mx2_ClassType_2(l_type);
  if(!bbBool(f0.l_ctype)){
    return false;
  }
  if(f0.l_ctype->m_IsVoid()){
    return false;
  }
  if(((f0.l_ctype->m_cdecl->m_kind==BB_T("class"))||(f0.l_ctype->m_cdecl->m_kind==BB_T("interface")))){
    return true;
  }
  if((f0.l_ctype->m_cdecl->m_kind==BB_T("struct"))){
    {
      struct f2_t : public bbGCFrame{
        t_std_collections_Stack_1Tt_mx2_VarValue_2_Iterator l_0{};
        void gcMark(){
          bbGCMark(l_0);
        }
      }f2{};
      f2.l_0=f0.l_ctype->m_fields->m_All();
      for(;!f2.l_0.m_AtEnd();f2.l_0.m_Bump()){
        struct f3_t : public bbGCFrame{
          t_mx2_VarValue* l_vvar{};
          void gcMark(){
            bbGCMarkPtr(l_vvar);
          }
        }f3{};
        f3.l_vvar=f2.l_0.m_Current();
        if(g_mx2_IsGCType(f3.l_vvar->m_type)){
          return true;
        }
      }
    }
    return false;
  }
  return false;
}
开发者ID:abakobo,项目名称:m2,代码行数:49,代码来源:mx2cc_translator.cpp

示例11: RequestFile

bbString bbRequesters::RequestFile( bbString title,bbString exts,bbBool save,bbString path ){

	bbString cmd=BB_T("zenity --title=\"")+title+BB_T("\" --file-selection");

	FILE *f=popen( cmd.toUtf8String(),"r" );
	if( !f ) return "";
	
	char buf[PATH_MAX];
	int n=fread( buf,1,PATH_MAX,f );
	pclose( f );
	
	if( n<0 || n>PATH_MAX ) return "";
	
	while( n && buf[n-1]<=32 ) --n;
	
	return bbString::fromUtf8( buf,n );
}
开发者ID:nitrologic,项目名称:nitrosdk,代码行数:17,代码来源:requesters.cpp

示例12: bbDebugAssert

void t_std_collections_Stack_1Tt_default_Voice_2::m_Erase(bbInt l_index){
  bbDebugAssert(((l_index>=bbInt(0))&&(l_index<=this->m__0length)),BB_T("Debug assert failed"));
  if((l_index==this->m__0length)){
    return;
  }
  this->m__0data->copyTo(this->m__0data,(l_index+1),l_index,((this->m__0length-l_index)-1));
  this->m_Resize((this->m__0length-1));
}
开发者ID:swoolcock,项目名称:m2,代码行数:8,代码来源:vsynth_std_collections_2stack.cpp

示例13: init

t_mx2_Translator_GCFrame::t_mx2_Translator_GCFrame(t_mx2_Translator_GCFrame* l_outer,bbInt l_inspos){
  init();
  this->m_outer=l_outer;
  this->m_inspos=l_inspos;
  if(bbBool(l_outer)){
    this->m_depth=(l_outer->m_depth+1);
  }
  this->m_ident=(BB_T("f")+bbString(this->m_depth));
}
开发者ID:abakobo,项目名称:m2,代码行数:9,代码来源:mx2cc_translator.cpp

示例14: gcMark

bbString t_mx2_FuncType::m_Name(){
  bbString l_args=bbString{};
  {
    bbInt l_0=bbInt(0);
    bbInt l_1=this->m_argTypes->length();
    for(;(l_0<l_1);l_0+=1){
      struct f2_t : public bbGCFrame{
        t_mx2_Type* l_arg{};
        void gcMark(){
          bbGCMarkPtr(l_arg);
        }
      }f2{};
      f2.l_arg=this->m_argTypes->at(l_0);
      l_args+=(BB_T(",")+f2.l_arg->m_Name());
    }
  }
  return (((this->m_retType->m_Name()+BB_T("("))+l_args.slice(1))+BB_T(")"));
}
开发者ID:abakobo,项目名称:m2,代码行数:18,代码来源:mx2cc_type.cpp

示例15: system_

int system_( const char *cmd ){

#if _WIN32

	bool inherit=false;
	DWORD flags=CREATE_NO_WINDOW;
	STARTUPINFOA si={sizeof(si)};
	PROCESS_INFORMATION pi={0};
	
	bbString tmp=BB_T( "cmd /S /C\"" )+BB_T( cmd )+BB_T( "\"" );
	
	if( GetStdHandle( STD_OUTPUT_HANDLE ) ){
	
		inherit=true;
		si.dwFlags=STARTF_USESTDHANDLES;
		si.hStdInput=GetStdHandle( STD_INPUT_HANDLE );
		si.hStdOutput=GetStdHandle( STD_OUTPUT_HANDLE );
		si.hStdError=GetStdHandle( STD_ERROR_HANDLE );
	}
	
	if( GetConsoleWindow() ){

		flags=0;
	}
	
	if( !CreateProcessA( 0,(LPSTR)tmp.c_str(),0,0,inherit,flags,0,0,&si,&pi ) ) return -1;

	WaitForSingleObject( pi.hProcess,INFINITE );
	
	int res=GetExitCodeProcess( pi.hProcess,(DWORD*)&res ) ? res : -1;
	
	CloseHandle( pi.hProcess );
	CloseHandle( pi.hThread );

	return res;

#else

	return system( cmd );

#endif

}
开发者ID:abakobo,项目名称:monkey2,代码行数:43,代码来源:libc.cpp


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