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

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

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

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

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

示例1: CPUGetPiece

static mad_status       CPUGetPiece( unsigned piece,                                const char **descript_p,                                size_t *max_descript_p,                                const mad_reg_info **reg,                                mad_type_handle *disp_type,                                size_t *max_value ){    unsigned    idx;    if( !FindEntry( CPUNumeric, piece, &idx, disp_type ) )        return( MS_FAIL );    *reg = &RegList[idx].info;    if( !(MADState->reg_state[CPU_REG_SET] & CT_EXTENDED) ) {        if( *disp_type == PPCT_H_DWORD ) {            *disp_type = PPCT_H_WORD;            *reg = &RegListHalf[idx - IDX_r0].info;        }    }    //NYI: if extended & ~ 64 bit mode, downshift to 32-bit display.    //     Also, if 64 <=> 32 bit switch, tell client to redraw window    if( !(MADState->reg_state[CPU_REG_SET] & CT_HEX) ) {        switch( *disp_type ) {        case PPCT_H_DWORD:            *disp_type = PPCT_H_UINT64;            break;        case PPCT_H_WORD:            *disp_type = PPCT_H_ULONG;            break;        }    }    *descript_p = (*reg)->name;    *max_descript_p = 0;    *max_value = 0;    return( MS_OK );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:35,


示例2: strlen

RAMDISK_DIR_ENTRY * RAMDISK_PARTITION::FindPath(const char* path, const char **basename){	int pathLen = strlen(path);	char dirfilename[pathLen+1]; 					// to hold a full path 	const char *cptr = path+pathLen;				// find the end...	const char *filename = NULL;					// to hold filename	while(cptr-->path)								//search till start	{		if((*cptr=='/') || (*cptr==':'))				// split at either / or : (whichever comes first form the end!)		{			cptr++;			strlcpy(dirfilename, path, 1+cptr-path);	//copy string up till and including / or :			filename = cptr;									//filename = now remainder of string			break;		}	} 		if(!filename)	{		filename		= path;				//filename = complete path		dirfilename[0]	= 0;				//make directory path ""	}	RAMDISK_BASE_ENTRY *entry = FindEntry(dirfilename);	if(entry)	{		if(basename) *basename = filename;		return entry->IsDir();	}	return NULL;}
开发者ID:gnils,项目名称:usbloader-gx,代码行数:30,


示例3: AttachL

void DSession::AttachL(DThread& aClient){  if(FindEntry(aClient)) return;  if(!iServer) User::Leave(KErrServerTerminated);  DSessionShare** shares=iShares;  TInt top=iClients;  if(top==iAlloc)  {    if(top>(EMaxShares-EShareGranularity)) User::Leave(KErrNotSupported);    TInt newClients=top+EShareGranularity;    shares=(DSessionShare**)User::ReAllocL(shares,newClients*sizeof(DSessionShare*));    iShares=shares;    iAlloc=newClients;  }  TInt i=0;  while(i<top)  {    TUint index=(i+top)>>1;    DThread* item=shares[index]->iClient;    if(&aClient<item)    {      top=index;      continue;    }    i=index+1;  }  DSessionShare* share=DSessionShare::NewL(*this,aClient,*iServer);  Mem::Move(shares+i+1,shares+i,(iClients++-i)*sizeof(DSessionShare*));  shares[i]=share;}
开发者ID:flaithbheartaigh,项目名称:almalert,代码行数:30,


示例4: TEST_F

TEST_F(DlExtTest, ExtInfoUseFdWithOffset) {  const std::string lib_path = std::string(getenv("ANDROID_DATA")) + LIBZIPPATH;  android_dlextinfo extinfo;  extinfo.flags = ANDROID_DLEXT_USE_LIBRARY_FD | ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET;  extinfo.library_fd = TEMP_FAILURE_RETRY(open(lib_path.c_str(), O_RDONLY | O_CLOEXEC));  // Find the offset of the shared library in the zip.  ZipArchiveHandle handle;  ASSERT_EQ(0, OpenArchive(lib_path.c_str(), &handle));  ZipEntry zip_entry;  ZipString zip_name;  zip_name.name = reinterpret_cast<const uint8_t*>(LIBZIP_SIMPLE_ZIP);  zip_name.name_length = sizeof(LIBZIP_SIMPLE_ZIP) - 1;  ASSERT_EQ(0, FindEntry(handle, zip_name, &zip_entry));  extinfo.library_fd_offset = zip_entry.offset;  CloseArchive(handle);  handle_ = android_dlopen_ext(lib_path.c_str(), RTLD_NOW, &extinfo);  ASSERT_DL_NOTNULL(handle_);  uint32_t* taxicab_number = reinterpret_cast<uint32_t*>(dlsym(handle_, "dlopen_testlib_taxicab_number"));  ASSERT_DL_NOTNULL(taxicab_number);  EXPECT_EQ(1729U, *taxicab_number);}
开发者ID:tornado76,项目名称:platform_bionic,代码行数:25,


示例5: SetFocus

void wxsToolSpace::OnMouseClick(wxMouseEvent& event){    SetFocus();    if ( m_Unstable ) return;    // Finding out which tool has been clicked    int PosX = event.GetX();    int PosY = event.GetY();    Entry* Tool = FindEntry(PosX,PosY);    if ( Tool )    {        if ( !Tool->m_Tool->GetIsSelected() )        {            m_Data->SelectItem(Tool->m_Tool,!event.ControlDown());        }        else        {            m_Data->SelectItem(Tool->m_Tool,false);        }        Tool->m_Tool->MouseClick(0,PosX,PosY);    }}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:26,


示例6: FindEntry

otError Filter::Apply(const ExtAddress &aExtAddress, int8_t &aRss){    otError error = OT_ERROR_NONE;    otMacFilterEntry *entry = FindEntry(aExtAddress);    // assign the default RssIn setting for all receiving messages first.    aRss = mRssIn;    // check AddressFilter.    if (mAddressMode == OT_MAC_FILTER_ADDRESS_MODE_WHITELIST)    {        VerifyOrExit(entry != NULL && entry->mFiltered, error = OT_ERROR_ADDRESS_FILTERED);    }    else if (mAddressMode == OT_MAC_FILTER_ADDRESS_MODE_BLACKLIST)    {        VerifyOrExit(entry == NULL || !entry->mFiltered, error = OT_ERROR_ADDRESS_FILTERED);    }    // not override the default RssIn setting if no specific RssIn on the Extended Address.    if (entry != NULL && entry->mRssIn != OT_MAC_FILTER_FIXED_RSS_DISABLED)    {        aRss = entry->mRssIn;    }exit:    return error;}
开发者ID:xiaom-GitHub,项目名称:openthread,代码行数:28,


示例7: ExitNow

otError Filter::AddRssIn(const ExtAddress *aExtAddress, int8_t aRss){    otError error = OT_ERROR_NONE;    // set the default RssIn for all received messages.    if (aExtAddress == NULL)    {        mRssIn = aRss;        ExitNow();    }    else    {        Entry *entry = FindEntry(*aExtAddress);        if (entry == NULL)        {            VerifyOrExit((entry = FindAvailEntry()) != NULL, error = OT_ERROR_NO_BUFS);            entry->mExtAddress = static_cast<const otExtAddress &>(*aExtAddress);        }        entry->mRssIn = aRss;    }exit:    return error;}
开发者ID:xiaom-GitHub,项目名称:openthread,代码行数:26,


示例8: unzip_file

static void* unzip_file(ZipArchiveHandle zip, const char* entry_name, unsigned* sz){    ZipEntryName zip_entry_name(entry_name);    ZipEntry zip_entry;    if (FindEntry(zip, zip_entry_name, &zip_entry) != 0) {        fprintf(stderr, "archive does not contain '%s'/n", entry_name);        return 0;    }    *sz = zip_entry.uncompressed_length;    uint8_t* data = reinterpret_cast<uint8_t*>(malloc(zip_entry.uncompressed_length));    if (data == NULL) {        fprintf(stderr, "failed to allocate %u bytes for '%s'/n", *sz, entry_name);        return 0;    }    int error = ExtractToMemory(zip, &zip_entry, data, zip_entry.uncompressed_length);    if (error != 0) {        fprintf(stderr, "failed to extract '%s': %s/n", entry_name, ErrorCodeString(error));        free(data);        return 0;    }    return data;}
开发者ID:Bliss-Elite,项目名称:platform_system_core,代码行数:26,


示例9: FPUGetPiece

static mad_status       FPUGetPiece( unsigned piece,                                const char **descript_p,                                size_t *max_descript_p,                                const mad_reg_info **reg,                                mad_type_handle *disp_type,                                size_t *max_value ){    unsigned    idx;    if( !FindEntry( FPUList, piece, &idx, disp_type ) ) return( MS_FAIL );    if( MADState->reg_state[FPU_REG_SET] & FT_HEX ) {        switch( *disp_type ) {        case AXPT_DOUBLE:            *disp_type = AXPT_HDOUBLE;            break;        }    }    if( MADState->reg_state[FPU_REG_SET] & FT_G_FLOAT ) {        switch( *disp_type ) {        case AXPT_DOUBLE:            *disp_type = AXPT_RG_FLOAT;            break;        }    }    *reg = &RegList[idx].info;    *descript_p = (*reg)->name;    *max_descript_p = 0;    *max_value = 0;    return( MS_OK );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:30,


示例10: unzip_to_file

static int unzip_to_file(ZipArchiveHandle zip, char* entry_name) {    FILE* fp = tmpfile();    if (fp == NULL) {        fprintf(stderr, "failed to create temporary file for '%s': %s/n",                entry_name, strerror(errno));        return -1;    }    ZipEntryName zip_entry_name(entry_name);    ZipEntry zip_entry;    if (FindEntry(zip, zip_entry_name, &zip_entry) != 0) {        fprintf(stderr, "archive does not contain '%s'/n", entry_name);        return -1;    }    int fd = fileno(fp);    int error = ExtractEntryToFile(zip, &zip_entry, fd);    if (error != 0) {        fprintf(stderr, "failed to extract '%s': %s/n", entry_name, ErrorCodeString(error));        return -1;    }    lseek(fd, 0, SEEK_SET);    return fd;}
开发者ID:ppma,项目名称:fastboot,代码行数:25,


示例11: _

bool wxExVCS::GetDir(wxWindow* parent){  if (!Use())  {    return false;  }    const wxString message = _("Select VCS Folder");    std::vector<wxExConfigItem> v;  // See also vcsentry, same item is used there.  v.push_back(wxExConfigItem(    _("Base folder"),     CONFIG_COMBOBOXDIR,     wxEmptyString,     true,    1005));        if (wxExConfigFirstOf(_("Base folder")).empty())   {    if (      parent != NULL &&       wxExConfigDialog(parent, v, message).ShowModal() == wxID_CANCEL)    {      return false;    }  }  else  {    m_Entry = FindEntry(wxExConfigFirstOf(_("Base folder")));      if (m_Entry.GetName().empty())    {      if (        parent != NULL &&        wxExConfigDialog(parent, v, message).ShowModal() == wxID_CANCEL)      {        return false;      }    }  }    m_Entry = FindEntry(wxExConfigFirstOf(_("Base folder")));    return !m_Entry.GetName().empty();}
开发者ID:hfvw,项目名称:wxExtension,代码行数:47,


示例12: aout_info

// Печать заголовков файла, заданного именемvoid aout_info(char *Name){   char name83[11];   Exec exec;   Make83Name(Name, name83);   DirEntry Entry;   if (FindEntry(0, name83, &Entry) == (uint)-1)   {      printf("Cannot open file '%s'!/n", Name);      return;   }   LoadPart(&Entry, &exec, 0, sizeof(Exec));   printf("midmag/t= 0x%x/n",   exec.a_midmag);   printf("text/t= %d/n",     exec.a_text);   printf("data/t= %d/n",     exec.a_data);   printf("bss/t= %d/n",      exec.a_bss);   printf("syms/t= %d/n",     exec.a_syms);   printf("entry/t= 0x%x/n",    exec.a_entry);   printf("trsize/t= %d/n",   exec.a_trsize);   printf("drsize/t= %d/n",   exec.a_drsize);   printf("/nflags/t= 0x%x/n", N_FLAG(exec));   printf("machine/t= ");   switch (N_MID(exec))   {      case M_OLDSUN2:   printf("OldSun2"); break;      case M_68010:     printf("m68010"); break;      case M_68020:     printf("m68020"); break;      case M_SPARC:     printf("sparc"); break;      case M_386:       printf("386"); break;      case M_MIPS1:     printf("mips1"); break;      case M_MIPS2:     printf("mips2"); break;      default:          printf("unknown?"); return;   }   printf("/n");   if (N_MID(exec) != M_386)   {      printf("Only 386's binaries are supported/n");      return;   }   printf("magic/t= ");   switch (N_MAGIC(exec))   {      case OMAGIC:   printf("omagic"); break;      case NMAGIC:   printf("nmagic"); break;      case ZMAGIC:   printf("zmagic"); break;      case QMAGIC:   printf("qmagic"); break;      case CMAGIC:   printf("cmagic"); break;      default:       printf("bad magic"); return;   }//   Relocation_Info rels[100];// FIXME: добавить вывод relocation records}
开发者ID:BackupTheBerlios,项目名称:helloos-svn,代码行数:60,


示例13: MakeDir

int DeviceDir::MakeDir(const char name[], size_t length){	if (FindEntry(name, length))		return E_ENTRY_EXISTS;	fEntryList.AddToTail(new DeviceDir(GetFileSystem(), name, length, this));	return E_NO_ERROR;}
开发者ID:FFalcon,项目名称:jbushOS,代码行数:8,


示例14: FindEntry

int IniFile::GetEntryCompatibleValueI(LPCTSTR lpcszKey, LPCTSTR lpcszEntry1, LPCTSTR lpcszEntry2, int nDefault){	size_t nEntry = FindEntry(lpcszKey, lpcszEntry1);	if (nEntry != InvalidIndex)		return GetValueI(lpcszKey, lpcszEntry1, nDefault);	return GetValueI(lpcszKey, lpcszEntry2, nDefault);}
开发者ID:3rdexp,项目名称:fxfile,代码行数:8,


示例15:

bool C4GroupSet::LoadEntryString(const char *szEntryName, StdStrBuf * rBuf){	// Load the entry from the first group that has it	C4Group *pGroup;	if ((pGroup = FindEntry(szEntryName)))		return pGroup->LoadEntryString(szEntryName, rBuf);	// Didn't find it	return false;}
开发者ID:Fulgen301,项目名称:openclonk,代码行数:9,


示例16: AddL

// ----------------------------------------------------------------------------// CSIPCRRoutingEntry::AddL// ----------------------------------------------------------------------------//void CSIPCRRoutingEntry::AddL( const CSIPCRRoutingEntry* aEntry )    {        	if (FindEntry(aEntry->UID())) 	    {	    	    User::Leave (KErrAlreadyExists);    	    }	    	        	       User::LeaveIfError(iServedClients.Append(aEntry));    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:13,


示例17: DiscardShare

void DSession::DiscardShare(DSessionShare& aShare){  if(iAttributes&EShared)  {    DSessionShare** share=FindEntry(*aShare.iClient);    Mem::Move(share,share+1,(TUint8*)(iShares+--iClients)-(TUint8*)share);  }  else iPrimary=NULL;}
开发者ID:flaithbheartaigh,项目名称:almalert,代码行数:9,


示例18: update

void DatabaseListModel::update(const QString& s){    if(DatabaseListEntry* e = FindEntry(s))    {        QModelIndex m = createIndex(m_databases.indexOf(*e), DBLV_NAME, (void*) 0);        QModelIndex n = createIndex(m_databases.indexOf(*e), DBLV_UTF8, (void*) 0);        emit QAbstractItemModel::dataChanged(m, n);    }}
开发者ID:Kojirion,项目名称:ChessX,代码行数:9,


示例19: DJConfigureHostsEntry

//Does the platform-specific equivalent of this in nsswitch.conf:// hosts: files dnsDWORDDJConfigureHostsEntry(const char *testPrefix){    DWORD ceError = ERROR_SUCCESS;    NsswitchConf conf;    DistroInfo distro;    int line;    const char *hostsByFile;    const char *hostsByDns;    int moduleIndex;    if(testPrefix == NULL)        testPrefix = "";    memset(&distro, 0, sizeof(distro));    memset(&conf, 0, sizeof(conf));    GCE(ceError = DJGetDistroInfo(testPrefix, &distro));    ceError = ReadNsswitchConf(&conf, testPrefix, TRUE);    GCE(ceError);    hostsByFile = GetNameOfHostsByFile(&conf, &distro);    hostsByDns = GetNameOfHostsByDns(&conf, &distro);    line = FindEntry(&conf, 0, "hosts");    if(line == -1)    {        DJ_LOG_INFO("Adding hosts line");        GCE(ceError = AddEntry(&conf, &distro, &line, "hosts"));        GCE(ceError = InsertModule(&conf, &distro, line, 0, hostsByDns));        GCE(ceError = InsertModule(&conf, &distro, line, 0, hostsByFile));    }    moduleIndex = FindModuleOnLine(&conf, line, hostsByFile);    if(moduleIndex > 0)    {        /* The local module exists on the line, but it is not the first         * entry. */        GCE(ceError = RemoveModule(&conf, line, moduleIndex));    }    if(moduleIndex != 0)    {        GCE(ceError = InsertModule(&conf, &distro, line, 0, hostsByFile));    }    if(conf.modified)        WriteNsswitchConfiguration(testPrefix, &conf);    else        DJ_LOG_INFO("nsswitch not modified");cleanup:    FreeNsswitchConfContents(&conf);    DJFreeDistroInfo(&distro);    return ceError;}
开发者ID:FarazShaikh,项目名称:likewise-open,代码行数:58,


示例20: FindEntry

LIB_COMPONENT* CMP_LIBRARY::FindComponent( const wxChar* aName ){    LIB_COMPONENT* component = NULL;    LIB_ALIAS* entry = FindEntry( aName );    if( entry != NULL )        component = entry->GetComponent();    return component;}
开发者ID:peabody124,项目名称:kicad,代码行数:10,


示例21: wxASSERT

// create a new entry and add it to the current groupConfigEntry *ConfigGroup::AddEntry(const wxString& strName, int nLine){  wxASSERT( FindEntry(strName) == NULL );  ConfigEntry *pEntry = new ConfigEntry(this, strName, nLine);  m_aEntries.Add(pEntry);  return pEntry;}
开发者ID:TimofonicJunkRoom,项目名称:plucker,代码行数:11,


示例22: Del

	bool Del(bool bNegated, const CString& sChan, const CString& sHost) {		VAttachIter it = FindEntry(sChan, sHost);		if (it == m_vMatches.end() || it->IsNegated() != bNegated)			return false;		DelNV(it->ToString());		m_vMatches.erase(it);		return true;	}
开发者ID:IshaqAzmi,项目名称:GKZNC,代码行数:10,


示例23: FindEntry

int DeviceDir::Lookup(const char name[], size_t nameLen, VNode **outNode){	DeviceEntry *entry = FindEntry(name, nameLen);	if (entry) {		entry->AcquireRef();		*outNode = entry;		return E_NO_ERROR;	}	return E_NO_SUCH_FILE;}
开发者ID:FFalcon,项目名称:jbushOS,代码行数:11,


示例24: FindEntry

BOOL CamCache::FindPath( UINT32 Handle, INT32* &Points, BYTE* &Types, UINT32 &Length ){	INT32 *Object = (INT32*) FindEntry( Handle ) ;	if ( Object )	{		Length = *Object ;		Points = ++Object ;		Types = (BYTE*) (Object+2*Length) ;	}	return Object!=NULL ;}
开发者ID:vata,项目名称:xarino,代码行数:11,



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


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