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

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

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

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

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

示例1: BOptionPopUp

PriorityControl::PriorityControl(const char *name, const char *label,		uint32 flags)		:		BOptionPopUp(name, label, new BMessage(kPriorityChanged), flags){	AddOption(MAKE_STRING(LOW), B_LOW_PRIORITY);	AddOption(MAKE_STRING(NORMAL), B_NORMAL_PRIORITY);	AddOption(MAKE_STRING(HIGH), B_NORMAL_PRIORITY + 2);}
开发者ID:diversys,项目名称:bescreencapture,代码行数:9,


示例2: prep_dhcp_discover

// add DHCP DISCOVER fields to a basic BOOTP requeststatic intprep_dhcp_discover(bootp_header_t *b){    unsigned char  *p = b->bp_vend;    AddOption(p, dhcpCookie);    AddOption(p, dhcpDiscover);    AddOption(p, dhcpParamRequestList);    AddOption(p, dhcpEnd);    if (p < &b->bp_vend[BP_MIN_VEND_SIZE])        p = &b->bp_vend[BP_MIN_VEND_SIZE];    return p - (unsigned char *)b;}
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:13,


示例3: BuildSignature

void GetProjectInfoCommandType::BuildSignature(CommandSignature &signature){   auto infoTypeValidator = make_movable<OptionValidator>();   infoTypeValidator->AddOption(wxT("Name"));   infoTypeValidator->AddOption(wxT("NumberOfTracks"));   infoTypeValidator->AddOption(wxT("SelectedTracks"));   infoTypeValidator->AddOption(wxT("MuteTracks"));   infoTypeValidator->AddOption(wxT("SoloTracks"));   infoTypeValidator->AddOption(wxT("FocusedTrackID")); // returns the Track ID number of the track in focus   signature.AddParameter(wxT("Type"), wxT("Name"), std::move(infoTypeValidator));}
开发者ID:henricj,项目名称:audacity,代码行数:12,


示例4: BuildSignature

void ExportCommandType::BuildSignature(CommandSignature &signature){   auto modeValidator = make_movable<OptionValidator>();   modeValidator->AddOption(wxT("All"));   modeValidator->AddOption(wxT("Selection"));   signature.AddParameter(wxT("Mode"), wxT("All"), std::move(modeValidator));   auto filenameValidator = make_movable<DefaultValidator>();   signature.AddParameter(wxT("Filename"), wxT("exported.wav"), std::move(filenameValidator));   auto channelsValidator = make_movable<IntValidator>();   signature.AddParameter(wxT("Channels"), 1, std::move(channelsValidator));}
开发者ID:RaphaelMarinier,项目名称:audacity,代码行数:13,


示例5: prep_dhcp_request

// add DHCP REQUEST fields to a basic BOOTP request using data from supplied DHCP OFFERstatic intprep_dhcp_request(bootp_header_t *b, bootp_header_t *offer){    unsigned char  *p = b->bp_vend;    AddOption(p, dhcpCookie);    AddOption(p, dhcpRequest);    AddOption(p, dhcpRequestIP);    memcpy(p, &offer->bp_yiaddr, dhcpRequestIP[1]);    p += dhcpRequestIP[1];                            // Ask for the address just given    AddOption(p, dhcpParamRequestList);    AddOption(p, dhcpEnd);    if (p < &b->bp_vend[BP_MIN_VEND_SIZE])        p = &b->bp_vend[BP_MIN_VEND_SIZE];    return p - (unsigned char *)b;}
开发者ID:Palantir555,项目名称:ecos-mars-zx3,代码行数:16,


示例6: AddOption

/**/brief Add multiple options *  If there were no options before, the first option is the new default. *  /param[in] options The list of new options. */Dropdown* Dropdown::AddOptions( list<string> options ) {	list<string>::iterator iter;	for( iter = options.begin(); iter != options.end(); ++iter ) {		AddOption( *iter );	}	return this;}
开发者ID:DuMuT6p,项目名称:Epiar,代码行数:11,


示例7: ReadOptionsFromCommandLine

void ReadOptionsFromCommandLine (int argc, char **argv){  int i, key, mod;  for (i = 1; i < argc; i++) {    mod = 1;    if (argv[i][0] != '-') {      if (i == 1)	continue;      else	mod = 0;    }    key = 0;    while (key < n_options && strcmp (&argv[i][mod], options[key]) != 0) {      key++;    }    if (key < n_options) {      i++;      if (i < argc)	mod = AddOption (key, argv[i]);      else	printf ("Didn't find value before end of command line option./n");      if (mod == 0)	i--;    }    else {      printf ("Unrecognised option %s. Continuing./n", argv[i]);    }  }}
开发者ID:timmassingham,项目名称:SLR,代码行数:30,


示例8: switch

void wxCmdLineParser::SetDesc(const wxCmdLineEntryDesc *desc){    for ( ;; desc++ )    {        switch ( desc->kind )        {            case wxCMD_LINE_SWITCH:                AddSwitch(desc->shortName, desc->longName, desc->description,                          desc->flags);                break;            case wxCMD_LINE_OPTION:                AddOption(desc->shortName, desc->longName, desc->description,                          desc->type, desc->flags);                break;            case wxCMD_LINE_PARAM:                AddParam(desc->description, desc->type, desc->flags);                break;            default:                wxFAIL_MSG( _T("unknown command line entry type") );                // still fall through            case wxCMD_LINE_NONE:                return;        }    }}
开发者ID:EdgarTx,项目名称:wx,代码行数:29,


示例9: AddOption

void CUrlOptions::AddOption(const std::string &key, const char *value){  if (key.empty() || value == NULL)    return;  return AddOption(key, std::string(value));}
开发者ID:AchimTuran,项目名称:xbmc,代码行数:7,


示例10: GetISystem

void CProfileOptions::Init(){	XmlNodeRef root = GetISystem()->LoadXmlFromFile("libs/config/profiles/default/attributes.xml");	if(!root)	{		CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "Failed loading attributes.xml");		return;	}	CGameXmlParamReader reader(root);	const int childCount = reader.GetUnfilteredChildCount();	m_allOptions.reserve(childCount);	for (int i = 0; i < childCount; ++i)	{		XmlNodeRef node = reader.GetFilteredChildAt(i);		if(node)		{			AddOption(node);		}	}	IPlayerProfileManager* const profileManager = g_pGame->GetIGameFramework()->GetIPlayerProfileManager();	CRY_ASSERT_MESSAGE(profileManager != NULL, "IPlayerProfileManager doesn't exist - profile options will not be updated");	if(profileManager)		profileManager->AddListener(this, false);}
开发者ID:aronarts,项目名称:FireNET,代码行数:28,


示例11: AddOption

void CProfileOptions::SetOptionValue(const char* command, const char* param, bool toPendingOptions){	if (!command || !command[0])		return;	if (!param)		return;		  if(!IsOption(command))  {    AddOption(command, param);  }  if (toPendingOptions)  {    AddOrReplacePendingOption(command, param);    return;  }	ScopedSwitchToGlobalHeap globalHeap;  std::vector<COption*>::const_iterator it = m_allOptions.begin();  std::vector<COption*>::const_iterator end = m_allOptions.end();  for(; it!=end; ++it)  {    if((*it)->GetName().compare(command)==0)    {      (*it)->Set(param);    }  }}
开发者ID:aronarts,项目名称:FireNET,代码行数:31,


示例12: SetClassPath

static voidSetClassPath(char *s){    char *def = MemAlloc(strlen(s) + 40);    sprintf(def, "-Djava.class.path=%s", s);    AddOption(def, NULL);}
开发者ID:zxlooong,项目名称:jdk14219,代码行数:7,


示例13: AddOption

EditorColourSet::EditorColourSet(const EditorColourSet& other) // copy ctor{    m_Name = other.m_Name;    m_Sets.clear();    for (OptionSetsMap::const_iterator it = other.m_Sets.begin(); it != other.m_Sets.end(); ++it)    {        OptionSet& mset = m_Sets[it->first];        mset.m_Langs = it->second.m_Langs;        mset.m_Lexers = it->second.m_Lexers;        for (int i = 0; i <= wxSCI_KEYWORDSET_MAX; ++i)        {            mset.m_Keywords[i] = it->second.m_Keywords[i];            mset.m_originalKeywords[i] = it->second.m_originalKeywords[i];        }        mset.m_FileMasks = it->second.m_FileMasks;        mset.m_originalFileMasks = it->second.m_originalFileMasks;        mset.m_SampleCode = it->second.m_SampleCode;        mset.m_BreakLine = it->second.m_BreakLine;        mset.m_DebugLine = it->second.m_DebugLine;        mset.m_ErrorLine = it->second.m_ErrorLine;        mset.comment = it->second.comment;        mset.m_CaseSensitive = it->second.m_CaseSensitive;        const OptionColours& value = it->second.m_Colours;        for (unsigned int i = 0; i < value.GetCount(); ++i)        {            AddOption(it->first, value[i]);        }    }}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:31,


示例14: _T

void CompilerOptions::AddOption(const wxString& name,								const wxString& option,								const wxString& category,								const wxString& additionalLibs,								bool doChecks,								const wxString& checkAgainst,								const wxString& checkMessage){	if (name.IsEmpty() || (option.IsEmpty() && additionalLibs.IsEmpty()))		return;	CompOption* coption = new CompOption;	wxString listboxname = name + _T("  [");	if (option.IsEmpty())        listboxname += additionalLibs;    else        listboxname += option;    listboxname += _T("]");	coption->name = listboxname;	coption->option = option;	coption->additionalLibs = additionalLibs;	coption->enabled = false;	coption->category = category;	coption->doChecks = doChecks;	coption->checkAgainst = checkAgainst;	coption->checkMessage = checkMessage;	AddOption(coption);}
开发者ID:stahta01,项目名称:codeAdapt_IDE,代码行数:29,


示例15: AddOption

voidCmdOptions::AddSoloOption (QString longName,                          QString shortName,                          QString msg){  Option * thisopt = AddOption (longName, shortName, msg);  thisopt->theType = Opt_Solo;}
开发者ID:berndhs,项目名称:carpo,代码行数:8,


示例16: AddApplicationOptions

/* * For our tools, we try to add 3 VM options: *	-Denv.class.path=<envcp> *	-Dapplication.home=<apphome> *	-Djava.class.path=<appcp> * <envcp>   is the user's setting of CLASSPATH -- for instance the user *           tells javac where to find binary classes through this environment *           variable.  Notice that users will be able to compile against our *           tools classes (sun.tools.javac.Main) only if they explicitly add *           tools.jar to CLASSPATH. * <apphome> is the directory where the application is installed. * <appcp>   is the classpath to where our apps' classfiles are. */static jbooleanAddApplicationOptions(){    const int NUM_APP_CLASSPATH = (sizeof(app_classpath) / sizeof(char *));    char *s, *envcp, *appcp, *apphome;    char home[MAXPATHLEN]; /* application home */    char separator[] = { PATH_SEPARATOR, '/0' };    int size, i;    int strlenHome;    s = getenv("CLASSPATH");    if (s) {	/* 40 for -Denv.class.path= */	envcp = (char *)MemAlloc(strlen(s) + 40);	sprintf(envcp, "-Denv.class.path=%s", s);	AddOption(envcp, NULL);    }    if (!GetApplicationHome(home, sizeof(home))) {	ReportErrorMessage("Can't determine application home", JNI_TRUE);	return JNI_FALSE;    }    /* 40 for '-Dapplication.home=' */    apphome = (char *)MemAlloc(strlen(home) + 40);    sprintf(apphome, "-Dapplication.home=%s", home);    AddOption(apphome, NULL);    /* How big is the application's classpath? */    size = 40;                                 /* 40: "-Djava.class.path=" */    strlenHome = (int)strlen(home);    for (i = 0; i < NUM_APP_CLASSPATH; i++) {	size += strlenHome + (int)strlen(app_classpath[i]) + 1; /* 1: separator */    }    appcp = (char *)MemAlloc(size + 1);    strcpy(appcp, "-Djava.class.path=");    for (i = 0; i < NUM_APP_CLASSPATH; i++) {	strcat(appcp, home);			/* c:/program files/myapp */	strcat(appcp, app_classpath[i]);	/* /lib/myapp.jar	  */	strcat(appcp, separator);		/* ;			  */    }    appcp[strlen(appcp)-1] = '/0';  /* remove trailing path separator */    AddOption(appcp, NULL);    return JNI_TRUE;}
开发者ID:zxlooong,项目名称:jdk14219,代码行数:58,


示例17: Option

int Configuration::AddOption( char *name, int value, int max, int increment){	Option *option = new Option();	option->name = name;	option->max = max;	option->increment = increment;	option->value = value;	return AddOption( option);}
开发者ID:colemang,项目名称:SHSEntropy2014JV,代码行数:9,


示例18: CMFCPropertyGridProperty

CMFCPropertyGridProperty * ChannelGrid::CreatePlugin(){	auto pGroup = new CMFCPropertyGridProperty(_T("插件"));	auto pProp = new CMFCPropertyGridProperty(_T("插件"),		(_variant_t)_T("Example"), _T("插件选择"));	pProp->AddOption(_T("MultiNet"));	pProp->AddOption(_T("Example"));	pProp->AllowEdit(FALSE);	pGroup->AddSubItem(pProp);	pGroup->AddSubItem(new CMFCPropertyGridPluginProperty(_T("本地插件配置"),		pProp, (_variant_t)_T(""), _T("远端插件配置")));	pGroup->AddSubItem(new CMFCPropertyGridPluginProperty(_T("本地插件配置"), 		pProp, (_variant_t)_T(""), _T("远端插件配置")));	return pGroup;}
开发者ID:kooiot,项目名称:rdc,代码行数:18,


示例19: SetJavaLauncherPlatformProps

void SetJavaLauncherPlatformProps() {   /* Linux only */#ifdef __linux__    const char *substr = "-Dsun.java.launcher.pid=";    char *pid_prop_str = (char *)JLI_MemAlloc(JLI_StrLen(substr) + MAX_PID_STR_SZ + 1);    sprintf(pid_prop_str, "%s%d", substr, getpid());    AddOption(pid_prop_str, NULL);#endif}
开发者ID:cncomkyle,项目名称:openjdk_7_b147,代码行数:9,


示例20: AddOption

//// Load URL from config.//void FURL::LoadURLConfig( const TCHAR* Section, const FString& Filename ){	TArray<FString> Options;	GConfig->GetSection( Section, Options, Filename );	for( int32 i=0;i<Options.Num();i++ )	{		AddOption( *Options[i] );	}}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:12,


示例21: AddOption

voidCmdOptions::AddIntOption (const QString longName,                          const QString shortName,                          const QString msg){  Option * thisopt = AddOption (longName, shortName, msg);  thisopt->theType = Opt_Int;  thisopt->theValue.setValue(0);}
开发者ID:berndhs,项目名称:drss,代码行数:9,



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


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