您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetU16函数代码示例

51自学网 2021-06-01 21:17:01
  C++
这篇教程C++ GetU16函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetU16

Position NetworkMessage::GetPosition(){	Position pos;	pos.x = GetU16();	pos.y = GetU16();	pos.z = GetByte();	return pos;}
开发者ID:PrzemolKing,项目名称:wedoserver,代码行数:8,


示例2: FCPassLabel

void    FCPassLabel( void ) {//=====================// Pass label to run-time routine.    call_handle handle;    handle = InitCall( GetU16() );    CGAddParm( handle, CGBackName( (back_handle)GetLabel( GetU16() ), TY_POINTER ), TY_POINTER );    CGDone( CGCall( handle ) );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,


示例3: mDefinition

	Dictionary::Dictionary(char const *filename) : mDefinition(null)	{		mFile = LoadFile("english.dictionary", &mFileSize);		if(mFile != null)		{			uint8 const *p = mFile;			uint8 const *bufferEnd = p + mFileSize;			char const *id = (char const *)p;			if(strncmp(id, "dictionary", 10) == 0)			{				p += 10;				mVersion = GetU16(p);				mNumWords = GetU32(p);				mWord = (char *)p;				p += mNumWords * 8;				mDefinition = new char *[mNumWords];				int wordIndex = 0;				while(p < bufferEnd)				{					mDefinition[wordIndex] = (char *)p;					uint16 definitionMask = GetU16(p);					for(int i = 0; i < eWordType::kNumWordTypes; ++i)					{						if((definitionMask & (1 << i)) != 0)						{							if(*p++ == eReferenceType::kNone)							{								p += strlen((char *)p) + 1;							}							else							{								p += 3;							}						}					}					++wordIndex;				}			}		}		SaveAsJSON();	}
开发者ID:cskilbeck,项目名称:MakeTheWords,代码行数:49,


示例4: DtFieldSubstring

void    DtFieldSubstring( void ) {//==========================// Data initialize a substring character item within a structure.    sym_id      fd;    intstar4    base;    intstar4    first;    intstar4    last;    char        name[MAX_SYMLEN+1];    base = DXPop();    first = DXPop();    fd = GetPtr();    last = GetInt();    if( last != 0 ) {        last += first - 1;    } else {        last = DXPop();    }    GetU16(); // skip typing information    if( DoSubstring( first, last, fd->u.fd.xt.size ) ) {        DXPush( base + first - 1 );        DtItemSize = last - first + 1;    } else {        STFieldName( fd, name );        Error( EV_SSTR_INVALID, name, StmtKeywords[ PR_DATA ] );    }}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:29,


示例5: DtSubstring

void    DtSubstring( void ) {//=====================// Data initialize a character substring.    intstar4    first;    intstar4    last;    sym_id      cv;    cv = GetPtr();    GetU16();   // skip typing information    first = DXPop();    if( cv != NULL ) {        if( DtFlags & DT_SS_NO_HIGH ) {            last = cv->u.ns.xt.size;            DtFlags &= ~DT_SS_NO_HIGH;        } else {            last = DXPop();        }    } else {        last = first + GetInt() - 1;    }    if( !DoSubstring( first, last, InitVar->u.ns.xt.size ) ) {        NameStmtErr( EV_SSTR_INVALID, InitVar, PR_DATA );    }    DtOffset += first - 1;    DtItemSize = last - first + 1;}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:28,


示例6: DtExp

void    DtExp( void ) {//===============// Exponentiate constants.    intstar4    op2;    intstar4    op1;    intstar4    result;    op1 = DXPop();    op2 = DXPop();    if( op1 == 0 ) {        if( op2 <= 0 ) {            Error( EX_Z_2_NOT_POS );        }        DXPush( 0 );    } else if( op2 < 0 ) {        DXPush( 0 );    } else {        result = 1;        while( op2 != 0 ) {            result *= op1;            --op2;        }        DXPush( result );    }    GetU16();   // skip typing information}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:28,


示例7: Equivalent

static  void    Equivalent( cg_op op_code ) {//===========================================    cg_name     op1;    cg_name     op2;    unsigned_16 typ_info;    cg_type     typ1;    cg_type     typ2;    typ_info = GetU16();    typ1 = GetType1( typ_info );    typ2 = GetType2( typ_info );    op1 = XPopValue( typ1 );    op2 = XPopValue( typ2 );    typ1 = CGType( op1 );    if( typ1 != TY_BOOLEAN ) {        op1 = CGCompare( O_NE, op1, CGInteger( 0, typ1 ), typ1 );    }    typ2 = CGType( op2 );    if( typ2 != TY_BOOLEAN ) {        op2 = CGCompare( O_NE, op2, CGInteger( 0, typ2 ), typ2 );    }    XPush( CGCompare( op_code, op1, op2, TY_UINT_1 ) );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:25,


示例8: FCMulMixCX

void    FCMulMixCX( void ) {//====================// Multiply a complex by a scalar.    XMulDivMix( O_TIMES, true, GetU16() );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:7,


示例9: FCCat

void    FCCat( void ) {//===============// Do concatenation operation.    XPush( Concat( GetU16(), XPop() ) );}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:7,


示例10: FCFreeLabel

void    FCFreeLabel( void ) {//=====================// Free specified label since it will no longer be referenced.    DoneLabel( GetU16() );}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:7,


示例11: FCMulMixXC

void    FCMulMixXC( void ) {//====================// Multiply a scalar by a complex.    XMulDivMix( O_TIMES, false, GetU16() );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:7,


示例12: FCDivMixCX

void    FCDivMixCX( void ) {//====================// Divide a complex by a scalar.    XMulDivMix( O_DIV, true, GetU16() );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:7,


示例13: FCMulCmplx

void    FCMulCmplx( void ) {//====================// Multiply one complex number by another.#if _CPU == 8086 || _CPU == 386    if( CPUOpts & CPUOPT_FPC ) {        // generate call to runtime complex multiply        XCmplxOp( RT_C8MUL );    } else {        // do multiplication inline        InLineMulCC( GetU16() );    }#else    // For risc we just inline the entire code    InLineMulCC( GetU16() );#endif}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:17,


示例14: DtUMinus

void    DtUMinus( void ) {//==================// Negate constant.    DXPush( -DXPop() );    GetU16();   // skip typing information}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:8,


示例15: FCJmpFalse

void    FCJmpFalse( void ) {//====================    unsigned_16 typ_info;    cg_type     typ;    cg_name     bool_expr;    typ_info = GetU16();    typ = GetType( typ_info );    if( IntType( typ_info ) ) {        bool_expr = CGCompare( O_NE, XPopValue( typ ),                               CGInteger( 0, typ ), typ );    } else {        bool_expr = XPopValue( typ );    }    CGControl( O_IF_FALSE, bool_expr, GetLabel( GetU16() ) );}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:17,


示例16: GetU16

std::string NetworkMessage::GetString(){	uint16_t stringlen = GetU16();	if(stringlen >= (16384 - m_ReadPos))		return std::string();	char* v = (char*)(m_MsgBuf + m_ReadPos);	m_ReadPos += stringlen;	return std::string(v, stringlen);}
开发者ID:cp1337,项目名称:devland,代码行数:10,


示例17: GetU16

std::string NetworkMessage::GetString(){  uint16_t stringlen = GetU16();  if(stringlen >= (NETWORKMESSAGE_MAXSIZE - m_ReadPos))    return std::string();  char* v = (char*)(m_MsgBuf + m_ReadPos);  m_ReadPos += stringlen;  return std::string(v, stringlen);}
开发者ID:OMARTINEZ210,项目名称:server,代码行数:10,


示例18: DtUnaryMul

void    DtUnaryMul( void ) {//====================// Multiply constants.    intstar4    op;    op = DXPop();    DXPush( op * op );    GetU16();   // skip typing information}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:11,


示例19: FCConjg

void    FCConjg( void ) {//=================    cg_cmplx    z;    cg_type     typ;    typ = GetType( GetU16() );    XPopCmplx( &z, typ );    XPush( CGUnary( O_UMINUS, z.imagpart, CmplxBaseType( typ ) ) );    XPush( z.realpart );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,


示例20: FCDbgLine

void    FCDbgLine( void ) {//====================// Generate line # information.    unsigned_16 line_num;    line_num = GetU16();    if( ( SubProgId->ns.flags & SY_SUBPROG_TYPE ) == SY_BLOCK_DATA ) return;    DBLineNum( line_num );}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:11,


示例21: FCStartDataStmt

void    FCStartDataStmt( void ) {//=========================// Start DATA statement processing.    FCTablePtr = DataJmpTab;    DtConstList = FCodeTell( GetU16() - sizeof( unsigned_16 ) );    DtRepCount = 0;    DtFlags = 0;    DtItemSize = 0;    DtStartSequence();}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:12,


示例22: SplitStringArray

	/*! DRAGONS: We use the current UTF16String GetString trait to ensure that we always have the correct handling,	 *           even if the user wants these strings handled differently (i.e. we do it their way!)	 */	std::list<std::string> SplitStringArray(const MDObjectPtr &Array)	{		std::list<std::string> Ret;		// Quit early if an invalid parameter		if(!Array) return Ret;		// Build a working string		static MDTypePtr ValType = MDType::Find("UTF16String");		MDObjectPtr Value = ValType ? new MDObject(ValType) : NULL;		if(!Value)		{			error("Can't build UTF16String value required by SplitStringArray() - need this type to be defined in the dictionary file/n");			return Ret;		}		// Assemble the data value (which may be an array of sub-values)		DataChunkPtr Data = Array->PutData();		// Get a pointer to the start of the data		UInt8 *pData = Data->Data;		// The number of bytes of data to split		size_t BytesLeft = Data->Size;		while(BytesLeft > 1)		{			// Find the end of the current string			size_t Len = 0;			UInt8 *p = pData;			while(BytesLeft > 1)			{				BytesLeft -= 2;				Len += 2;				UInt16 Char = GetU16(p);				p += 2;				// End when we find a null				if(Char == 0) break;			}			// Copy this string to the working value			Value->SetValue(pData, Len);			// Read out the traits-formatted version of the string			Ret.push_back(Value->GetString());			// Move the pointer forward to the next value after the string terminator			pData = p;		}		return Ret;	}
开发者ID:Dheeraj-B,项目名称:mxflib,代码行数:56,


示例23: FCChar1Move

void    FCChar1Move( void ) {//=====================// Perform single character assignment.    cg_type     typ;    cg_name     dest;    typ = GetType( GetU16() );    dest = XPop();    XPush( CGLVAssign( SCBPointer( dest ), GetChOp( typ ), typ ) );}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:12,



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


C++ GetUID函数代码示例
C++ GetTypeID函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。