本文整理汇总了C++中IsMember函数的典型用法代码示例。如果您正苦于以下问题:C++ IsMember函数的具体用法?C++ IsMember怎么用?C++ IsMember使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsMember函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
}
示例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");
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例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 "*";
}
示例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);
}
}
}
示例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 "";
}
}
示例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
}
示例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;
}
示例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;
}
示例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;
}