本文整理汇总了C++中CBitSet::setBit方法的典型用法代码示例。如果您正苦于以下问题:C++ CBitSet::setBit方法的具体用法?C++ CBitSet::setBit怎么用?C++ CBitSet::setBit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBitSet
的用法示例。
在下文中一共展示了CBitSet::setBit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DecodeISDNMessage
//.........这里部分代码省略.........
try {
ielen = GetByte(message,bi++);
} catch (CPException se ) {
// IE is missing its length
f << "No IE Length for ie=" << HexOutput(ie) << Break << endl;
decodeOk = false;
continue;
}
if ( ielen == 0 ) {
f << "IE length cannot be zero for ie=" << HexOutput(ie) << Break << endl;
decodeOk = false;
continue;
}
f << "ie=" << HexOutput(ie) << " len=" << HexOutput(ielen) << " data=";
int dstat = bi;
BYTE iea[64];
memset(iea,0,sizeof(iea));
try {
iea[0]=0xff;
for (int i=0; i<ielen; i++)
{
int ieb = GetByte(message,dstat++);
f << " " << HexOutput(ieb);
iea[i+1]=ieb;
iea[0]=i+1;
}
} catch (CPException se) {
f << " **more expected**";
decodeOk=false;
}
f << Break << endl;
if ( decodeOk ) {
elements.setBit(ie);
f << "IE=" << IEname(MAKE_FULLIE(gvars.ActiveCodeSet,ie)) << Break << endl;
psIEDecoderEntry p = &IEDecoders[0];
if ( p != NULL ) {
while (p->DecodeFunction!=NULL) {
if ((p->CodeSet==gvars.ActiveCodeSet) && ((p->IEid&p->IEidMask)==(ie&p->IEidMask))) {
(p->DecodeFunction)(f,INDENT_SIZE,&gvars,iea);
break;
}
p++;
}
if ( p->DecodeFunction == NULL )
f<<DrawIndent(INDENT_SIZE)<<"!!!NO DECODERS INSTALLED FOR codeset="<<HexOutput(gvars.ActiveCodeSet)<<" ie="<<HexOutput(ie)<<"!!!"<<Break<<endl;
}
else
f<<DrawIndent(INDENT_SIZE)<<"!!!NO DECODERS INSTALLED!!!"<<Break<<endl;
}
f << eFont;
bi = dstat;
}
// decrement the vars->LockCount. If its zero, restore the ActiveCodeSet
if ( gvars.LockCount > 0 ) {
gvars.LockCount--;
if ( gvars.LockCount == 0 )
gvars.ActiveCodeSet = gvars.LastCodeSet;
}
}
/*
if ( decodeOk ) {
// Can add some sanity check here to ensure that all the mandatory fields were entered
if ( Protocol == PROTOCOL_Q931) {
switch (MessageType) {
case MESSAGE_ALERTING: