您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Args函数代码示例

51自学网 2021-06-01 19:47:28
  C++
这篇教程C++ Args函数代码示例写得很实用,希望能帮到您。

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

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

示例1: main

int main(int argc, char **argv){    GLenum type;    glutInit(&argc, argv);    if (Args(argc, argv) == GL_FALSE) {	exit(1);    }    glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);    type = GLUT_RGB;    type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;    glutInitDisplayMode(type);    if (glutCreateWindow(*argv) == GL_FALSE) {	exit(1);    }    Init();    glutReshapeFunc(Reshape);    glutKeyboardFunc(Key);    glutDisplayFunc(Draw);    glutMainLoop();	return 0;}
开发者ID:Distrotech,项目名称:mesa-demos,代码行数:28,


示例2: CrlRet

/******************************************************************* * Function Name: GetCtr_BlackImg * Return Type 	: GrayImg * Created On	: Oct 10, 2013 * Created By 	: hrushi * Comments		: Returns a Countour mask on a BlackImage background * Arguments	: *******************************************************************/const ColorImg Contour::GetCtrBlackImg( ) const{	ColorImg CrlRet(ContourMask.rows, ContourMask.cols);	CrlRet = CrlRet.Overlay(*this, DISP_DELAY, COLOR_WHITE, false, Args());	return CrlRet;}
开发者ID:hnkulkarni,项目名称:DetectCarriedObjs-PerfEval,代码行数:15,


示例3: LOCTEXT

void FThumbnailSection::BuildSectionContextMenu(FMenuBuilder& MenuBuilder, const FGuid& ObjectBinding){	MenuBuilder.BeginSection(NAME_None, LOCTEXT("ViewMenuText", "View"));	{		MenuBuilder.AddSubMenu(			LOCTEXT("ThumbnailsMenu", "Thumbnails"),			FText(),			FNewMenuDelegate::CreateLambda([=](FMenuBuilder& InMenuBuilder){				TSharedPtr<ISequencer> Sequencer = SequencerPtr.Pin();				FText CurrentTime = FText::FromString(Sequencer->GetZeroPadNumericTypeInterface()->ToString(Sequencer->GetGlobalTime()));				InMenuBuilder.BeginSection(NAME_None, LOCTEXT("ThisSectionText", "This Section"));				{					InMenuBuilder.AddMenuEntry(						LOCTEXT("RefreshText", "Refresh"),						LOCTEXT("RefreshTooltip", "Refresh this section's thumbnails"),						FSlateIcon(),						FUIAction(FExecuteAction::CreateRaw(this, &FThumbnailSection::RedrawThumbnails))					);					InMenuBuilder.AddMenuEntry(						FText::Format(LOCTEXT("SetSingleTime", "Set Thumbnail Time To {0}"), CurrentTime),						LOCTEXT("SetSingleTimeTooltip", "Defines the time at which this section should draw its single thumbnail to the current cursor position"),						FSlateIcon(),						FUIAction(							FExecuteAction::CreateLambda([=]{								SetSingleTime(Sequencer->GetGlobalTime());								GetMutableDefault<UMovieSceneUserThumbnailSettings>()->bDrawSingleThumbnails = true;								GetMutableDefault<UMovieSceneUserThumbnailSettings>()->SaveConfig();							})						)					);				}				InMenuBuilder.EndSection();				InMenuBuilder.BeginSection(NAME_None, LOCTEXT("GlobalSettingsText", "Global Settings"));				{					InMenuBuilder.AddMenuEntry(						LOCTEXT("RefreshAllText", "Refresh All"),						LOCTEXT("RefreshAllTooltip", "Refresh all sections' thumbnails"),						FSlateIcon(),						FUIAction(FExecuteAction::CreateLambda([]{							GetDefault<UMovieSceneUserThumbnailSettings>()->BroadcastRedrawThumbnails();						}))					);					FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");					FDetailsViewArgs Args(false, false, false, FDetailsViewArgs::HideNameArea);					TSharedRef<IDetailsView> DetailView = PropertyModule.CreateDetailView(Args);					DetailView->SetObject(GetMutableDefault<UMovieSceneUserThumbnailSettings>());					InMenuBuilder.AddWidget(DetailView, FText(), true);				}				InMenuBuilder.EndSection();			})		);	}	MenuBuilder.EndSection();}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:60,


示例4: main

intmain(int argc, char **argv){  GLenum type;  glutInit(&argc, argv);  Args(argc, argv);  type = GLUT_RGB;  type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;  glutInitDisplayMode(type);  glutCreateWindow("ABGR extension");  if (!glutExtensionSupported("GL_EXT_abgr")) {    printf("Couldn't find abgr extension./n");    exit(0);  }#if !GL_EXT_abgr  printf("WARNING: client-side OpenGL has no ABGR extension support!/n");  printf("         Drawing only RGBA (and not ABGR) images and textures./n");#endif  Init();  glutKeyboardFunc(Key);  glutDisplayFunc(Draw);  glutMainLoop();  return 0;             /* ANSI C requires main to return int. */}
开发者ID:linghushaoxia,项目名称:glut,代码行数:26,


示例5: GetUserCore

void InternalLink::showPrompt(DesuraId id, Args args){	std::string prompt = args.getArgValue("prompt");	UserCore::Item::ItemInfoI* item = GetUserCore()->getItemManager()->findItemInfo( id );	if (prompt == "update")	{		std::vector<std::string> a;		a.push_back("reminder=true");		showUpdateForm(id, Args(a));	}	else if (prompt == "launch")	{		LaunchItemDialog* form = new LaunchItemDialog(m_pParent);		regForm(id, form);		form->setInfo(item);		form->Show(true);		form->Raise();	}	else if (prompt == "eula")	{		showEULA(id);	}	else if (prompt == "preload")	{		showPreorderPrompt(id, true);	}}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:31,


示例6: main

void main(int argc,char** argv){	if(Args(argc,argv)==GL_FALSE)		auxQuit();	windW=600;	windH=300;	auxInitPosition(0,0,windW,windH);	windType=AUX_DEPTH16;	windType|=(rgb)?AUX_RGB:AUX_INDEX;	windType|=(doubleBuffer)?AUX_DOUBLE:AUX_SINGLE;	auxInitDisplayMode(windType);	if(auxInitWindow("速度测试")==GL_FALSE)		auxQuit();	auxExposeFunc((AUXEXPOSEPROC)Resize);	auxReshapeFunc((AUXRESHAPEPROC)Resize);	auxKeyFunc(AUX_a,Key_a);	auxKeyFunc(AUX_d,Key_d);	auxKeyFunc(AUX_f,Key_f);	auxKeyFunc(AUX_F,Key_F);	auxKeyFunc(AUX_s,Key_s);	auxKeyFunc(AUX_t,Key_t);	auxMainLoop(Paint);}
开发者ID:alannet,项目名称:example,代码行数:28,


示例7: ADDTOCALLSTACK

void CClient::CharDisconnect(){	ADDTOCALLSTACK("CClient::CharDisconnect");	// Disconnect the CChar from the client.	// Even tho the CClient might stay active.	if ( !m_pChar )		return;	Announce(false);	bool fCanInstaLogOut = CanInstantLogOut();	int iLingerTime = g_Cfg.m_iClientLingerTime;	// We are not a client anymore	if ( m_bChatActive )		g_Serv.m_Chats.QuitChat(this);	if ( m_pHouseDesign )		m_pHouseDesign->EndCustomize(true);	if ( IsTrigUsed(TRIGGER_LOGOUT) )	{		CScriptTriggerArgs Args(iLingerTime, fCanInstaLogOut);		m_pChar->OnTrigger(CTRIG_LogOut, m_pChar, &Args);		iLingerTime = static_cast<int>(Args.m_iN1);		fCanInstaLogOut = (Args.m_iN2 != 0);	}	m_pChar->ClientDetach();	// we are not a client any more.	if ( iLingerTime <= 0 )		fCanInstaLogOut = true;	// Gump memory cleanup, we don't want them on logged out players	m_mapOpenedGumps.clear();	// Layer dragging, moving it to backpack	CItem *pItemDragging = m_pChar->LayerFind(LAYER_DRAGGING);	if ( pItemDragging )		m_pChar->ItemBounce(pItemDragging);	// log out immediately ? (test before ClientDetach())	if ( !fCanInstaLogOut )	{		// become an NPC for a little while		CItem *pItemChange = CItem::CreateBase(ITEMID_RHAND_POINT_W);		ASSERT(pItemChange);		pItemChange->SetName("Client Linger");		pItemChange->SetType(IT_EQ_CLIENT_LINGER);		pItemChange->SetTimeout(iLingerTime);		m_pChar->LayerAdd(pItemChange, LAYER_FLAG_ClientLinger);	}	else	{		// remove me from other clients screens now.		m_pChar->SetDisconnected();	}	m_pChar = NULL;}
开发者ID:bucketyied,项目名称:Source,代码行数:59,


示例8: main

int main( int argc, char **argv ){    int success = 0;    GLcharARB *VertexShaderSource, *FragmentShaderSource;    int error = 0;    if (Args(argc, argv) == FALSE)        exit(0);    glutInit( &argc, argv );    glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );    glutInitWindowSize(500, 500);    window = glutCreateWindow( "Fire and Smoke" );    glutIdleFunc( play );    glutDisplayFunc( display );    glutKeyboardFunc( key );    glutReshapeFunc( reshape );    printOpenGLError();    if ( !isExtensionSupported( "GL_ARB_shader_objects" )   ||         !isExtensionSupported( "GL_ARB_fragment_shader" )  ||         !isExtensionSupported( "GL_ARB_vertex_shader" )    ||         !isExtensionSupported( "GL_ARB_shading_language_100" ) )    {        printf("OpenGL Shading Language extensions not available/n" );        return 1;    }    if( error )    {        printf( "ERROR from wglGetProcAddress/n" );    }    createPoints( numParticles );    glDepthFunc( GL_LESS );    glEnable( GL_DEPTH_TEST );	glClearColor( 0.0f, 0.67f, 0.94f, 1.0f );	ParticleTime = 0.0f;    readShaderSource( "smoke", &VertexShaderSource, &FragmentShaderSource );    success = installParticleShaders( VertexShaderSource, FragmentShaderSource );    if ( success )	{		glutMainLoop();	}	else	{		printf( "Error installing particle shaders" );		scanf( "%d", ParticleTime );	}    return 0;}
开发者ID:b01xy,项目名称:smoke,代码行数:59,


示例9: OpenURLInBrowser

bool OpenURLInBrowser(const std::string& URL){  if (URL.empty()) return false;#ifdef G_OS_WIN32  std::string URLTmp = URL;  if (URLTmp.find("file://") == 0)  {    URLTmp = URLTmp.substr(7);  }  return ((int)(ShellExecute(NULL, "open", LPCSTR(URLTmp.c_str()), NULL, NULL, SW_SHOWNORMAL)) > 32);  #endif#ifdef G_OS_UNIX  std::vector<std::string> Args(2,"");  Args[0] = "xdg-open";  Args[1] = URL;  try { Glib::spawn_async("", Args, Glib::SPAWN_SEARCH_PATH); }  catch (Glib::SpawnError& E)  {    Args[0] = "firefox";    try { Glib::spawn_async("", Args, Glib::SPAWN_SEARCH_PATH); }    catch (Glib::SpawnError& E)    {      Args[0] = "chrome";      try { Glib::spawn_async("", Args, Glib::SPAWN_SEARCH_PATH); }      catch (Glib::SpawnError& E)      {        Args[0] = "opera";        try { Glib::spawn_async("", Args, Glib::SPAWN_SEARCH_PATH); }        catch (Glib::SpawnError& E)        {          Args[0] = "mozilla";          try { Glib::spawn_async("", Args, Glib::SPAWN_SEARCH_PATH); }          catch (Glib::SpawnError& E)          {            Args[0] = "netscape";            try { Glib::spawn_async("", Args, Glib::SPAWN_SEARCH_PATH); }            catch (Glib::SpawnError& E)            {              return false;            }          }        }      }    }  }  return true;#endif  return false;}
开发者ID:VaysseB,项目名称:openfluid,代码行数:59,


示例10: Args

void CMempoolComponent::InitFeeEstimate(){    fs::path est_path = Args().GetDataDir() / FEE_ESTIMATES_FILENAME;    CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION);    // Allowed to fail as this file IS missing on first startup.    if (!est_filein.IsNull())        ::feeEstimator.Read(est_filein);    bFeeEstimatesInitialized = true;}
开发者ID:superbitcoin,项目名称:SuperBitcoin,代码行数:9,


示例11: bar

void bar(Args... args) {  foo(Args()...);  foo(args = args...);  foo(reinterpret_cast<void*>(&args)...);  foo(const_cast<const Args>(args)...);  foo(static_cast<void*>(&args)...);  foo(dynamic_cast<void*>(&args)...);  foo(typeid(Args)...);}
开发者ID:Nodplus,项目名称:gcc,代码行数:9,


示例12: startApp

int LightSpeed::AppBase::main_entry( int argc, wchar_t *argv[], ConstStrW pathname){	AutoArray<ConstStrW> params;	params.reserve(argc);	for (int i = 0; i < argc; i++)		params.add(ConstStrW(argv[i]));			appPathname = pathname;	return startApp(Args(params));}
开发者ID:ondra-novak,项目名称:lightspeed,代码行数:9,


示例13: EntryBlock

vector<Value*> AssertionSiteInstrumenter::CollectArgs(    Instruction *Before, const Automaton& A,    Module& Mod, IRBuilder<>& Builder) {  // Find named values to be passed to instrumentation.  std::map<string,Value*> ValuesInScope;  for (auto G = Mod.global_begin(); G != Mod.global_end(); G++)    ValuesInScope[G->getName()] = G;  auto *Fn = Before->getParent()->getParent();  for (auto& Arg : Fn->getArgumentList())    ValuesInScope[Arg.getName()] = &Arg;  auto& EntryBlock(*Fn->begin());  for (auto& I : EntryBlock) {    auto *Inst = dyn_cast<AllocaInst>(&I);    if (!Inst)      break;    ValuesInScope[Inst->getName()] = Builder.CreateLoad(Inst);  }  int ArgSize = 0;  for (auto& Arg : A.getAssertion().argument())    if (!Arg.free())      ArgSize = std::max(ArgSize + 1, Arg.index());  vector<Value*> Args(ArgSize, NULL);  for (auto& Arg : A.getAssertion().argument()) {    if (Arg.free())      continue;    string Name(BaseName(Arg));    if (ValuesInScope.find(Name) == ValuesInScope.end()) {      string s;      raw_string_ostream Out(s);      for (auto v : ValuesInScope) {        Out << "  /"" << v.first << "/": ";        v.second->getType()->print(Out);        Out << "/n";      }      panic("assertion references non-existent variable '" + BaseName(Arg)         + "'; was it defined under '#ifdef TESLA'?/n/n"           "Variables in scope are:/n" + Out.str());    }    Args[Arg.index()] =      GetArgumentValue(ValuesInScope[Name], Arg, Builder, true);  }  return Args;}
开发者ID:cadets,项目名称:tesla-static-analysis,代码行数:56,


示例14: Args

///////////////////////////////////////////////////////////////////////////////// AddDependency///////////////////////////////////////////////////////////////////////////////void cCmdLineParser::AddDependency(int argId1, int argId2, bool mutual ){    // again, no checking for duplicates... would a set    // prove to be a better container for this operation?    std::pair< int, int > Args( argId1, argId2 );    std::pair< std::pair< int, int >, bool > Dep( Args, mutual );     ASSERT(argId1 != argId2);    mDependencyList.push_back( Dep);}
开发者ID:brc0x1,项目名称:tripwire-open-source,代码行数:13,


示例15: FLEXT_ADDMETHOD_

WhiteNoise_ar::WhiteNoise_ar(int argc, t_atom *argv){    FLEXT_ADDMETHOD_(0,"seed",m_seed);    //parse arguments    AtomList Args(argc,argv);    rgen.init(timeseed());    AddOutSignal();}    
开发者ID:Angeldude,项目名称:pd,代码行数:11,


示例16: NLogStream

bool CMempoolComponent::ComponentShutdown(){    NLogStream() << "shutdown CTxMemPool component";    if (bDumpMempoolLater && Args().GetArg<bool>("-persistmempool", DEFAULT_PERSIST_MEMPOOL))    {        DumpMempool();    }    FlushFeeEstimate();    return true;}
开发者ID:superbitcoin,项目名称:SuperBitcoin,代码行数:11,


示例17: FLEXT_ADDMETHOD_

MantissaMask_ar::MantissaMask_ar(int argc,t_atom * argv){    FLEXT_ADDMETHOD_(0,"set",m_set);    AtomList Args(argc,argv);    int bits = sc_getfloatarg(Args,0);    AddOutSignal();    mask = -1 << (23 - bits);    }
开发者ID:Angeldude,项目名称:pd,代码行数:12,


示例18: ADDTOCALLSTACK

bool CDialogDef::GumpSetup( int iPage, CClient * pClient, CObjBase * pObjSrc, lpctstr Arguments ){    ADDTOCALLSTACK("CDialogDef::GumpSetup");    CResourceLock	s;    m_uiControls	= 0;    m_uiTexts		= 0;    m_pObj			= pObjSrc;    m_iOriginX		= 0;    m_iOriginY		= 0;    m_wPage			= (word)(iPage);    m_fNoDispose	= false;    CScriptTriggerArgs	Args(iPage, 0, pObjSrc);    //DEBUG_ERR(("Args.m_s1_raw %s  Args.m_s1 %s  Arguments 0x%x/n",Args.m_s1_raw, Args.m_s1, Arguments));    Args.m_s1_raw = Args.m_s1 = Arguments;    // read text first    if ( g_Cfg.ResourceLock( s, CResourceID( RES_DIALOG, GetResourceID().GetResIndex(), RES_DIALOG_TEXT ) ) )    {        while ( s.ReadKey())        {            if ( m_uiTexts >= (CountOf(m_sText) - 1) )                break;            m_pObj->ParseText( s.GetKeyBuffer(), pClient->GetChar() );            m_sText[m_uiTexts] = s.GetKey();            m_uiTexts++;        }    }    else    {        // no gump text?    }    // read the main dialog    if ( !ResourceLock( s ) )        return false;    if ( !s.ReadKey() )		// read the size.        return false;    // starting x,y location.    int64 iSizes[2];    tchar * pszBuf = s.GetKeyBuffer();    m_pObj->ParseText( pszBuf, pClient->GetChar() );    Str_ParseCmds( pszBuf, iSizes, CountOf(iSizes) );    m_x		= (int)(iSizes[0]);    m_y		= (int)(iSizes[1]);    if ( OnTriggerRunVal( s, TRIGRUN_SECTION_TRUE, pClient->GetChar(), &Args ) == TRIGRET_RET_TRUE )        return false;    return true;}
开发者ID:Sphereserver,项目名称:Source2,代码行数:53,


示例19: FLEXT_ADDBANG

WhiteNoise_kr::WhiteNoise_kr(int argc, t_atom *argv){    FLEXT_ADDBANG(0,m_perform);    FLEXT_ADDMETHOD_(0,"seed",m_seed);    //parse arguments    AtomList Args(argc,argv);        rgen.init(timeseed());    AddOutFloat();}
开发者ID:Angeldude,项目名称:pd,代码行数:12,


示例20: main

int main(int argc, char **argv){    GLenum type;    char *s;    char *extName = "GL_EXT_blend_logic_op";    char *version;    glutInit(&argc, argv);    if (Args(argc, argv) == GL_FALSE) {	exit(1);    }    glutInitWindowPosition(0, 0); glutInitWindowSize( 400, 400);    type = GLUT_RGB;    type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;    glutInitDisplayMode(type);    if (glutCreateWindow("Blend XOR") == GL_FALSE) {	exit(1);    }    glewInit();    /* Make sure blend_logic_op extension is there. */    s = (char *) glGetString(GL_EXTENSIONS);    version = (char*) glGetString(GL_VERSION);    if (!s)	exit(1);    if (strstr(s,extName)) {	supportlogops = 1;        use11ops = 0;        printf("blend_logic_op extension available./n");    }    if (strncmp(version,"1.1",3)>=0) {    	supportlogops += 2;        use11ops = 1;	printf("1.1 color logic ops available./n");    }    if (supportlogops == 0) {    	printf("Blend_logic_op extension and GL 1.1 not present./n");	exit(1);    }    Init();    glutReshapeFunc(Reshape);    glutKeyboardFunc(Key);    glutDisplayFunc(Draw);    glutMainLoop();	return 0;}
开发者ID:Distrotech,项目名称:mesa-demos,代码行数:53,


示例21: FLEXT_ADDMETHOD_

Lag_ar::Lag_ar(int argc,t_atom * argv){    FLEXT_ADDMETHOD_(0,"lagTime",m_set);    AtomList Args(argc,argv);    m_lag = sc_getfloatarg(Args,0);    AddOutSignal();    m_y1 = 0.f;}
开发者ID:Angeldude,项目名称:pd,代码行数:12,


示例22: Args

CoinGate_kr::CoinGate_kr(int argc, t_atom *argv){    AtomList Args(argc,argv);        rgen.init(timeseed());    prob = sc_getfloatarg(Args,0);            FLEXT_ADDBANG(0,m_bang);    FLEXT_ADDMETHOD_(0,"seed",m_seed);    AddOutBang();}
开发者ID:Angeldude,项目名称:pd,代码行数:12,


示例23: Args

MantissaMask_kr::MantissaMask_kr(int argc,t_atom * argv){    AtomList Args(argc,argv);    int bits = sc_getfloatarg(Args,0);    AddInFloat();    AddOutFloat();    FLEXT_ADDMETHOD(0,m_perform);    FLEXT_ADDMETHOD_(0,"set",m_set);    mask = -1 << (23 - bits);}
开发者ID:Angeldude,项目名称:pd,代码行数:13,



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


C++ ArgumentException函数代码示例
C++ ArenaType函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。