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

C++ GetRecord函数代码示例

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

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



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

示例1: GetRecord

VkResult WrappedVulkan::vkBindBufferMemory(
    VkDevice                                    device,
    VkBuffer                                    buffer,
    VkDeviceMemory                              mem,
    VkDeviceSize                                memOffset)
{
	VkResourceRecord *record = GetRecord(buffer);

	if(m_State >= WRITING)
	{
		Chunk *chunk = NULL;

		{
			CACHE_THREAD_SERIALISER();
		
			SCOPED_SERIALISE_CONTEXT(BIND_BUFFER_MEM);
			Serialise_vkBindBufferMemory(localSerialiser, device, buffer, mem, memOffset);

			chunk = scope.Get();
		}
	
		// memory object bindings are immutable and must happen before creation or use,
		// so this can always go into the record, even if a resource is created and bound
		// to memory mid-frame
		record->AddChunk(chunk);

		record->AddParent(GetRecord(mem));
		record->baseResource = GetResID(mem);
	}

	return ObjDisp(device)->BindBufferMemory(Unwrap(device), Unwrap(buffer), Unwrap(mem), memOffset);
}
开发者ID:281627166,项目名称:renderdoc,代码行数:32,代码来源:vk_resource_funcs.cpp


示例2: GetFindThDic

tBOOL GetFindThDic(tCHAR *szStr, RECORD *lpRetRec)
{
	THSTR_FORMAT ThStr;
	tINT nPos, i;
	STR_FORMAT Str;

	if (bOpenIndexThDic == FALSE) return FALSE;
	if (strlen(szStr) >= MAX_THSTR) return FALSE; // exception
	strcpy(ThStr.szStr, szStr);

	nPos = FindRecord(&RecThStr, &ThStr, TRUE, (CompProcP)CompRecThStr);

	if (nPos == -1) return FALSE;

	GetRecord(&RecThStr, nPos, &ThStr);

	i = 0;
	while (i < C_THSTR && ThStr.nStr[i] >= 0) {
		GetRecord(&RecStr, ThStr.nStr[i], &Str);

		AppendRecord(lpRetRec, &Str);
		i ++ ;
	}

	return TRUE;
}
开发者ID:hyypucs,项目名称:NTWOAD,代码行数:26,代码来源:indexth.c


示例3: DelHash

tBOOL DelHash(DWHASH_TYPE *lpHash, tVOID *lpItem, tINT nDelInfo)
{
	tINT nPos;
	DWHASH_BLOCK_TYPE HashItem;
	DWHASH_NEXT_TYPE NextItem;
	tINT i;

	nPos = lpHash->pHashCalFunc(lpItem);

	if (nPos < 0) nPos *= -1;
	if (nPos >= lpHash->nBucketCount) { // exception
		nPos %= lpHash->nBucketCount;
	}
	memcpy(&HashItem, lpHash->lpBuf + nPos*sizeof(DWHASH_BLOCK_TYPE), sizeof(DWHASH_BLOCK_TYPE));
	if (HashItem.nInfo == nDelInfo) { // 처음 것을 지울 때..
		if (HashItem.lpNextRec == NULL) {
			HashItem.nInfo = -1;
			memcpy(lpHash->lpBuf + nPos*sizeof(DWHASH_BLOCK_TYPE), &HashItem, sizeof(DWHASH_BLOCK_TYPE));
		}
		else { // 첫번째 것을 세팅한다.
			GetRecord(HashItem.lpNextRec, 0, &NextItem);
			DelRecord(HashItem.lpNextRec, 0);

			HashItem.nInfo = NextItem.nInfo;

			if (HashItem.lpNextRec->nUsed == 0) { // clear하자
				FreeRecord(HashItem.lpNextRec);
				free(HashItem.lpNextRec);
				HashItem.lpNextRec = NULL;
			}	
			memcpy(lpHash->lpBuf + nPos*sizeof(DWHASH_BLOCK_TYPE), &HashItem, sizeof(DWHASH_BLOCK_TYPE));
			if (lpHash->nCollision > 0) lpHash->nCollision --;
		}
	}
	else if (HashItem.lpNextRec) { // 더 있으면 더 찾아야지..
		for ( i = 0 ; i < HashItem.lpNextRec->nUsed ; i ++ ) {
			GetRecord(HashItem.lpNextRec, i, &NextItem);
			if (NextItem.nInfo == nDelInfo) {
				DelRecord(HashItem.lpNextRec, i);
				if (lpHash->nCollision > 0) lpHash->nCollision --;
				break;
			}
		}
		if (HashItem.lpNextRec->nUsed == 0) { // clear하자
			FreeRecord(HashItem.lpNextRec);
			free(HashItem.lpNextRec);
			HashItem.lpNextRec = NULL;
			memcpy(lpHash->lpBuf + nPos*sizeof(DWHASH_BLOCK_TYPE), &HashItem, sizeof(DWHASH_BLOCK_TYPE));
		}	
	}
	else { // not found
		return TRUE; 
	}
	return TRUE;
}
开发者ID:hyypucs,项目名称:NTWOAD,代码行数:55,代码来源:dwhash.c


示例4: UpdateThTime

tBOOL UpdateThTime(pthread_t ThreadId)
{
	tBOOL bRetVal = TRUE;
#if defined(_USE_SAFETH)
	tINT nItem;
	SAFETH_FORMAT SafeItem;
	time_t t = time(NULL);
	tINT last_state;

	if (!bStSafeTh) return TRUE;
	//pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &last_state);
	pthread_cleanup_push((tVOID *)pthread_mutex_unlock, (tVOID *)&gCheckTh);
	pthread_mutex_lock(&gCheckTh) ;

	SafeItem.ThreadId = ThreadId;

        nItem = FindRecord(&RecordThTime,  &SafeItem, TRUE, (CompProcP)Comp_ThreadId);
        if (nItem == -1) { // 새로운 thread
		bRetVal = FALSE;
		goto EndProc;
        }
        else {
                t = time(NULL); // 현재 시간..
                GetRecord(&RecordThTime, nItem, &SafeItem);
                memcpy(&(SafeItem.s_time), &t, sizeof(time_t));
                SetRecord(&RecordThTime, nItem, &SafeItem);
        }

EndProc:;
	//pthread_mutex_unlock(&gCheckTh);
	pthread_cleanup_pop(1);
	//pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &last_state);
#endif
	return bRetVal;
}
开发者ID:hyypucs,项目名称:NTWOAD,代码行数:35,代码来源:safeth.c


示例5: GlNormal3f

int GlNormal3f(int argument_count, void* data)
{
    int error = 0;

    VALUE X = GetRecord("x", gCurrentContext);
    VALUE Y = GetRecord("y", gCurrentContext);
    VALUE Z = GetRecord("z", gCurrentContext);

    glNormal3f(TypeFloat(X), 
               TypeFloat(Y), 
               TypeFloat(Z));

    gLastExpression.type = VAL_NIL;
    gLastExpression.data.primitive = 0;
    return error;
}
开发者ID:gregtour,项目名称:duck-lang,代码行数:16,代码来源:SDLlib.c


示例6: GlColor3f

int GlColor3f(int argument_count, void* data)
{
    int error = 0;

    VALUE R = GetRecord("r", gCurrentContext);
    VALUE G = GetRecord("g", gCurrentContext);
    VALUE B = GetRecord("b", gCurrentContext);

    glColor3f(TypeFloat(R), 
              TypeFloat(G), 
              TypeFloat(B));

    gLastExpression.type = VAL_NIL;
    gLastExpression.data.primitive = 0;
    return error;
}
开发者ID:gregtour,项目名称:duck-lang,代码行数:16,代码来源:SDLlib.c


示例7: PutHash

tBOOL PutHash(DWHASH_TYPE *lpHash, tVOID *lpItem)
{
	tINT nPos;
	DWHASH_BLOCK_TYPE HashItem;
	DWHASH_NEXT_TYPE NextItem;
	tINT i;

	nPos = lpHash->pHashCalFunc(lpItem);

	if (nPos < 0) nPos *= -1;
	if (nPos >= lpHash->nBucketCount) { // exception
		nPos %= lpHash->nBucketCount;
	}
	memcpy(&HashItem, lpHash->lpBuf + nPos*sizeof(DWHASH_BLOCK_TYPE), sizeof(DWHASH_BLOCK_TYPE));
	if (HashItem.nInfo == -1) { // 없다.
		return FALSE;
	}
	lpHash->pHashPutFunc(lpItem, HashItem.nInfo);
	if (HashItem.lpNextRec) {
		for ( i = 0 ; i < HashItem.lpNextRec->nUsed ; i ++ ) {
			GetRecord(HashItem.lpNextRec, i, &NextItem);
			lpHash->pHashPutFunc(lpItem, NextItem.nInfo);

		}
	}

	return TRUE;
}
开发者ID:hyypucs,项目名称:NTWOAD,代码行数:28,代码来源:dwhash.c


示例8: DuckParses

/* parses(source) -> boolean */
int DuckParses(int argument_count, void* data)
{
    L_TOKEN*      lexing;
    char*         buffer;
    int           error = 0;

    VALUE argument = GetRecord("source", gCurrentContext);

    gLastExpression.type = VAL_PRIMITIVE;
    gLastExpression.data.primitive = 0;

    if (argument.type == VAL_STRING) 
    {
        lexing = LexSourceBuffer(argument.data.string, &buffer, CONTEXT_FREE_GRAMMAR);
        if (lexing == NULL) 
        {
            gLastExpression.data.primitive = -1;
            FreeLexing(lexing, buffer);
            //return 1;
            return 0;
        }
        gLastExpression.data.primitive = ParseSucceeds(lexing, PARSE_TABLE, CONTEXT_FREE_GRAMMAR);
        if (gLastExpression.data.primitive == 0) {
            FreeLexing(lexing, buffer);
            return 0;
        }

        /* free lexing */
        FreeLexing(lexing, buffer);
    }

    return error;
}
开发者ID:gregtour,项目名称:duck-lang,代码行数:34,代码来源:stdduck.c


示例9: GetSection

wyChar *
wyIni::GetValue(const wyChar *sec,const wyChar *key,  wyChar *comment)
{
    struct tagSection *st = GetSection(sec);
    struct tagRecord *result;

    if(!st)
    {
        strcpy(comment,"");
        return "";
    }

	result =	GetRecord(st,key);	

	if(result != NULL)
	{
        strcpy(comment,result->m_comments.GetString());
        return (wyChar *)result->m_value.GetString();
	}	
	else
	{
		strcpy(comment,"");
		return "";
	}
}
开发者ID:AwkwardDev,项目名称:sqlyog-community,代码行数:25,代码来源:wyIni.cpp


示例10: vkDestroySwapchainKHR

// needs to be separate because it releases internal resources
void WrappedVulkan::vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR obj, const VkAllocationCallbacks* pAllocator)
{
	// release internal rendering objects we created for rendering the overlay
	{
		SwapchainInfo &info = *GetRecord(obj)->swapInfo;

		RenderDoc::Inst().RemoveFrameCapturer(LayerDisp(m_Instance), info.wndHandle);

		VkRenderPass unwrappedRP = Unwrap(info.rp);
		GetResourceManager()->ReleaseWrappedResource(info.rp, true);
		ObjDisp(device)->DestroyRenderPass(Unwrap(device), unwrappedRP, NULL);

		for(size_t i=0; i < info.images.size(); i++)
		{
			VkFramebuffer unwrappedFB = Unwrap(info.images[i].fb);
			VkImageView unwrappedView = Unwrap(info.images[i].view);
			GetResourceManager()->ReleaseWrappedResource(info.images[i].fb, true);
			// note, image doesn't have to be destroyed, just untracked
			GetResourceManager()->ReleaseWrappedResource(info.images[i].im, true);
			GetResourceManager()->ReleaseWrappedResource(info.images[i].view, true);
			ObjDisp(device)->DestroyFramebuffer(Unwrap(device), unwrappedFB, NULL);
			ObjDisp(device)->DestroyImageView(Unwrap(device), unwrappedView, NULL);
		}
	}

	VkSwapchainKHR unwrappedObj = Unwrap(obj);
	GetResourceManager()->ReleaseWrappedResource(obj, true);
	ObjDisp(device)->DestroySwapchainKHR(Unwrap(device), unwrappedObj, pAllocator);
}
开发者ID:Althar93,项目名称:renderdoc,代码行数:30,代码来源:vk_misc_funcs.cpp


示例11: AFX_MANAGE_STATE

void CDocStructRecordItem::OnDrawCaption(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pMetrics) {
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    CDocStructRecord* pRecord = (CDocStructRecord*)GetRecord();
    if (pRecord == NULL) {
        return;
    }
    pDrawArgs->nTextAlign = DT_VCENTER;
    if (pRecord->m_nCurrentLayout == DocumentStructureLayout(Thumbnail)) {
        if (pRecord->IsPage()) {
            CRect rcCaption;
            rcCaption.SetRect(pDrawArgs->rcItem.left - RECORD_ITEM_OFFSET + 1, pDrawArgs->rcItem.bottom - RECORD_TEXT_OFFSET - 5, pDrawArgs->rcItem.right - pDrawArgs->pRow->GetTreeDepth() * RECORD_ITEM_OFFSET, pDrawArgs->rcItem.bottom);
            pDrawArgs->rcItem.SetRect(rcCaption.TopLeft(), rcCaption.BottomRight());
        } else {
            CRect rcCaption (pDrawArgs->rcItem);
            rcCaption.left += 3;
            rcCaption.right -= pDrawArgs->pRow->GetTreeDepth() * RECORD_ITEM_OFFSET;
            pDrawArgs->rcItem.SetRect(rcCaption.TopLeft(), rcCaption.BottomRight());
        }
    }

    // If this is a "click" page, draw icon in front of page title
    bool bDrawClickIcon = pRecord->IsPage() && pRecord->m_pContainer != NULL && pRecord->m_pContainer->ShowClickIcon(pRecord->m_pvData);
    if (bDrawClickIcon) { 
        CXTPReportPaintManager* pPaintManager = pDrawArgs->pControl->GetPaintManager();
        if (pPaintManager) {
            CRect rcCaption(pDrawArgs->rcItem);
            CRect rcBitmap(rcCaption.right-22, rcCaption.top, rcCaption.right-2, rcCaption.bottom);
            CSize csBitmap = ((CXTPDocumentStructurePaintManager*)pPaintManager)->DrawCustomBitmap(pDrawArgs->pDC, pDrawArgs->pRow, rcBitmap, 5);
            pDrawArgs->rcItem.right = rcBitmap.left;
        }
    }

    CXTPReportRecordItem::OnDrawCaption(pDrawArgs, pMetrics);
}
开发者ID:identity0815,项目名称:os45,代码行数:34,代码来源:DocStructRecord.cpp


示例12:

HRESULT KG3DDefaultShaderGroupSolid::ReplaceDefaultShader( DWORD dwType, const KG3DDefaultShaderGroupElem& newShader, KG3DDefaultShaderGroupElem& oldShader)
{
	DefaultShaderRecord& DS =GetRecord(dwType);
	oldShader = DS.elem;
	DS.elem = newShader;
	return S_OK;
}
开发者ID:1suming,项目名称:pap2,代码行数:7,代码来源:KG3DDefaultShaderGroup.cpp


示例13: FindSlot

	// get or create the record for a specified key
	void *Untyped::Open(Key aKey)
	{
		// convert key to a slot
		// (HACK: assume key is already a hash)
		size_t slot = FindSlot(aKey);

		// if the slot is not empty...
		if (slot != EMPTY)
		{
			// return the record
			return GetRecord(slot);
		}

		// grow if the database is full
		if (mCount >= mLimit)
			Grow();

		// add a new record
		void *record = AllocRecord(aKey);

		// check parent
		const void *source = mNil;
		if (this != &parent && parent.GetCount())
			if (Key aParentKey = parent.Get(aKey))
				source = Find(aParentKey);
		CreateRecord(record, source);

		// return the record
		return record;
	}
开发者ID:Fissuras,项目名称:videoventure,代码行数:31,代码来源:DatabaseUntyped.cpp


示例14: DatosProceso

int DatosProceso(int id,Tipo_Proceso *pProceso,char szProceso[])
{
	char szSql[1000];
	Tipo_XML *xml=NULL;
	int sts;
	sprintf(szSql,"select ip,cantidad,port from procesos where proceso='%s'",szProceso);
	xml=GetRecord(id,szSql,xml,&sts);
	if (sts==0) 
	{
		printf("El proceso %s, no existe en la tabla de procesos\n\r",szProceso);
		xml=CierraXML(xml);
		exit(1);
	}

	//ImprimeXML(xml);
	if (!GetIntXML(xml,"CANTIDAD",&pProceso->nCantidad)) goto close;
	if (!GetIntXML(xml,"PORT",&pProceso->nPort)) goto close;
	//if (!GetIntXML(xml,"FORMA_CONEXION_BD",&pProceso->nFormaConexionBD)) goto close;
	GetStrXML(xml,"IP",pProceso->szIp,sizeof(pProceso->szIp));
	xml=CierraXML(xml);
	global.nProcesos = pProceso->nCantidad;
	return 1;
close:
	CloseDatabase(id);
	exit(1);
}
开发者ID:CM0R31R4,项目名称:motor_desarrollo,代码行数:26,代码来源:IsysFunciones.c


示例15: GetRecord

int dbDatabase::GetRecord(const String &tbname, int recno, dbRecord& Record) {
  int h;

  if((h = GetTableHandle(tbname)) == MTDB_TB_NOT_FOUND)
  	return MTDB_TB_NOT_FOUND;

	return GetRecord(h, recno, Record);
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:8,代码来源:records.cpp


示例16: GetRecord

string CIniFile::GetValue(string KeyName, string SectionName, string FileName)
{
	vector<Record> content = GetRecord(KeyName,SectionName, FileName);		// Get the Record

	if(!content.empty())													// Make sure there is a value to return
		return content[0].Value;											// And return the value

	return "";																// No value was found
}
开发者ID:rad-corps,项目名称:MonsterMayhem,代码行数:9,代码来源:IniFile.cpp


示例17: MathPow

/*Math.pow(base, exponent)*/
int MathPow(int arg_count){
  float base = 0.0;
  float exponent = 0.0;
  float val = 0.0;

  VALUE base_arg = GetRecord("base", gCurrentContext);
  VALUE exp_arg = GetRecord("exponent", gCurrentContext);

  base = TypeFloat(base_arg);
  exponent = TypeFloat(exp_arg);

  val = pow(base, exponent);

  gLastExpression.type = VAL_FLOATING_POINT;
  gLastExpression.floatp = val;

  return 0;
}
开发者ID:shohoku11wrj,项目名称:duck-lang,代码行数:19,代码来源:dmath.c


示例18: DuckFloat

/* float(value) */
int DuckFloat(int argument_count, void* data)
{
    int error = 0;

    VALUE argument = GetRecord("value", gCurrentContext);

    gLastExpression.type = VAL_FLOATING_POINT;
    gLastExpression.data.floatp = TypeFloat(argument);
    
    return error;
}
开发者ID:gregtour,项目名称:duck-lang,代码行数:12,代码来源:stdduck.c


示例19: SCOPED_LOCK

VkResult WrappedVulkan::vkFlushMappedMemoryRanges(
			VkDevice                                    device,
			uint32_t                                    memRangeCount,
			const VkMappedMemoryRange*                  pMemRanges)
{
	if(m_State >= WRITING)
	{
		bool capframe = false;
		{
			SCOPED_LOCK(m_CapTransitionLock);
			capframe = (m_State == WRITING_CAPFRAME);
		}

		for(uint32_t i = 0; i < memRangeCount; i++)
		{
			ResourceId memid = GetResID(pMemRanges[i].memory);
			
			MemMapState *state = GetRecord(pMemRanges[i].memory)->memMapState;
			state->mapFlushed = true;

			if(state->mappedPtr == NULL)
			{
				RDCERR("Flushing memory that isn't currently mapped");
				continue;
			}

			if(capframe)
			{
				CACHE_THREAD_SERIALISER();

				SCOPED_SERIALISE_CONTEXT(FLUSH_MEM);
				Serialise_vkFlushMappedMemoryRanges(localSerialiser, device, 1, pMemRanges + i);

				m_FrameCaptureRecord->AddChunk(scope.Get());
				GetResourceManager()->MarkResourceFrameReferenced(GetResID(pMemRanges[i].memory), eFrameRef_Write);
			}
			else
			{
				GetResourceManager()->MarkDirtyResource(memid);
			}
		}
	}
	
	VkMappedMemoryRange *unwrapped = GetTempArray<VkMappedMemoryRange>(memRangeCount);
	for(uint32_t i=0; i < memRangeCount; i++)
	{
		unwrapped[i] = pMemRanges[i];
		unwrapped[i].memory = Unwrap(unwrapped[i].memory);
	}

	VkResult ret = ObjDisp(device)->FlushMappedMemoryRanges(Unwrap(device), memRangeCount, unwrapped);

	return ret;
}
开发者ID:281627166,项目名称:renderdoc,代码行数:54,代码来源:vk_resource_funcs.cpp


示例20: ObjDisp

VkResult WrappedVulkan::vkMapMemory(
			VkDevice                                    device,
			VkDeviceMemory                              mem,
			VkDeviceSize                                offset,
			VkDeviceSize                                size,
			VkMemoryMapFlags                            flags,
			void**                                      ppData)
{
	void *realData = NULL;
	VkResult ret = ObjDisp(device)->MapMemory(Unwrap(device), Unwrap(mem), offset, size, flags, &realData);

	if(ret == VK_SUCCESS && realData)
	{
		ResourceId id = GetResID(mem);

		if(m_State >= WRITING)
		{
			VkResourceRecord *memrecord = GetRecord(mem);

			// must have map state, only non host visible memories have no map
			// state, and they can't be mapped!
			RDCASSERT(memrecord->memMapState);
			MemMapState &state = *memrecord->memMapState;

			// ensure size is valid
			RDCASSERT(size == VK_WHOLE_SIZE || (size > 0 && size <= memrecord->Length));

			state.mappedPtr = (byte *)realData;
			state.refData = NULL;

			state.mapOffset = offset;
			state.mapSize = size == VK_WHOLE_SIZE ? memrecord->Length : size;
			state.mapFlushed = false;

			*ppData = realData;

			if(state.mapCoherent)
			{
				SCOPED_LOCK(m_CoherentMapsLock);
				m_CoherentMaps.push_back(memrecord);
			}
		}
		else
		{
			*ppData = realData;
		}
	}
	else
	{
		*ppData = NULL;
	}

	return ret;
}
开发者ID:281627166,项目名称:renderdoc,代码行数:54,代码来源:vk_resource_funcs.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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