这篇教程C++ Enabled函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中Enabled函数的典型用法代码示例。如果您正苦于以下问题:C++ Enabled函数的具体用法?C++ Enabled怎么用?C++ Enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了Enabled函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: Enabledvoid Node::Kill(bool bState){ if(bState) Enabled(false); else Enabled(m_bInitEnabled);}
开发者ID:NeuroRoboticTech,项目名称:AnimatLabPublicSource,代码行数:7,
示例2: ipv6cp_LayerUpstatic intipv6cp_LayerUp(struct fsm *fp){ /* We're now up */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); char tbuff[40]; log_Printf(LogIPV6CP, "%s: LayerUp./n", fp->link->name); if (!ipv6cp_InterfaceUp(ipv6cp)) return 0; snprintf(tbuff, sizeof tbuff, "%s", ncpaddr_ntoa(&ipv6cp->myaddr)); log_Printf(LogIPV6CP, "myaddr %s hisaddr = %s/n", tbuff, ncpaddr_ntoa(&ipv6cp->hisaddr));#ifndef NORADIUS radius_Account_Set_Ipv6(&fp->bundle->radacct6, ipv6cp->his_ifid); radius_Account(&fp->bundle->radius, &fp->bundle->radacct6, fp->bundle->links, RAD_START, &ipv6cp->throughput); /* * XXX: Avoid duplicate evaluation of filterid between IPCP and * IPV6CP. When IPCP is enabled and rejected, filterid is not * evaluated. */ if (!Enabled(fp->bundle, OPT_IPCP)) { if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, NULL, NULL); }#endif /* * XXX this stuff should really live in the FSM. Our config should * associate executable sections in files with events. */ if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) { /* * XXX: Avoid duplicate evaluation of label between IPCP and * IPV6CP. When IPCP is enabled and rejected, label is not * evaluated. */ if (bundle_GetLabel(fp->bundle) && !Enabled(fp->bundle, OPT_IPCP)) { if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), LINKUPFILE, NULL, NULL) < 0) system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL); } else system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL); } fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3; log_DisplayPrompts(); return 1;}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:55,
示例3: BundNcpsUpstatic voidBundNcpsUp(Bund b){ if (Enabled(&b->conf.options, BUND_CONF_IPCP)) IpcpUp(b); if (Enabled(&b->conf.options, BUND_CONF_IPV6CP)) Ipv6cpUp(b); if (Enabled(&b->conf.options, BUND_CONF_COMPRESSION)) CcpUp(b); if (Enabled(&b->conf.options, BUND_CONF_ENCRYPTION)) EcpUp(b);}
开发者ID:ZRouter,项目名称:ZRouter,代码行数:12,
示例4: ipv6cp_LayerDownstatic voidipv6cp_LayerDown(struct fsm *fp){ /* About to come down */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); static int recursing; char addr[40]; if (!recursing++) { snprintf(addr, sizeof addr, "%s", ncpaddr_ntoa(&ipv6cp->myaddr)); log_Printf(LogIPV6CP, "%s: LayerDown: %s/n", fp->link->name, addr);#ifndef NORADIUS radius_Flush(&fp->bundle->radius); radius_Account(&fp->bundle->radius, &fp->bundle->radacct6, fp->bundle->links, RAD_STOP, &ipv6cp->throughput); /* * XXX: Avoid duplicate evaluation of filterid between IPCP and * IPV6CP. When IPCP is enabled and rejected, filterid is not * evaluated. */ if (!Enabled(fp->bundle, OPT_IPCP)) { if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, NULL, NULL); }#endif /* * XXX this stuff should really live in the FSM. Our config should * associate executable sections in files with events. */ if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) { /* * XXX: Avoid duplicate evaluation of label between IPCP and * IPV6CP. When IPCP is enabled and rejected, label is not * evaluated. */ if (bundle_GetLabel(fp->bundle) && !Enabled(fp->bundle, OPT_IPCP)) { if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), LINKDOWNFILE, NULL, NULL) < 0) system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL); } else system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL); } ipv6cp_Setup(ipv6cp); } recursing--;}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:51,
示例5: SimpleMarkText/// SimpleMarkText()static void SimpleMarkText(struct InstData *data, LONG startx, struct line_node *startline, LONG stopx, struct line_node *stopline){ ENTER(); if(Enabled(data)) { data->blockinfo.enabled = FALSE; MarkText(data, data->blockinfo.startx, data->blockinfo.startline, data->blockinfo.stopx, data->blockinfo.stopline); }// else { SetCursor(data, data->CPos_X, data->actualline, FALSE); } data->blockinfo.startline = startline; data->blockinfo.startx = startx; data->blockinfo.stopline = data->actualline = stopline; data->blockinfo.stopx = data->CPos_X = stopx; data->blockinfo.enabled = TRUE; ScrollIntoDisplay(data); MarkText(data, startx, startline, stopx, stopline); LEAVE();}
开发者ID:amiga-mui,项目名称:texteditor,代码行数:26,
示例6: VerifySystemPointersvoid InverseMuscleCurrent::Load(CStdXml &oXml){ VerifySystemPointers(); oXml.IntoElem(); //Into Item Element m_strID = Std_CheckString(oXml.GetChildString("ID")); if(Std_IsBlank(m_strID)) THROW_ERROR(Al_Err_lIDBlank, Al_Err_strIDBlank); m_strName = oXml.GetChildString("Name", ""); //This will add this object to the object list of the simulation. m_lpSim->AddToObjectList(this); TargetNodeID(oXml.GetChildString("TargetNodeID")); AlwaysActive(oXml.GetChildBool("AlwaysActive", m_bAlwaysActive)); Enabled(oXml.GetChildBool("Enabled", m_bEnabled)); MuscleID(oXml.GetChildString("MuscleID", "")); MuscleLengthData(oXml.GetChildString("LengthData", "")); Conductance(oXml.GetChildFloat("Conductance", m_fltConductance)); RestPotential(oXml.GetChildFloat("RestPotential", m_fltRestPotential)); oXml.OutOfElem(); //OutOf Simulus Element}
开发者ID:NeuroRoboticTech,项目名称:AnimatLabPublicSource,代码行数:25,
示例7: tcpmss_Checkstatic struct mbuf *tcpmss_Check(struct bundle *bundle, struct mbuf *bp){ struct ip *pip; size_t hlen, plen; if (!Enabled(bundle, OPT_TCPMSSFIXUP)) return bp; bp = m_pullup(bp); plen = m_length(bp); pip = (struct ip *)MBUF_CTOP(bp); hlen = pip->ip_hl << 2; /* * Check for MSS option only for TCP packets with zero fragment offsets * and correct total and header lengths. */ if (pip->ip_p == IPPROTO_TCP && (ntohs(pip->ip_off) & IP_OFFMASK) == 0 && ntohs(pip->ip_len) == plen && hlen <= plen && plen >= sizeof(struct tcphdr) + hlen) MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, MAXMSS(bundle->iface->mtu)); return bp;}
开发者ID:coyizumi,项目名称:cs111,代码行数:26,
示例8: Enabledvoid cUIControlAnim::DisableFadeOut( const cTime& Time, const bool& AlphaChilds, const Ease::Interpolation& Type ) { Enabled( false ); StartAlphaAnim ( mAlpha, 0.f, Time, AlphaChilds, Type ); mControlFlags |= UI_CTRL_FLAG_DISABLE_FADE_OUT;}
开发者ID:dogtwelve,项目名称:eepp,代码行数:7,
示例9: GetClientvoid GColourSelect::OnPaint(GSurface *pDC){ GDropDown::OnPaint(pDC); GRect r = GetClient(); r.x2 -= 14; r.Size(5, 5); if (IsOpen()) r.Offset(1, 1); bool HasColour = Enabled() && c32 != 0; pDC->Colour(HasColour ? LC_BLACK : LC_LOW, 24); pDC->Box(&r); r.Size(1, 1); pDC->Colour(HasColour ? c32 : Rgb24To32(LC_LOW), 32); if (HasColour) { pDC->Rectangle(&r); } else { pDC->Line(r.x1, r.y1, r.x2, r.y2); pDC->Line(r.x1, r.y2, r.x2, r.y1); }}
开发者ID:FEI17N,项目名称:Lgi,代码行数:25,
示例10: Enabled//// Note: This method is from ViewerToggleAction but was transplanted// here to ensure that the action was updated. When using the// immediate base class's Update method the popup menu was not// updating on some platforms.//voidSetToolbarIconSizeActionUI::Update(){ // Update the action's enabled state. bool actionShouldBeEnabled = Enabled(); if(action->isEnabled() != actionShouldBeEnabled) action->setEnabled(actionShouldBeEnabled); // Update the action's toggled state if it is a toggle action. if(action->isCheckable()) { bool actionShouldBeToggled = Checked(); if(toggled != actionShouldBeToggled) { // Set the appropriate icon into the action. if (!GetViewerProperties()->GetNowin() && !action->icon().isNull()) { if(actionShouldBeToggled) SetIcon(QIcon(*toggledIcon)); else SetIcon(QIcon(*regularIcon)); } action->blockSignals(true); action->setChecked(actionShouldBeToggled); action->blockSignals(false); } toggled = actionShouldBeToggled; }}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:36,
示例11: CcpConfigurestatic voidCcpConfigure(Fsm fp){ Bund b = (Bund)fp->arg; CcpState const ccp = &b->ccp; int k; /* Reset state */ ccp->self_reject = 0; ccp->peer_reject = 0; ccp->crypt_check = 0; ccp->xmit = NULL; ccp->recv = NULL; for (k = 0; k < CCP_NUM_PROTOS; k++) { CompType const ct = gCompTypes[k]; if (ct->Configure) { if ((*ct->Configure)(b)) { if (Enabled(&ccp->options, k)) { Log(LG_CCP, ("[%s] CCP: Protocol %s disabled " "as useless for this setup", b->name, ct->name)); } CCP_SELF_REJ(ccp, k); }; } }}
开发者ID:ZRouter,项目名称:ZRouter,代码行数:28,
示例12: BundOpenLinksvoidBundOpenLinks(Bund b){ int k; TimerStop(&b->reOpenTimer); if (Enabled(&b->conf.options, BUND_CONF_BWMANAGE)) { if (b->n_links != 0) return; for (k = 0; k < NG_PPP_MAX_LINKS; k++) { if (b->links[k]) { BundOpenLink(b->links[k]); break; } else if (b->conf.linkst[k][0]) { BundCreateOpenLink(b, k); break; } } } else { for (k = 0; k < NG_PPP_MAX_LINKS; k++) { if (b->links[k]) BundOpenLink(b->links[k]); else if (b->conf.linkst[k][0]) BundCreateOpenLink(b, k); } }}
开发者ID:ZRouter,项目名称:ZRouter,代码行数:27,
示例13: Std_CheckStringbool RobotInterface::SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError){ std::string strType = Std_CheckString(strDataType); if(strType == "ENABLED") { Enabled(Std_ToBool(strValue)); return true; } if(strType == "PHYSICSTIMESTEP") { PhysicsTimeStep((float) atof(strValue.c_str())); return true; } if(strType == "SYNCHSIM") { SynchSim(Std_ToBool(strValue)); return true; } if(AnimatBase::SetData(strType, strValue, false)) return true; //If it was not one of those above then we have a problem. if(bThrowError) THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType, "Data Type", strDataType); return false;}
开发者ID:NeuroRoboticTech,项目名称:AnimatLabPublicSource,代码行数:31,
示例14: CoreUpdateListvoid CLuaDepScreen::CoreUpdateList(){ if (!Enabled()) { Enable(true); NNCurses::TUI.ActivateGroup(this); } m_pTextField->ClearText(); for (TDepList::const_iterator it=GetDepList().begin(); it!=GetDepList().end(); it++) { m_pTextField->AddText(CreateText("%s: %s/n", GetTranslation("Name"), GetTranslation(it->name).c_str())); if (!it->description.empty()) m_pTextField->AddText(CreateText("%s: %s/n", GetTranslation("Description"), GetTranslation(it->description).c_str())); m_pTextField->AddText(CreateText("%s: %s/n/n", GetTranslation("Problem"), GetTranslation(it->problem).c_str())); } if (GetDepList().empty()) m_bClose = true;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:26,
示例15: Init void Init() { if (!Enabled()) return; gmlShareLists = configHandler->GetBool("MultiThreadShareLists"); if (!gmlShareLists) { gmlMaxServerThreadNum = GML_LOAD_THREAD_NUM; gmlMaxShareThreadNum = GML_LOAD_THREAD_NUM; gmlNoGLThreadNum = GML_SIM_THREAD_NUM; } gmlThreadCountOverride = configHandler->GetInt("MultiThreadCount"); gmlThreadCount = GML_CPU_COUNT; if (gmlShareLists) { // create offscreen OpenGL contexts for (int i = 0; i < gmlThreadCount; ++i) ogc[i] = new COffscreenGLContext(); } gmlProcessor = new gmlClientServer<void, int, CUnit*>; #if GML_ENABLE_SIM gmlMultiThreadSim = configHandler->GetBool("MultiThreadSim"); gmlKeepRunning = true; gmlStartSim = false; // start sim thread gmlProcessor->AuxWork(&gmlSimLoop, NULL); #endif }
开发者ID:AMDmi3,项目名称:spring,代码行数:29,
示例16: GetValuefloat AxisBinding::GetValue() { if (!Enabled()) return 0.0f; float value = Pi::JoystickAxisState(joystick, axis); if (direction == POSITIVE) return value; else return -value;}
开发者ID:Ikesters,项目名称:pioneer,代码行数:10,
示例17: assertvoid CWidget::Draw(){ assert(Enabled()); if (!m_bInitialized) { Init(); m_bInitialized = true; } CoreDraw();}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:12,
示例18: Enabledbool cUIMenu::Hide() { Enabled( false ); Visible( false ); if ( NULL != mItemSelected ) mItemSelected->SetSkinState( cUISkinState::StateNormal ); mItemSelected = NULL; mItemSelectedIndex = eeINDEX_NOT_FOUND; return true;}
开发者ID:dogtwelve,项目名称:eepp,代码行数:12,
示例19: va_startvoid CToolbar::EnableAll(BOOL fEnable, ...){ va_list argptr; va_start(argptr, fEnable); INT * idList = (INT*) argptr; for(INT i = 0; idList[i]; ++i) Enabled(idList[i], fEnable); va_end(argptr);}
开发者ID:loginsinex,项目名称:smb2,代码行数:12,
示例20: DoITCSendL// -----------------------------------------------------------------------------// CMceMediaSink::DoEnableL// -----------------------------------------------------------------------------//void CMceMediaSink::DoEnableL() { if ( MCE_ENDPOINT_ITC_ALLOWED( *this ) ) { DoITCSendL( EMceItcEnable, ETrue ); } else { MCECLI_DEBUG("CMceMediaSink::DoEnableL, done locally"); Enabled( ETrue ); } }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:16,
示例21: ipv6cp_LayerStartstatic voidipv6cp_LayerStart(struct fsm *fp){ /* We're about to start up ! */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); log_Printf(LogIPV6CP, "%s: LayerStart./n", fp->link->name); throughput_start(&ipv6cp->throughput, "IPV6CP throughput", Enabled(fp->bundle, OPT_THROUGHPUT)); fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3; ipv6cp->peer_tokenreq = 0;}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:12,
示例22: Popupvoid Menu::Popup(Event& e) { if (Enabled()) { World* w; IntCoord wx, wy; e.GetAbsolute(w, wx, wy); if (w != world_) { world_ = w; Setup(); } InsertBody(wx - rel_x_, wy - rel_y_); State()->Selection(this); }}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:13,
示例23: SimThreadRunning bool SimThreadRunning() { if (!Enabled()) return false; #if GML_ENABLE_SIM if (!gmlStartSim && gmlMultiThreadSim && gs->frameNum > 0) { gmlStartSim = true; } return (gmlStartSim && gmlMultiThreadSim); #else return false; #endif }
开发者ID:AMDmi3,项目名称:spring,代码行数:13,
示例24: DeletePhysicsvoid VsSpring::SetupPhysics(){ if(m_vxSpring) DeletePhysics(); if(m_aryAttachmentPoints.GetSize() == 2) { Attachment *lpPrimaryAttachment = m_aryAttachmentPoints[0]; Attachment *lpSecondaryAttachment = m_aryAttachmentPoints[1]; if(!lpPrimaryAttachment && !lpSecondaryAttachment) { Enabled(false); return; } VsRigidBody *lpVsPrimary = dynamic_cast<VsRigidBody *>(lpPrimaryAttachment->Parent()); VsRigidBody *lpVsSecondary = dynamic_cast<VsRigidBody *>(lpSecondaryAttachment->Parent()); if(!lpVsPrimary && !lpVsSecondary) { Enabled(false); return; } m_vxSpring = new AnimatVxSpring(lpVsPrimary->Part(), lpVsSecondary->Part(), m_fltNaturalLength, m_fltStiffness, m_fltDamping); // attached to the reference frame. CStdFPoint vPrimPos = lpPrimaryAttachment->AbsolutePosition(); CStdFPoint vSecPos = lpSecondaryAttachment->AbsolutePosition(); m_vxSpring->setPartAttachmentPosition(0, vPrimPos.x, vPrimPos.y, vPrimPos.z); m_vxSpring->setPartAttachmentPosition(1, vSecPos.x, vSecPos.y, vSecPos.z); m_vxSpring->enable(m_bEnabled); GetVsSimulator()->Universe()->addConstraint(m_vxSpring); } else Enabled(false);}
开发者ID:NeuroRoboticTech,项目名称:AnimatLabPublicSource,代码行数:39,
示例25: ChangeConfigControlsstatic void ChangeConfigControls (NetConfigPtr ncp){ Boolean hasProxy; Int2 val; if (ncp == NULL) return; val = GetValue (ncp->srvConnMode); if (val == 1) { SafeHide (ncp->netGroup); } if (val == 3) { if (! Enabled (ncp->proxyHost)) { SafeSetTitle (ncp->proxyHost, ncp->proxyValue); } Enable (ncp->proxyHost); if (! Enabled (ncp->firewallProxy)) { SafeSetTitle (ncp->firewallProxy, ncp->firewallValue); } Enable (ncp->firewallProxy); } else { if (Enabled (ncp->proxyHost)) { GetTitle (ncp->proxyHost, ncp->proxyValue, sizeof (ncp->proxyValue)); SafeSetTitle (ncp->proxyHost, NULL); } Disable (ncp->proxyHost); if (Enabled (ncp->firewallProxy)) { GetTitle (ncp->firewallProxy, ncp->firewallValue, sizeof (ncp->firewallValue)); SafeSetTitle (ncp->firewallProxy, NULL); } Disable (ncp->firewallProxy); } hasProxy = (Boolean) (! TextHasNoText (ncp->proxyHost)); if (hasProxy) { if (! Enabled (ncp->proxyHost)) { SafeSetTitle (ncp->proxyHost, ncp->proxyValue); } Enable (ncp->proxyHost); if (! Enabled (ncp->proxyPort)) { SafeSetTitle (ncp->proxyPort, ncp->portValue); } Enable (ncp->proxyPort); } else { if (Enabled (ncp->proxyPort)) { GetTitle (ncp->proxyPort, ncp->portValue, sizeof (ncp->portValue)); SafeSetTitle (ncp->proxyPort, NULL); } Disable (ncp->proxyPort); } if (val != 1) { SafeShow (ncp->netGroup); }}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:53,
示例26: __ASSERT_ALWAYS// -----------------------------------------------------------------------------// CMceMediaSink::DoDisableL// -----------------------------------------------------------------------------//void CMceMediaSink::DoDisableL() { if ( MCE_ENDPOINT_ITC_ALLOWED( *this ) ) { __ASSERT_ALWAYS( iStream->State() != CMceMediaStream::ETranscodingRequired, User::Leave( KErrNotReady ) ); DoITCSendL( EMceItcDisable, EFalse ); } else { Enabled( EFalse ); MCECLI_DEBUG("CMceMediaSink::DoDisableL, done locally"); } }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:18,
示例27: Enabledvoid GCommand::Enabled(bool e){ if (Enabled() != e) { if (ToolButton) { ToolButton->Enabled(e); } if (MenuItem) { MenuItem->Enabled(e); } }}
开发者ID:FEI17N,项目名称:Lgi,代码行数:14,
注:本文中的Enabled函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ EnchantmentSlot函数代码示例 C++ Enable_global_interrupt函数代码示例 |