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


C++ Enabled函数代码示例

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


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

示例1: Enabled

void Node::Kill(bool bState)
{
	if(bState)
		Enabled(false);
	else
		Enabled(m_bInitEnabled);
}
开发者ID:NeuroRoboticTech,项目名称:AnimatLabPublicSource,代码行数:7,代码来源:Node.cpp

示例2: ipv6cp_LayerUp

static int
ipv6cp_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,代码来源:ipv6cp.c

示例3: BundNcpsUp

static void
BundNcpsUp(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,代码来源:bund.c

示例4: ipv6cp_LayerDown

static void
ipv6cp_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,代码来源:ipv6cp.c

示例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,代码来源:Search.c

示例6: VerifySystemPointers

void 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,代码来源:InverseMuscleCurrent.cpp

示例7: tcpmss_Check

static 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,代码来源:tcpmss.c

示例8: Enabled

void 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,代码来源:cuicontrolanim.cpp

示例9: GetClient

void 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,代码来源:GColourSelect.cpp

示例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.
//
void
SetToolbarIconSizeActionUI::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,代码来源:ToolbarActionsUI.C

示例11: CcpConfigure

static void
CcpConfigure(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,代码来源:ccp.c

示例12: BundOpenLinks

void
BundOpenLinks(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,代码来源:bund.c

示例13: Std_CheckString

bool 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,代码来源:RobotInterface.cpp

示例14: CoreUpdateList

void 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,代码来源:luadepscreen.cpp

示例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,代码来源:gml_base.cpp


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