• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IsMember函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: VALUES

void PHPEntityVariable::Store(wxSQLite3Database& db)
{
    // we keep only the function arguments in the databse and globals
    if(IsFunctionArg() || IsMember()) {
        try {
            wxSQLite3Statement statement =
                db.PrepareStatement("INSERT OR REPLACE INTO VARIABLES_TABLE VALUES (NULL, "
                                    ":SCOPE_ID, :FUNCTION_ID, :NAME, :FULLNAME, :SCOPE, :TYPEHINT, "
                                    ":FLAGS, :DOC_COMMENT, :LINE_NUMBER, :FILE_NAME)");
            statement.Bind(statement.GetParamIndex(":SCOPE_ID"), IsMember() ? Parent()->GetDbId() : wxLongLong(-1));
            statement.Bind(statement.GetParamIndex(":FUNCTION_ID"),
                           IsFunctionArg() ? Parent()->GetDbId() : wxLongLong(-1));
            statement.Bind(statement.GetParamIndex(":NAME"), GetShortName());
            statement.Bind(statement.GetParamIndex(":FULLNAME"), GetFullName());
            statement.Bind(statement.GetParamIndex(":SCOPE"), GetScope());
            statement.Bind(statement.GetParamIndex(":TYPEHINT"), GetTypeHint());
            statement.Bind(statement.GetParamIndex(":FLAGS"), (int)GetFlags());
            statement.Bind(statement.GetParamIndex(":DOC_COMMENT"), GetDocComment());
            statement.Bind(statement.GetParamIndex(":LINE_NUMBER"), GetLine());
            statement.Bind(statement.GetParamIndex(":FILE_NAME"), GetFilename().GetFullPath());
            statement.ExecuteUpdate();
            SetDbId(db.GetLastRowId());

        } catch(wxSQLite3Exception& exc) {
            wxUnusedVar(exc);
        }
    }
}
开发者ID:timfenlon,项目名称:codelite,代码行数:28,代码来源:PHPEntityVariable.cpp


示例2: CheckArguments

//
//   This file contains the C++ code from Program 12.20 of
//   "Data Structures and Algorithms
//    with Object-Oriented Design Patterns in C++"
//   by Bruno R. Preiss.
//
//   Copyright (c) 1998 by Bruno R. Preiss, P.Eng.  All rights reserved.
//
//   http://www.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs/pgm12_20.cpp
//
void PartitionAsForest::CheckArguments (
    PartitionTree const& s, PartitionTree const& t)
{
    if (!IsMember (s) || s.parent != 0 ||
	!IsMember (t) || t.parent != 0 || s == t)
	throw invalid_argument ("incompatible sets");
}
开发者ID:lbaby,项目名称:codeGarden,代码行数:17,代码来源:pgm12_20.cpp


示例3: NewMember

BOOL CParty::NewMember( u_long uPlayerId, LONG nLevel, LONG nJob, BYTE nSex, LPSTR szName )
#endif	// __SYS_PLAYER_DATA
{
#if __VER < 11 // __SYS_PLAYER_DATA
	if( szName == NULL )
		return FALSE;
#endif	// __SYS_PLAYER_DATA
	
	if( IsMember( uPlayerId ) == FALSE && m_nSizeofMember < MAX_PTMEMBER_SIZE )
	{
		m_aMember[m_nSizeofMember].m_uPlayerId = uPlayerId;
#if __VER < 11 // __SYS_PLAYER_DATA
		m_aMember[m_nSizeofMember].m_nLevel = nLevel;
		m_aMember[m_nSizeofMember].m_nJob = nJob;
		m_aMember[m_nSizeofMember].m_nSex = nSex;
#endif	// __SYS_PLAYER_DATA
		m_aMember[m_nSizeofMember].m_bRemove	= FALSE;
#if __VER < 11 // __SYS_PLAYER_DATA
		strcpy( m_aMember[m_nSizeofMember].m_szName, szName );
#endif	// __SYS_PLAYER_DATA
		m_nSizeofMember++;
		return TRUE;
	}
	return FALSE;
}
开发者ID:KerwinMa,项目名称:AerothFlyffSource,代码行数:25,代码来源:party.cpp


示例4: UnitDeviceAdd

BOOL CNBLogicalDevice::UnitDeviceAdd(CNBUnitDevice *pUnitDevice)
{
	UINT32 iSequence;

	if(pUnitDevice->IsGroup())
	{
		if(m_mapUnitDevices.size() && !IsMember(pUnitDevice))
		{
			ATLASSERT(FALSE);
			return FALSE;
		}

		iSequence = pUnitDevice->m_DIB.iSequence;

	}
	else
	{
		iSequence = 0;
	}

	m_mapUnitDevices[iSequence] = pUnitDevice;
	ATLTRACE(_T("CNBLogicalDevice(%p).m_mapUnitDevices[%d] = (%p) : %s\n"),
		this, iSequence, pUnitDevice, pUnitDevice->GetName());

	pUnitDevice->m_pLogicalDevice = this;

	return TRUE;
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:28,代码来源:nbdev.cpp


示例5: indentString

void PHPEntityVariable::PrintStdout(int indent) const
{
    wxString indentString(' ', indent);
    wxPrintf("%s%s: %s", indentString, IsMember() ? "Member" : "Variable", GetShortName());
    if(!GetTypeHint().IsEmpty()) {
        wxPrintf(", TypeHint: %s", GetTypeHint());
    }
    if(!GetExpressionHint().IsEmpty()) {
        wxPrintf(", ExpressionHint: %s", GetExpressionHint());
    }
    if(IsReference()) {
        wxPrintf(", Reference");
    }
    if(!GetDefaultValue().IsEmpty()) {
        wxPrintf(", Default: %s", GetDefaultValue());
    }

    wxPrintf(", Ln. %d", GetLine());
    wxPrintf("\n");

    PHPEntityBase::List_t::const_iterator iter = m_children.begin();
    for(; iter != m_children.end(); ++iter) {
        (*iter)->PrintStdout(indent + 4);
    }
}
开发者ID:timfenlon,项目名称:codelite,代码行数:25,代码来源:PHPEntityVariable.cpp


示例6: safelist_one_channel

/*
 * safelist_one_channel()
 *
 * inputs       - client pointer and channel pointer
 * outputs      - none
 * side effects - a channel is listed if it meets the
 *                requirements
 */
static void safelist_one_channel(struct Client *source_p, struct Channel *chptr)
{
	struct ListClient *safelist_data = source_p->localClient->safelist_data;
	int visible;

	visible = !SecretChannel(chptr) || IsMember(source_p, chptr);
	if (!visible && !safelist_data->operspy)
		return;

	if ((unsigned int)chptr->members.length < safelist_data->users_min
	    || (unsigned int)chptr->members.length > safelist_data->users_max)
		return;

	if (safelist_data->topic_min && chptr->topic_time < safelist_data->topic_min)
		return;

	/* If a topic TS is provided, don't show channels without a topic set. */
	if (safelist_data->topic_max && (chptr->topic_time > safelist_data->topic_max
		|| chptr->topic_time == 0))
		return;

	if (safelist_data->created_min && chptr->channelts < safelist_data->created_min)
		return;

	if (safelist_data->created_max && chptr->channelts > safelist_data->created_max)
		return;

	list_one_channel(source_p, chptr, visible);
}
开发者ID:ShutterQuick,项目名称:charybdis,代码行数:37,代码来源:m_list.c


示例7: safelist_channel_named

/*
 * safelist_channel_named()
 *
 * inputs       - client pointer, channel name, operspy
 * outputs      - none
 * side effects - a named channel is listed
 */
static void safelist_channel_named(struct Client *source_p, const char *name, int operspy)
{
	struct Channel *chptr;
	char *p;
	int visible;

	sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);

	if ((p = strchr(name, ',')))
		*p = '\0';

	if (*name == '\0')
	{
		sendto_one_numeric(source_p, ERR_NOSUCHNICK, form_str(ERR_NOSUCHNICK), name);
		sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
		return;
	}

	chptr = find_channel(name);

	if (chptr == NULL)
	{
		sendto_one_numeric(source_p, ERR_NOSUCHNICK, form_str(ERR_NOSUCHNICK), name);
		sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
		return;
	}

	visible = !SecretChannel(chptr) || IsMember(source_p, chptr);
	if (visible || operspy)
		list_one_channel(source_p, chptr, visible);

	sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
	return;
}
开发者ID:ShutterQuick,项目名称:charybdis,代码行数:41,代码来源:m_list.c


示例8: PState

/* PState: parse state and add all matches in models to ilist */
static void PState(ILink models, ILink *ilist, char *type, HMMSet *hset)
{
   IntSet states;
   int j;
   HMMDef *hmm;
   ILink h;

   states = CreateSet(maxStates);
   PIndex(states);
   SkipSpaces();
   if (ch == '.') {
      ReadCh();
      PStatecomp(models,ilist,type,states,hset);
   } else {
      ChkType('s',type);
      for (h=models; h!=NULL; h=h->next) {
         hmm = h->owner;
         for (j=2; j<hmm->numStates; j++)
            if (IsMember(states,j)) {  /* tie ->info */
               if (trace & T_ITM)
                  printf(" %12s.state[%d]\n",
                         HMMPhysName(hset,hmm),j);
               AddItem(hmm,hmm->svec+j,ilist);
            }
      }
   }
   FreeSet(states);
}
开发者ID:deardaniel,项目名称:PizzaTest,代码行数:29,代码来源:HUtil.c


示例9: ShowChannel

static char *first_visible_channel(aClient *sptr, aClient *acptr, int *flg)
{
	Membership *lp;

	*flg = 0;

	for (lp = acptr->user->channel; lp; lp = lp->next)
	{
	aChannel *chptr = lp->chptr;
	int cansee = ShowChannel(sptr, chptr);

		if (cansee && (acptr->umodes & UMODE_HIDEWHOIS) && !IsMember(sptr, chptr))
			cansee = 0;
		if (!cansee)
		{
			if (OPCanSeeSecret(sptr))
				*flg |= FVC_HIDDEN;
			else
				continue;
		}
		return chptr->chname;
	}

	/* no channels that they can see */
	return "*";
}
开发者ID:Adam-,项目名称:unrealircd,代码行数:26,代码来源:m_who.c


示例10: DoRecord

void SimulationOutput::DoRecord(const ComponentFrame* frame, const Bunch* bunch)
{
	if(frame->IsComponent())
	{
		string id = (*frame).GetComponent().GetQualifiedName();

		if(output_all || IsMember(id))
		{
			Record(frame,bunch);
		}
	}
}
开发者ID:MERLIN-Collaboration,项目名称:MERLIN,代码行数:12,代码来源:TrackingSimulation.cpp


示例11: Parent

wxString PHPEntityVariable::GetScope() const
{
    PHPEntityBase* parent = Parent();
    if(parent && parent->Is(kEntityTypeFunction) && IsFunctionArg()) {
        return parent->Cast<PHPEntityFunction>()->GetScope();

    } else if(parent && parent->Is(kEntityTypeClass) && IsMember()) {
        return parent->GetFullName();

    } else {
        return "";
    }
}
开发者ID:timfenlon,项目名称:codelite,代码行数:13,代码来源:PHPEntityVariable.cpp


示例12: words

int WordSet::operator==(const WordSet &rhs) const
{
  //-----------------------------------------
  // false if sets have different cardinality
  //-----------------------------------------
  if (rhs.NumberOfEntries() != NumberOfEntries()) return 0;

  //-----------------------------------------
  // false if some word in rhs is not in lhs
  //-----------------------------------------
  WordSetIterator words(&rhs);
  unsigned long *word;
  for (; (word = words.Current()); words++) if (IsMember(*word) == 0) return 0;

  return 1; // equal otherwise
}
开发者ID:wjcsharp,项目名称:hpctoolkit,代码行数:16,代码来源:WordSet.cpp


示例13: eb_channel

static int eb_channel(const char *data, struct Client *client_p,
		struct Channel *chptr, long mode_type)
{
	struct Channel *chptr2;

	(void)chptr;
	(void)mode_type;
	if (data == NULL)
		return EXTBAN_INVALID;
	chptr2 = find_channel(data);
	if (chptr2 == NULL)
		return EXTBAN_INVALID;
	/* privacy! don't allow +s/+p channels to influence another channel */
	if (!PubChannel(chptr2))
		return EXTBAN_INVALID;
	return IsMember(client_p, chptr2) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}
开发者ID:BackupTheBerlios,项目名称:phoenixfn-svn,代码行数:17,代码来源:extb_channel.c


示例14: eb_channel

static int eb_channel(const char *data, struct Client *client_p,
		struct Channel *chptr, long mode_type)
{
	struct Channel *chptr2;

	(void)chptr;
	(void)mode_type;
	if (data == NULL)
		return EXTBAN_INVALID;
	chptr2 = find_channel(data);
	if (chptr2 == NULL)
		return EXTBAN_INVALID;
	/* require consistent target */
	if (chptr->chname[0] == '#' && data[0] == '&')
		return EXTBAN_INVALID;
	return IsMember(client_p, chptr2) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}
开发者ID:KeiroD,项目名称:charybdis,代码行数:17,代码来源:extb_channel.c


示例15: list_all_channels

/*
 * list_all_channels
 * inputs	- pointer to client requesting list
 * output	- 0/1
 * side effects	- list all channels to source_p
 */
static int list_all_channels(struct Client *source_p)
{
  struct Channel *chptr;

  sendto_one(source_p, form_str(source_p,RPL_LISTSTART), me.name, source_p->name);

  for ( chptr = GlobalChannelList; chptr; chptr = chptr->nextch )
    {
      if ( !source_p->user ||
	   (SecretChannel(chptr) && !IsMember(source_p, chptr)))
	continue;
      list_one_channel(source_p,chptr);
    }

  sendto_one(source_p, form_str(source_p,RPL_LISTEND), me.name, source_p->name);
  return 0;
}   
开发者ID:Cloudxtreme,项目名称:ircd-3,代码行数:23,代码来源:m_list.c


示例16: UpdatePlayerOnlineStatus

void Group::UpdatePlayerOnlineStatus(Player* player, bool online /*= true*/)
{
    if (!player)
        return;
    const ObjectGuid guid = player->GetObjectGuid();
    if (!IsMember(guid))
        return;

    SendUpdate();
    if (online)
    {
        player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
        UpdatePlayerOutOfRange(player);
    }
    else if (IsLeader(guid))
        m_leaderLastOnline = time(nullptr);
}
开发者ID:Ghaster,项目名称:mangos-classic,代码行数:17,代码来源:Group.cpp


示例17: AddMember

void CBotSquad::AddMember ( edict_t *pEdict )
{
	if ( !IsMember(pEdict) )
	{
		MyEHandle newh;
		//CBot *pBot;

		newh = pEdict;

		m_theSquad.Push(newh);

		/*if ( (pBot=CBots::getBotPointer(pEdict))!=NULL )
		{
			pBot->clearSquad();
			pBot->setSquad(this);
		}*/
	}
}
开发者ID:chrizonix,项目名称:RCBot2,代码行数:18,代码来源:bot_squads.cpp


示例18: do_channel_who

static void do_channel_who(aClient *sptr, aChannel *channel, char *mask)
{
	Member *cm = channel->members;
	if (IsMember(sptr, channel) || IsNetAdmin(sptr))
		who_flags |= WF_ONCHANNEL;

	for (cm = channel->members; cm; cm = cm->next)
	{
		aClient *acptr = cm->cptr;
		char status[20];
		int cansee;
		if ((cansee = can_see(sptr, acptr, channel)) & WHO_CANTSEE)
			continue;

		make_who_status(sptr, acptr, channel, cm, status, cansee);
		send_who_reply(sptr, acptr, channel->chname, status, "");
    }
}
开发者ID:Adam-,项目名称:unrealircd,代码行数:18,代码来源:m_who.c


示例19: GetForegroundWindow

ResultType WinGroup::CloseAndGoToNext(bool aStartWithMostRecent)
// If the foreground window is a member of this group, close it and activate
// the next member.
{
	if (IsEmpty())
		return OK;  // OK since this is the expected behavior in this case.
	// Otherwise:
	// Don't call Update(), let (De)Activate() do that.

	HWND fore_win = GetForegroundWindow();
	// Even if it's NULL, don't return since the legacy behavior is to continue on to the final part below.

	WindowSpec *win_spec = IsMember(fore_win, *g);
	if (   (mIsModeActivate && win_spec) || (!mIsModeActivate && !win_spec)   )
	{
		// If the user is using a GroupActivate hotkey, we don't want to close
		// the foreground window if it's not a member of the group.  Conversely,
		// if the user is using GroupDeactivate, we don't want to close a
		// member of the group.  This precaution helps prevent accidental closing
		// of windows that suddenly pop up to the foreground just as you've
		// realized (too late) that you pressed the "close" hotkey.
		// MS Visual Studio/C++ gets messed up when it is directly sent a WM_CLOSE,
		// probably because the wrong window (it has two mains) is being sent the close.
		// But since that's the only app I've ever found that doesn't work right,
		// it seems best not to change our close method just for it because sending
		// keys is a fairly high overhead operation, and not without some risk due to
		// not knowing exactly what keys the user may have physically held down.
		// Also, we'd have to make this module dependent on the keyboard module,
		// which would be another drawback.
		// Try to wait for it to close, otherwise the same window may be activated
		// again before it has been destroyed, defeating the purpose of the
		// "ActivateNext" part of this function's job:
		// SendKeys("!{F4}");
		if (fore_win)
		{
			WinClose(fore_win, 500);
			DoWinDelay;
		}
	}
	//else do the activation below anyway, even though no close was done.
	return mIsModeActivate ? Activate(aStartWithMostRecent, win_spec) : Deactivate(aStartWithMostRecent);
}
开发者ID:469306621,项目名称:Languages,代码行数:42,代码来源:WinGroup.cpp


示例20: eb_channel

static int eb_channel(const char *data, struct Client *client_p,
		struct Channel *chptr, long mode_type)
{
	struct Channel *chptr2;

	(void)chptr;
	(void)mode_type;
	if (data == NULL)
		return EXTBAN_INVALID;
	chptr2 = find_channel(data);
	if (chptr2 == NULL)
		return EXTBAN_INVALID;
	/* require consistent target */
	if (chptr->chname[0] == '#' && data[0] == '&')
		return EXTBAN_INVALID;
	/* privacy! don't allow +s/+p channels to influence another channel */
	if (!PubChannel(chptr2) && chptr2 != chptr)
		return EXTBAN_INVALID;
	return IsMember(client_p, chptr2) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}
开发者ID:jdhore,项目名称:charybdis,代码行数:20,代码来源:extb_channel.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsMine函数代码示例发布时间:2022-05-30
下一篇:
C++ IsMainThread函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap