本文整理汇总了C++中GETBIT函数的典型用法代码示例。如果您正苦于以下问题:C++ GETBIT函数的具体用法?C++ GETBIT怎么用?C++ GETBIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GETBIT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GETBIT
void BookExt_Conditional12::load(CFRecord& record)
{
unsigned char flags;
record >> flags;
fPublishedBookItems = GETBIT(flags, 1);
fShowPivotChartFilter = GETBIT(flags, 2);
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:7,代码来源:BookExt_Conditional12.cpp
示例2: closest_in_range
/*
* Finds the closest used position in the packed memory
* array (including index) within a range (non-inclusive).
* Returns -1 on failure.
*/
int closest_in_range(PMA* pma, int index, int b_lim, int t_lim){
int closest = -1;
int radius = 0;
int fail = 0;
while (!fail && closest == -1){
fail = 1;
if (t_lim > index + radius){
fail = 0;
if (GETBIT(pma->bitmap, index + radius)){
closest = index + radius;
}
}
if (b_lim < index - radius){
fail = 0;
if (GETBIT(pma->bitmap, index - radius)){
closest = index - radius;
}
}
radius++;
}
return closest;
}
开发者ID:encyclopedea,项目名称:PackedMemoryArray,代码行数:32,代码来源:pkd_mem_arr.c
示例3: GETBIT
void SortData::readFields(CFRecord& record)
{
unsigned short flags;
record >> frtHeader >> flags;
fCol = GETBIT(flags, 0);
fCaseSensitive = GETBIT(flags, 1);
fAltMethod = GETBIT(flags, 2);
sfp = GETBITS(flags, 3, 5);
RFX rfx_orig;
record >> rfx_orig >> cconditions;
rfx = static_cast<std::wstring >(rfx_orig);
record >> idParent;
std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12];
while(!recs.empty())
{
record.appendRawData(recs.front()->getData() + 12, recs.front()->getDataSize() - 12);
recs.pop_front();
}
for(unsigned int i = 0; i < cconditions; ++i)
{
SortCond12Ptr sort_cond(new SortCond12);
record >> *sort_cond;
sortCond12Array.push_back(sort_cond);
}
}
开发者ID:ShockwaveNN,项目名称:core,代码行数:32,代码来源:SortData.cpp
示例4: checklist
/*===========================================================================*
* checklist *
*===========================================================================*/
static int checklist(char *file, int line,
struct slabheader *s, int l, int bytes)
{
struct slabdata *n = s->list_head[l];
int ch = 0;
while(n) {
int count = 0, i;
MYASSERT(n->sdh.magic1 == MAGIC1);
MYASSERT(n->sdh.magic2 == MAGIC2);
MYASSERT(n->sdh.list == l);
MYASSERT(usedpages_add(n->sdh.phys, VM_PAGE_SIZE) == 0);
if(n->sdh.prev)
MYASSERT(n->sdh.prev->sdh.next == n);
else
MYASSERT(s->list_head[l] == n);
if(n->sdh.next) MYASSERT(n->sdh.next->sdh.prev == n);
for(i = 0; i < USEELEMENTS*8; i++)
if(i >= ITEMSPERPAGE(bytes))
MYASSERT(!GETBIT(n, i));
else
if(GETBIT(n,i))
count++;
MYASSERT(count == n->sdh.nused);
ch += count;
n = n->sdh.next;
}
return ch;
}
开发者ID:locosoft1986,项目名称:nucleos,代码行数:33,代码来源:slaballoc.c
示例5: GETBITS
void AutoFilter::readFields(CFRecord& record)
{
size_t pos_record = record.getRdPtr();
if (size == 0xffffffff) size = record.getDataSize() - pos_record;
if (size > 0)
{
bExist = true;
}
m_bAutoFilter12 = false;
unsigned short flags;
record >> iEntry >> flags;
wJoin = GETBITS(flags, 0, 1);
fSimple1 = GETBIT(flags, 2);
fSimple2 = GETBIT(flags, 3);
fTopN = GETBIT(flags, 4);
fTop = GETBIT(flags, 5); //top(1) or bottom(0)
fPercent = GETBIT(flags, 6);
wTopN = GETBITS(flags, 7, 15);
unsigned short _iEntry = iEntry;
unsigned char _wJoin = wJoin;
unsigned short _wTopN = wTopN;
if (fTopN != 1)
{
record >> doper1;
record >> doper2;
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:35,代码来源:AutoFilter.cpp
示例6: GETBIT
void DXFBdr::load(CFRecord& record)
{
_UINT32 flags;
record >> flags;
dgLeft = static_cast<unsigned char>(GETBITS(flags, 0, 3));
dgRight = static_cast<unsigned char>(GETBITS(flags, 4, 7));
dgTop = static_cast<unsigned char>(GETBITS(flags, 8, 11));
dgBottom = static_cast<unsigned char>(GETBITS(flags, 12, 15));
icvLeft = static_cast<unsigned char>(GETBITS(flags, 16, 22));
icvRight = static_cast<unsigned char>(GETBITS(flags, 23, 29));
bitDiagDown = GETBIT(flags, 30);
bitDiagUp = GETBIT(flags, 31);
record >> flags;
icvTop = static_cast<unsigned char>(GETBITS(flags, 0, 6));
icvBottom = static_cast<unsigned char>(GETBITS(flags, 7, 13));
icvDiag = static_cast<unsigned char>(GETBITS(flags, 14, 20));
dgDiag = static_cast<unsigned char>(GETBITS(flags, 21, 24));
}
开发者ID:ShockwaveNN,项目名称:core,代码行数:25,代码来源:DXFBdr.cpp
示例7: AddGraceOp
/*
* Expand -g interval:o,t into primitive ops.
*/
void
AddGraceOp(int flags, long long n)
{
int ScopeMask, ScopeBit, opbase;
ScopeMask = flags&SCOPE_MASK;
if ((flags&(TYPE_MASK|EXP_MASK)) != 0) {
fprintf(stderr, "%s: AddGraceOp: Invalid flags -- %#x\n",
Program, flags);
Err++;
return;
}
opbase = OP_SET|ARG_GRACE;
for (ScopeBit = GETBIT(ScopeMask); ScopeBit != 0;
ScopeBit = GETBIT(ScopeMask)) {
switch (ScopeBit) {
case SCOPE_ONLINE:
case SCOPE_TOTAL:
AddPrimOp(opbase|ScopeBit, n);
break;
default:
fprintf(stderr, "%s: AddGraceOp: bad option %#x\n",
Program, ScopeBit);
Err++;
}
ScopeMask &= ~ScopeBit;
}
}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:33,代码来源:quota.c
示例8: GETBIT
void BookExt_Conditional11::load(CFRecord& record)
{
unsigned char flags;
record >> flags;
fBuggedUserAboutSolution = GETBIT(flags, 0);
fShowInkAnnotation = GETBIT(flags, 1);
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:7,代码来源:BookExt_Conditional11.cpp
示例9: GETBIT
void BookBool::readFields(CFRecord& record)
{
unsigned short flags;
record >> flags;
fNoSaveSup = GETBIT(flags, 0);
fHasEnvelope = GETBIT(flags, 2);
fEnvelopeVisible = GETBIT(flags, 3);
fEnvelopeInitDone = GETBIT(flags, 4);
unsigned char grUpdateLinks_num = GETBITS(flags, 5, 6);
switch(grUpdateLinks_num)
{
case 0:
grUpdateLinks = std::wstring (L"userSet");
break;
case 1:
grUpdateLinks = std::wstring (L"never");
break;
case 2:
grUpdateLinks = std::wstring (L"always");
break;
default:
throw;// EXCEPT::RT::WrongBiffRecord("Unsupported value of grUpdateLinks.", record.getTypeString());
}
fHideBorderUnselLists = GETBIT(flags, 8);
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:29,代码来源:BookBool.cpp
示例10: letterA
void letterA(void)
{
/***letter A****/
for(u8 i=0;i<6;i++)
{
// shift(rows[i],cols[i]);
u8 R=rows[i];
u8 C=cols[0][i];
DIO_u8WritePinVal(otpt_pin,0); //output enable
for(s8 i=0;i<8;i++)
{
DIO_u8WritePinVal(DS_pin,GETBIT(R,i)); // rows
DIO_u8WritePinVal(sh_clk,0); ///clk
DIO_u8WritePinVal(sh_clk,1); //clk
}
for(s8 i=0;i<8;i++)
{
DIO_u8WritePinVal(DS_pin,GETBIT(C,i)); //columns
DIO_u8WritePinVal(sh_clk,0); //clk
DIO_u8WritePinVal(sh_clk,1); //clk
}
DIO_u8WritePinVal(otpt_pin,1); // output enable
}
/*DIO_u8WritePortVal(2,0b00000000); //switch all off
DIO_u8WritePortVal(3,0b11111011); //row //low //
DIO_u8WritePortVal(2,0b00011000); //cols //high //
Delay(1);
DIO_u8WritePortVal(2,0b00000000); //switch all off
DIO_u8WritePortVal(3,0b11110111); //row //low //
DIO_u8WritePortVal(2,0b00100100); //cols //high //
Delay(1);
DIO_u8WritePortVal(2,0b00000000); //switch all off
DIO_u8WritePortVal(3,0b11101111); //row //low //
DIO_u8WritePortVal(2,0b01000010); //cols //high //
Delay(1);
DIO_u8WritePortVal(2,0b00000000); //switch all off
DIO_u8WritePortVal(3,0b11011111); //row //low //
DIO_u8WritePortVal(2,0b01111110); //cols //high //
Delay(1);
DIO_u8WritePortVal(2,0b00000000); //switch all off
DIO_u8WritePortVal(3,0b10111111); //row //low //
DIO_u8WritePortVal(2,0b01000010); //cols //high //
Delay(1);
DIO_u8WritePortVal(2,0b00000000); //switch all off
DIO_u8WritePortVal(3,0b01111111); //row //low //
DIO_u8WritePortVal(2,0b01000010); //cols //high //
Delay(1);*/
}
开发者ID:Anwariti,项目名称:SSD-PushButton,代码行数:60,代码来源:main.c
示例11: GETBIT
void FactoidData::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
fDelete = GETBIT(flags, 0);
fXMLBased = GETBIT(flags, 0);
record >> propertyBag;
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:8,代码来源:FactoidData.cpp
示例12: GETBIT
void Frame::readFields(CFRecord& record)
{
unsigned short flags;
record >> frt >> flags;
fAutoSize = GETBIT(flags, 0);
fAutoPosition = GETBIT(flags, 1);
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:8,代码来源:Frame.cpp
示例13: GETBIT
void RRD::load(CFRecord& record)
{
unsigned short flags;
record >> cbMemory >> revid >> revt >> flags;
fAccepted = GETBIT(flags, 0);
fUndoAction = GETBIT(flags, 1);
fDelAtEdgeOfSort = GETBIT(flags, 3);
record >> tabid;
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:9,代码来源:RRD.cpp
示例14: GETBIT
void CatSerRange::readFields(CFRecord& record)
{
unsigned short flags;
record >> catCross >> catLabel >> catMark >> flags;
fBetween = GETBIT(flags, 0);
fMaxCross = GETBIT(flags, 1);
fReversed = GETBIT(flags, 2);
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:9,代码来源:CatSerRange.cpp
示例15: frtHeader
void PLV::readFields(CFRecord& record)
{
FrtHeader frtHeader(rt_PLV);
record >> frtHeader;
unsigned short flags;
record >> wScalePLV >> flags;
fPageLayoutView = GETBIT(flags, 0);
fRulerVisible = GETBIT(flags, 1);
fWhitespaceHidden = GETBIT(flags, 2);
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:10,代码来源:PLV.cpp
示例16: bdz_generate_queue
static int bdz_generate_queue(cmph_uint32 nedges, cmph_uint32 nvertices, bdz_queue_t queue, bdz_graph3_t* graph3)
{
cmph_uint32 i,v0,v1,v2;
cmph_uint32 queue_head=0,queue_tail=0;
cmph_uint32 curr_edge;
cmph_uint32 tmp_edge;
cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1);
memset(marked_edge, 0, (size_t)(nedges >> 3) + 1);
for(i=0;i<nedges;i++){
v0=graph3->edges[i].vertices[0];
v1=graph3->edges[i].vertices[1];
v2=graph3->edges[i].vertices[2];
if(graph3->vert_degree[v0]==1 ||
graph3->vert_degree[v1]==1 ||
graph3->vert_degree[v2]==1){
if(!GETBIT(marked_edge,i)) {
queue[queue_head++]=i;
SETBIT(marked_edge,i);
}
};
};
while(queue_tail!=queue_head){
curr_edge=queue[queue_tail++];
bdz_remove_edge(graph3,curr_edge);
v0=graph3->edges[curr_edge].vertices[0];
v1=graph3->edges[curr_edge].vertices[1];
v2=graph3->edges[curr_edge].vertices[2];
if(graph3->vert_degree[v0]==1 ) {
tmp_edge=graph3->first_edge[v0];
if(!GETBIT(marked_edge,tmp_edge)) {
queue[queue_head++]=tmp_edge;
SETBIT(marked_edge,tmp_edge);
};
};
if(graph3->vert_degree[v1]==1) {
tmp_edge=graph3->first_edge[v1];
if(!GETBIT(marked_edge,tmp_edge)){
queue[queue_head++]=tmp_edge;
SETBIT(marked_edge,tmp_edge);
};
};
if(graph3->vert_degree[v2]==1){
tmp_edge=graph3->first_edge[v2];
if(!GETBIT(marked_edge,tmp_edge)){
queue[queue_head++]=tmp_edge;
SETBIT(marked_edge,tmp_edge);
};
};
};
free(marked_edge);
return (int)(queue_head-nedges);/* returns 0 if successful otherwies return negative number*/
};
开发者ID:filippobistaffa,项目名称:SCFC,代码行数:55,代码来源:bdz.c
示例17: GETBIT
void OleDbConn::readFields(CFRecord& record)
{
unsigned short flags;
record >> frtHeaderOld >> flags >> cst;
fPasswd = GETBIT(flags, 0);
fLocal = GETBIT(flags, 1);
record.skipNunBytes(4); //reserved2
}
开发者ID:ShockwaveNN,项目名称:core,代码行数:11,代码来源:OleDbConn.cpp
示例18: GETBIT
void OfficeArtClientAnchorSheet::loadFields(XLS::CFRecord& record)
{
global_info = record.getGlobalWorkbookInfo();
if (record.getGlobalWorkbookInfo()->Version < 0x0600)
{
unsigned char flags;
record >> flags;
fMove = GETBIT(flags, 0);
fSize = GETBIT(flags, 1);
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:11,代码来源:OfficeArtClientAnchorSheet.cpp
示例19: GETBIT
void Chart3d::readFields(CFRecord& record)
{
unsigned short flags;
unsigned short pcHeight_raw;
record >> anRot >> anElev >> pcDist >> pcHeight_raw >> pcDepth >> pcGap >> flags;
fPerspective = GETBIT(flags, 0);
fCluster = GETBIT(flags, 1);
f3DScaling = GETBIT(flags, 2);
fNotPieChart = GETBIT(flags, 4);
fWalls2D = GETBIT(flags, 5);
pcHeight = fNotPieChart ? static_cast<short>(pcHeight_raw) : pcHeight_raw;
}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:12,代码来源:Chart3d.cpp
示例20: GETBIT
void List12TableStyleClientInfo::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
fFirstColumn = GETBIT(flags, 0);
fLastColumn = GETBIT(flags, 1);
fRowStripes = GETBIT(flags, 2);
fColumnStripes = GETBIT(flags, 3);
fDefaultStyle = GETBIT(flags, 6);
record >> stListStyleName;
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:13,代码来源:List12TableStyleClientInfo.cpp
注:本文中的GETBIT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论