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


C++ IsSet函数代码示例

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


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

示例1:

void
MediaWindow::SmartNode::_FreeNode()
{
	if (!IsSet())
		return;
	// TODO: check error codes
	BMediaRoster* roster = BMediaRoster::Roster();
	roster->StopWatching(fMessenger, *fNode, B_MEDIA_WILDCARD);
	roster->ReleaseNode(*fNode);
	delete fNode;
	fNode = NULL;
}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:12,代码来源:MediaWindow.cpp

示例2: CRY_ASSERT

//------------------------------------------------------------------------
void CWeapon::CAnimationFiringLocator::Set()
{
	CRY_ASSERT(!IsSet());
	CRY_ASSERT(m_pOwnerWeapon);

	IWeaponFiringLocator* pPreviousFiringLocator = m_pOwnerWeapon->GetFiringLocator();
	if (pPreviousFiringLocator != this)
	{
		m_pPreviousFiringLocator = pPreviousFiringLocator;
		m_pOwnerWeapon->SetFiringLocator(this);
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:13,代码来源:WeaponEvent.cpp

示例3: empilevoisins

/* ==================================== */
void empilevoisins(int32_t x, int32_t rs, int32_t N, Fifo *FIFOna, Fifo *FIFOea, Fifo *FIFOsa, Fifo *FIFOoa)
/* ==================================== */
{
  int32_t y, z, k;

  /* x est un point qui vient de passer a 0 */
  for (k = 0; k < 8; k++)
  {
    y = voisin(x, k, rs, N);
    if ((y!=-1) && !IsSet(y,MINI) && !IsSet(y,EN_FIFO) && nonbord(y,rs,N))
    { 
      z = voisin(y, NORD, rs, N);
      if ((z != 0) && IsSet(z, MINI))
      { FifoPush(FIFOna, y); Set(y, EN_FIFO); goto nextk; }
      z = voisin(y, SUD, rs, N);
      if ((z != 0) && IsSet(z, MINI))
      { FifoPush(FIFOsa, y); Set(y, EN_FIFO); goto nextk; }
      z = voisin(y, EST, rs, N);
      if ((z != 0) && IsSet(z, MINI))
      { FifoPush(FIFOea, y); Set(y, EN_FIFO); goto nextk; }
      z = voisin(y, OUEST, rs, N);
      if ((z != 0) && IsSet(z, MINI))
      { FifoPush(FIFOoa, y); Set(y, EN_FIFO); goto nextk; }
    }
nextk: ;
  }
} /* empilevoisins() */
开发者ID:Johnson13,项目名称:xLearn,代码行数:28,代码来源:lsquel.c

示例4: ClientRect

	void SButton::Paint( GC& gc, const crect& paintRect )
	{
		crect cr = ClientRect();

		unsigned colorBg = UiGetColor( uiBackground, 0, 0, 0xFFFFFF );

		gc.SetFillColor( colorBg ); //CCC
		gc.FillRect( cr );

		if ( group > 0 )
		{
			DrawCE( gc, 1, ( cr.Height() - 13 ) / 2, IsSet() );
		}
		else
		{
			DrawCB( gc, 1, ( cr.Height() - 13 ) / 2, IsSet() );
		}

		gc.Set( GetFont() );
		cpoint tsize = text.GetTextExtents(gc);

		gc.SetFillColor( colorBg );
		//gc.SetTextColor( UiGetColor( uiColor, 0, 0, 0 ) );

		//gc.TextOutF( 14 + 1 + 1 + 1 , ( cr.Height() - tsize.y ) / 2, text.data() );
		UiCondList ucl;
		int color_text = UiGetColor(uiColor, uiItem, &ucl, 0x0);
		int color_hotkey = UiGetColor(uiHotkeyColor, uiItem, &ucl, 0x0);
		text.DrawItem(gc, 14 + 1 + 1 + 1, (cr.Height() - tsize.y) / 2, color_text, color_hotkey);

		if ( InFocus() )
		{
			crect rect;
			rect.left = 14 + 2;
			rect.top = ( cr.Height() - tsize.y - 2 ) / 2;
			rect.right = rect.left + tsize.x + 4;
			rect.bottom = rect.top + tsize.y + 2;
			DrawBorder( gc, rect, UiGetColor( uiFocusFrameColor, 0, 0, 0 ) ); //CCC
		}
	}
开发者ID:KonstantinKuklin,项目名称:WalCommander,代码行数:40,代码来源:swl_sbutton.cpp

示例5: _getPort

    void ClientStore::_enumerateStreams(std::vector<StreamId>& out,
                                        StreamEnumFilter filter) const
    {
        std::vector<StreamId> ids;

        // Request the ids for the static streams. Since we are replicating
        // static streams on-demand, we cannot just query our local store but
        // must ask the server.
        Message response = {0};
        ClientPort& port = _getPort();

        port.call(&response, RpcApi::CCV_StreamEnumerate, filter);

        uint32_t n = response.parameter0;

        ThrowOn((response.payloadType != MessagePayloadType::MptData) ||
                ((response.data.payloadLength % sizeof(StreamId)) != 0) ||
                (response.data.payloadLength / sizeof(StreamId) != n),
                RpcMessageMalformedException);

        if (n > 0) {
            assert(response.data.payload != nullptr);
            assert(n <= SIMUTRACE_STORE_MAX_NUM_STREAMS);
            StreamId* buffer = reinterpret_cast<StreamId*>(response.data.payload);

            ids.assign(buffer, buffer + n);
        }

        // Now add the dynamic streams that this client session possesses.
        std::vector<Stream*> dynStreams;
        this->Store::_enumerateStreams(dynStreams, StreamEnumFilter::SefDynamic);
        for (auto stream : dynStreams) {
            assert(IsSet(stream->getFlags(), StreamFlags::SfDynamic));
            assert(!IsSet(stream->getFlags(), StreamFlags::SfHidden));

            ids.push_back(stream->getId());
        }

        std::swap(ids, out);
    }
开发者ID:blaquee,项目名称:simutrace,代码行数:40,代码来源:ClientStore.cpp

示例6: MatchRange

bool RegExpMatch::MatchRange(RegExpContext &context ,const char *str)
{
    if (IsSet(M_START))
    {
        if (context.matchCount < 10)
        {
            context.matchStack[context.matchStackTop++] = context.matchCount;
            context.matchOffsets[context.matchCount][0] = str - context.beginning;
            context.matchOffsets[context.matchCount++][1] = 0;
            return true;
        }
    }
    if (IsSet(M_END))
    {
        if (context.matchStackTop)
        {
            context.matchOffsets[context.matchStack[--context.matchStackTop]][1] = str - context.beginning;
            return true;
        }
    }
    return false;
}
开发者ID:bencz,项目名称:OrangeC,代码行数:22,代码来源:RegExp.cpp

示例7: GetSetCount

int CBitSet::GetSetCount()
{
    int nRet = 0;
    for (int i = 0; i < m_nSize; ++i)
    {
        if (IsSet(i))
        {
            nRet++;
        }
    }

    return nRet;
}
开发者ID:zxymd5,项目名称:MyWinBitTorrent,代码行数:13,代码来源:BitSet.cpp

示例8: while

TOptional<FExpressionError> FTokenDefinitions::ConsumeTokens(FExpressionTokenConsumer& Consumer) const
{
	auto& Stream = Consumer.GetStream();
	while(!Stream.IsEmpty())
	{
		auto Error = ConsumeToken(Consumer);
		if (Error.IsSet())
		{
			return Error;
		}
	}

	return TOptional<FExpressionError>();
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:14,代码来源:ExpressionParser.cpp

示例9: GetRaw

Int64 RarTime::GetRaw()
{
  if (!IsSet())
    return(0);
#ifdef _WIN_32
  FILETIME ft;
  GetWin32(&ft);
  return(int32to64(ft.dwHighDateTime,ft.dwLowDateTime));
#elif defined(_UNIX) || defined(_EMX)
  time_t ut=GetUnix();
  return(int32to64(0,ut)*10000000+rlt.Reminder);
#else
  return(0);
#endif
}
开发者ID:GDXN,项目名称:Par-N-Rar,代码行数:15,代码来源:timefn.cpp

示例10: FuncIS_EQUAL_SET

Obj             FuncIS_EQUAL_SET (
    Obj                 self,
    Obj                 list1,
    Obj                 list2 )
{
    /* check the arguments, convert to sets if necessary                   */
    while ( ! IS_SMALL_LIST(list1) ) {
        list1 = ErrorReturnObj(
            "IsEqualSet: <list1> must be a small list (not a %s)",
            (Int)TNAM_OBJ(list1), 0L,
            "you can replace <list1> via 'return <list1>;'" );
    }
    if ( ! IsSet( list1 ) )  list1 = SetList( list1 );
    while ( ! IS_SMALL_LIST(list2) ) {
        list2 = ErrorReturnObj(
            "IsEqualSet: <list2> must be a small list (not a %s)",
            (Int)TNAM_OBJ(list2), 0L,
            "you can replace <list2> via 'return <list2>;'" );
    }
    if ( ! IsSet( list2 ) )  list2 = SetList( list2 );

    /* and now compare them                                                */
    return (EqSet( list1, list2 ) ? True : False );
}
开发者ID:YurieCo,项目名称:gap,代码行数:24,代码来源:set.c

示例11: NS_WARN_IF

NS_IMETHODIMP
InsertNodeTransaction::UndoTransaction()
{
  if (NS_WARN_IF(!mContentToInsert) ||
      NS_WARN_IF(!mPointToInsert.IsSet())) {
    return NS_ERROR_NOT_INITIALIZED;
  }
  // XXX If the inserted node has been moved to different container node or
  //     just removed from the DOM tree, this always fails.
  ErrorResult error;
  mPointToInsert.GetContainer()->RemoveChild(*mContentToInsert, error);
  if (NS_WARN_IF(error.Failed())) {
    return error.StealNSResult();
  }
  return NS_OK;
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:16,代码来源:InsertNodeTransaction.cpp

示例12:

   /*=====================================================================*/
void
GUIContainer::MouseButton( const SDL_MouseButtonEvent& rcEvent )
{
	static std::vector<GUIMain*>::size_type stvector;
	static GUIMain* pguimain;

// We return immediatly if this is NOT visible
	if ( IsSet( OC_GUIMAIN_VISIBLE ) == false )
		return;

// Send the mouse button event to all objects
	for ( stvector = 0; stvector < this->vectorpguimain.size(); stvector++ ) {
		if ( (pguimain = vectorpguimain[ stvector ]) != NULL )
			pguimain->MouseButton( rcEvent );
	}
}
开发者ID:AnotherFoxGuy,项目名称:OpenCity,代码行数:17,代码来源:guicontainer.cpp

示例13: Run

bool SchedulerTask::Run(time_t time)
{
    if (!IsSet() || !IsEnabled())
        return true;
        
    if (time >= timeToFire)
    {
        pCallback();
        
        if (countDown != DO_IT_FOREVER)
            countDown --;
            
        UpdateTime();
    }
    return true;
}
开发者ID:Gabeki17,项目名称:MinimOSD,代码行数:16,代码来源:scheduler.cpp

示例14: update_abp_tax_icb_rate

EXPORT int update_abp_tax_icb_rate(ABP_DBHANDLE dbhandle, ABP_TAX_ICB_RATE tax_icb_rate)
{
  int retval;
  Arb_connection *connection;
  CUSTOMER_ID_ACCT_MAP_DATA *cid;
  TAX_UNIV_ICB_DATA *tui;
  int count;

  if (WRONG_OBJ_TYPE(tax_icb_rate, API_TAX_ICB_RATE))
    return ABP_ARGERR;
  if (NotCustDbhandle(dbhandle))
    return ABP_ARGERR;
  connection = dbhandle->cust_connection;

  ((ABP_ERR_DATA *)connection->user_data)->is_set = FALSE;

  cid = tax_icb_rate->customer_id_acct_map_data;
  tui = tax_icb_rate->tax_univ_icb_data;

  if (!IsSet(tax_univ_icb_tui_id,tui)){
      abp_put_misc_message(connection, ABP_NO_VALUE_ERR, "tui_id");
      return ABP_MISC_ERR;
  }

  Unset(tax_univ_icb_tax_pkg_inst_id, tui);
  Unset(tax_univ_icb_tax_class, tui);
  Unset(tax_univ_icb_account_no, tui);

  if ((retval = abp_begin_transaction_inner(dbhandle, "abp_update_tax_icb_rate"))
      != ABP_STATUS_OK)
    return ABP_DBERR;

    if (update_tax_univ_icb(connection,tui)==FAILURE )
     return ABP_DBERR;

  count = arb_dbcount(connection);
  if (count != 1) {
        abp_put_misc_message(connection, count ? ABP_ROW_NOT_UNIQUE : ABP_ROW_NOT_FOUND, "TAX_UNIV_ICB");
        retval = ABP_MISC_ERR;
        goto rollback;
  }

  return abp_commit_transaction_inner(dbhandle, "abp_update_tax_icb_rate");
 rollback:
  abp_roll_back_transaction_inner(dbhandle, "abp_update_tax_icb_rate");
  return retval;
}
开发者ID:huilang22,项目名称:Projects,代码行数:47,代码来源:tax_icb_rate_api.c

示例15: assert

    std::unique_ptr<Stream> ClientStore::_createStream(StreamId id,
        StreamDescriptor& desc, BufferId buffer)
    {
        assert(id == INVALID_STREAM_ID);

        Message response = {0};
        ClientPort& port = _getPort();

        StreamBuffer* buf = _getStreamBuffer(buffer);
        ThrowOnNull(buf, NotFoundException,
                    stringFormat("stream buffer with id %d", buffer));

        if (IsSet(desc.flags, SfDynamic)) {
            const DynamicStreamDescriptor& dyndesc =
                reinterpret_cast<DynamicStreamDescriptor&>(desc);

            // For regular streams the server generates a valid id. For
            // dynamic streams we have to do this on our own, as dynamic
            // streams are local to the client. The ids must not collide!
            // The server generates ids for regular streams in the lower
            // positive integer range. We therefore generate the ids for
            // dynamic streams in the high positive integer range. The
            // limit for the number of streams (see Version.h) prevents a
            // collision.
            StreamId sid = --_dynamicStreamIdBoundary;

        #ifdef _DEBUG
            std::vector<StreamId> ids;
            _enumerateStreams(ids, StreamEnumFilter::SefRegular);

            StreamId max = *std::max_element(ids.cbegin(), ids.cend());
            assert(max < sid);
        #endif

            return std::unique_ptr<Stream>(
                    new DynamicStream(sid, dyndesc, *buf, getSession()));
        } else {
            port.call(&response, RpcApi::CCV_StreamRegister, &desc,
                      sizeof(StreamDescriptor), buffer);

            StreamId rid = static_cast<StreamId>(response.parameter0);

            return std::unique_ptr<Stream>(
                        new StaticStream(rid, desc, *buf, getSession()));
        }
    }
开发者ID:blaquee,项目名称:simutrace,代码行数:46,代码来源:ClientStore.cpp


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