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

C++ GetPtr函数代码示例

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

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



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

示例1: DtPushConst

void    DtPushConst( void ) {
//=====================

// Push constant.

    DXPush( IntegerValue( GetPtr() ) );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:7,代码来源:fcdata.c


示例2: 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,代码来源:fcdata.c


示例3: GetNTHeaders32

PIMAGE_NT_HEADERS32 
GetNTHeaders32(LPCVOID p, SIZE_T size)
{
	try
	{
		PIMAGE_NT_HEADERS32 nt;
		PIMAGE_DOS_HEADER dos;

		if(size < sizeof(IMAGE_DOS_HEADER) + sizeof(IMAGE_NT_HEADERS))
			return NULL;
		
		dos = (PIMAGE_DOS_HEADER) p;
		if(dos->e_magic != IMAGE_DOS_SIGNATURE)
			return NULL;

		if(dos->e_lfanew + sizeof(IMAGE_NT_HEADERS) > size)
			return NULL;

		nt = (PIMAGE_NT_HEADERS32) GetPtr(dos, dos->e_lfanew);
		if(nt->Signature != IMAGE_NT_SIGNATURE)
			return NULL;

		if(nt->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC)
			return NULL;

		return nt;
	}
	catch(...)
	{
	}

	return NULL;
}
开发者ID:amorvita,项目名称:karma,代码行数:33,代码来源:dump_manifest.cpp


示例4: DtDataDoLoop

void    DtDataDoLoop( void ) {
//======================

// Process implied-DO for DATA statement.

    intstar4    e2;
    intstar4    e3;
    intstar4    iter_count;
    sym_id      do_var;
    obj_ptr     curr_fc;
    intstar4    e1;

    e3 = DXPop();
    e2 = DXPop();
    e1 = DXPop();
    do_var = GetPtr();
    do_var->u.ns.si.ms.u.value = &e1;
    iter_count = ( e2 - e1 + e3 ) / e3;
    curr_fc = FCodeTell( 0 );
    while( iter_count > 0 ) {
        FCodeSeek( curr_fc );
        FCodeSequence();
        *do_var->u.ns.si.ms.u.value += e3;
        iter_count--;
    }
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:26,代码来源:fcdata.c


示例5: DtInpStruct

void    DtInpStruct( void ) {
//=====================

// Initialize a struct.

    StructInit( ((sym_id)GetPtr())->u.sd.fl.sym_fields );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:7,代码来源:fcdata.c


示例6: Realloc

//----------------------------------------------------------
void TContainerRise::Append( int size, char* p )
{
  int oldSize = mSizeUse;
  int newSize = mSizeUse + size;
  Realloc( newSize );
  memcpy( GetPtr() + oldSize, p, size );
}
开发者ID:retrydev,项目名称:MMO-Framework,代码行数:8,代码来源:ContainerRise.cpp


示例7: INTELIB_ASSERT

SReference& SReference::Cdr() const
{
    INTELIB_ASSERT(GetPtr(), IntelibX_unexpected_unbound_value());
    SExpressionCons *tp = DynamicCastGetPtr<SExpressionCons>();
    INTELIB_ASSERT(tp, IntelibX_not_a_cons(*this));
    return tp->Cdr();
}
开发者ID:iley,项目名称:intelib,代码行数:7,代码来源:sexpress.cpp


示例8: GetSendDataSize

PBYTE CInfoFishing::GetSendData(void)
{
	int i, nCount;
	PBYTE pData, pDataTmp;
	DWORD dwSize;
	PINFOFISHINGPARAM pInfo;

	nCount	= m_apParam.GetSize ();
	dwSize	= GetSendDataSize ();
	pData	= ZeroNew (dwSize);

	pDataTmp = pData;

	CopyMemoryRenew (pDataTmp, &m_dwFishingID,	sizeof (m_dwFishingID),	pDataTmp);	/* 釣りID */
	CopyMemoryRenew (pDataTmp, &m_nAverage,		sizeof (m_nAverage),	pDataTmp);	/* 釣れる確率 */
	strcpyRenew ((LPSTR)pDataTmp, m_strName, pDataTmp);								/* 釣り場名 */
	CopyMemoryRenew (pDataTmp, &nCount,			sizeof (nCount),		pDataTmp);	/* 釣り情報パラメータ数 */
	for (i = 0; i < nCount; i ++) {
		pInfo = GetPtr (i);
		CopyMemoryRenew (pDataTmp, &pInfo->dwItemTypeID,	sizeof (pInfo->dwItemTypeID),	pDataTmp);	/* アイテム種別ID */
		CopyMemoryRenew (pDataTmp, &pInfo->nAverage,		sizeof (pInfo->nAverage),		pDataTmp);	/* 釣りきる確率 */
	}

	return pData;
}
开发者ID:psgsgpsg,项目名称:scrapbookonline,代码行数:25,代码来源:InfoFishing.cpp


示例9: 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,代码来源:fcdata.c


示例10: Init

RadioButton::RadioButton(Gui & mGui,int x,int y, std::string Txt)
{

    Init(mGui);
    mText = new Text(Txt,x + mPositionTex[0].w,y);
    setPosition(x,y);
    mGui.AddClassGui(GetPtr());
}
开发者ID:tjel,项目名称:infpro-5,代码行数:8,代码来源:RadioButton.cpp


示例11: GetDataSizeNo

PBYTE CInfoFishing::GetWriteData(int nNo, PDWORD pdwSize)
{
	int i, nCount, *pnTmp;
	PBYTE pRet, pSrc;
	DWORD dwSize, *pdwTmp;
	PINFOFISHINGPARAM pInfo;

	pRet		= NULL;
	pSrc		= NULL;
	dwSize		= GetDataSizeNo (nNo);
	*pdwSize	= dwSize;
	nCount		= m_apParam.GetSize ();

	if (dwSize == 0) {
		goto Exit;
	}
	pRet = new BYTE[dwSize];

	switch (nNo) {
	case 0:		pSrc = (PBYTE)&m_dwFishingID;		break;	/* 釣りID */
	case 1:		pSrc = (PBYTE)&m_nAverage;			break;	/* 釣れる確率 */
	case 2:		pSrc = (PBYTE)(LPCSTR)m_strName;	break;	/* 釣り場名 */
	case 3:		pSrc = (PBYTE)&nCount;				break;	/* 釣り情報パラメータ数 */
	case 4:		/* アイテム種別ID */
		pdwTmp = (PDWORD)pRet;
		for (i = 0; i < nCount; i ++) {
			pInfo = GetPtr (i);
			pdwTmp[i] = pInfo->dwItemTypeID;
		}
		break;
	case 5:		/* 釣りきる確率 */
		pnTmp = (int *)pRet;
		for (i = 0; i < nCount; i ++) {
			pInfo = GetPtr (i);
			pnTmp[i] = pInfo->nAverage;
		}
		break;
	}

	if (pSrc) {
		CopyMemory (pRet, pSrc, dwSize);
	}

Exit:
	return pRet;
}
开发者ID:psgsgpsg,项目名称:scrapbookonline,代码行数:46,代码来源:InfoFishing.cpp


示例12: GetSize

//----------------------------------------------------------
void TContainerRise::AddData(char*p, int size)
{
  int oldSize = GetSize();
  int newSize = oldSize + size;
  Realloc(newSize);
  char* pBound = GetPtr();
  memcpy(pBound + oldSize, p, size);
}
开发者ID:norak,项目名称:MMO-Framework,代码行数:9,代码来源:ContainerRise.cpp


示例13: RenewMotionInfo

void CLibInfoCharCli::RenewMotionInfo(DWORD dwCharID)
{
	int i, nCount;
	PCInfoCharCli pChar;

	if (dwCharID) {
		pChar = (PCInfoCharCli)GetPtr (dwCharID);
		RenewMotionInfo (pChar);

	} else {
		nCount = GetCount ();
		for (i = 0; i < nCount; i ++) {
			pChar = (PCInfoCharCli)GetPtr (i);
			RenewMotionInfo (pChar);
		}
	}
}
开发者ID:psgsgpsg,项目名称:scrapbookonline,代码行数:17,代码来源:LibInfoCharCli.cpp


示例14: Current

CWord::SHomIt::SHomIt(const THomonymVector& homonyms)
    : Current(homonyms.begin())
    , Begin(homonyms.begin())
    , End(homonyms.end())
{
    if (Ok() && GetPtr()->IsDeleted())
        operator++();
}
开发者ID:Frankie-666,项目名称:tomita-parser,代码行数:8,代码来源:word.cpp


示例15: Contains

//-----------------------------------------------------------------------------
// Name: CArrayList::Contains
// Desc: Returns whether the list contains an entry identical to the 
//       specified entry data.
//-----------------------------------------------------------------------------
bool CArrayList::Contains( void* pEntryData )
{
    for( UINT iEntry = 0; iEntry < m_NumEntries; iEntry++ )
    {
        if( m_ArrayListType == AL_VALUE )
        {
            if( memcmp( GetPtr(iEntry), pEntryData, m_BytesPerEntry ) == 0 )
                return true;
        }
        else
        {
            if( GetPtr(iEntry) == pEntryData )
                return true;
        }
    }
    return false;
}
开发者ID:AnthonyNystrom,项目名称:Julia-4D,代码行数:22,代码来源:dxutil.cpp


示例16: xst_assert2

	i32	CShaderManager::PrepareResource(ResourceWeakPtr *const ppRes)
	{
		xst_assert2( ppRes && (*ppRes).IsValid() );
		auto pRes = *ppRes;
		Resources::IShader* pShader = (Resources::IShader*)pRes.GetPtr();
		pShader->m_eProfile = this->m_eShaderProfile;
		pShader->m_eShaderLanguage = this->m_eShaderLang;
		pShader->m_eShaderType = this->m_eShaderType;
		if( XST_FAILED( m_pRenderSystem->GetShaderSystem()->PrepareResource( pRes.GetPtr() ) ) )
		{
			return XST_FAIL;
		}
		//pRes->m_iResourceState = ResourceStates::PREPARED;
		pShader->m_iResourceState = Resources::ResourceStates::PREPARED;

		return XST_OK;
	}
开发者ID:przemyslaw-szymanski,项目名称:x-source-engine,代码行数:17,代码来源:XSECShaderManager.cpp


示例17: sizeof

PRInt64
nsAttrValue::SizeOf() const
{
  PRInt64 size = sizeof(*this);

  switch (BaseType()) {
    case eStringBase:
    {
      // TODO: we might be counting the string size more than once.
      // This should be fixed with bug 677487.
      nsStringBuffer* str = static_cast<nsStringBuffer*>(GetPtr());
      size += str ? str->StorageSize() : 0;
      break;
    }
    case eOtherBase:
    {
      MiscContainer* container = GetMiscContainer();

      if (!container) {
        break;
      }

      size += sizeof(*container);

      void* otherPtr = MISC_STR_PTR(container);
      // We only count the size of the object pointed by otherPtr if it's a
      // string. When it's an atom, it's counted separatly.
      if (otherPtr &&
          static_cast<ValueBaseType>(container->mStringBits & NS_ATTRVALUE_BASETYPE_MASK) == eStringBase) {
        // TODO: we might be counting the string size more than once.
        // This should be fixed with bug 677487.
        nsStringBuffer* str = static_cast<nsStringBuffer*>(otherPtr);
        size += str ? str->StorageSize() : 0;
      }

      // TODO: mCSSStyleRule and mSVGValue might be owned by another object
      // which would make us count them twice, bug 677493.
      if (Type() == eCSSStyleRule && container->mCSSStyleRule) {
        // TODO: Add SizeOf() to StyleRule, bug 677503.
        size += sizeof(*container->mCSSStyleRule);
      } else if (Type() == eSVGValue && container->mSVGValue) {
        // TODO: Add SizeOf() to nsSVGValue, bug 677504.
        size += sizeof(*container->mSVGValue);
      } else if (Type() == eAtomArray && container->mAtomArray) {
        size += sizeof(container->mAtomArray) + sizeof(nsTArrayHeader);
        size += container->mAtomArray->Capacity() * sizeof(nsCOMPtr<nsIAtom>);
        // Don't count the size of each nsIAtom, they are counted separatly.
      }

      break;
    }
    case eAtomBase:    // Atoms are counted separatly.
    case eIntegerBase: // The value is in mBits, nothing to do.
      break;
  }

  return size;
}
开发者ID:Egyptghost1,项目名称:DOMinator,代码行数:58,代码来源:nsAttrValue.cpp


示例18: FCStmtDefineLabel

void    FCStmtDefineLabel( void ) {
//===========================

    sym_id      sn;

    sn = GetPtr();
    CGControl( O_LABEL, NULL, GetStmtLabel( sn ) );
    RefStmtLabel( sn );
}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:9,代码来源:fcflow.c


示例19: FCStmtJmpAlways

void    FCStmtJmpAlways( void ) {
//=========================

    sym_id      sn;

    sn = GetPtr();
    CGControl( O_GOTO, NULL, GetStmtLabel( sn ) );
    RefStmtLabel( sn );
}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:9,代码来源:fcflow.c


示例20: FCOutStruct

void    FCOutStruct( void ) {
//=====================

// Output a structure.

    IORtnTable = OutRtn;
    TmpStructPtr = MkTmp( XPop(), TY_POINTER );
    StructIO( ((sym_id)GetPtr())->u.sd.fl.fields );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:9,代码来源:fcio.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetPubKey函数代码示例发布时间:2022-05-30
下一篇:
C++ GetProxy函数代码示例发布时间: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