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

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

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

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

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

示例1: LOG

// Called before render is availablebool j1FileSystem::Awake(pugi::xml_node& config){	LOG("Loading File System");	bool ret = true;	// Add all paths in configuration in order	for(pugi::xml_node path = config.child("path"); path; path = path.next_sibling("path"))	{		AddPath(path.child_value());	}	// Ask SDL for a write dir	char* write_path = SDL_GetPrefPath(App->GetOrganization(), App->GetTitle());	if(PHYSFS_setWriteDir(write_path) == 0)		LOG("File System error while creating write dir: %s/n", PHYSFS_getLastError());	else	{		// We add the writing directory as a reading directory too with speacial mount point		LOG("Writing directory is %s/n", write_path);		AddPath(write_path, GetSaveDirectory());	}	SDL_free(write_path);	return ret;}
开发者ID:kellazo,项目名称:GameDevelopment,代码行数:28,


示例2: FindIncludeFile

CString FindIncludeFile( const TCHAR *pszIncludeFilename, const TCHAR *pszIncludePath ){	CString strEnvInclude;	CStringList strrgPathList;		if( FileExists( pszIncludeFilename ) )		return CString(pszIncludeFilename);		// add current directory to path list;	strrgPathList.AddTail( ".//" );		// add path specified in the command line (/I option)	if( pszIncludePath )		AddPath( strrgPathList, pszIncludePath );		// add path specified in the INCLUDE variable	if( strEnvInclude.GetEnvironmentVariable( _T("INCLUDE") ) )		AddPath( strrgPathList, strEnvInclude );		POSITION pos = strrgPathList.GetHeadPosition();	for (int i=0;i < strrgPathList.GetCount();i++)	{		CString strPath = strrgPathList.GetNext(pos);		CString tmp = strPath.Right(1);		if( tmp != ":" && tmp != "//" )			strPath += '//';				strPath += pszIncludeFilename;				if( FileExists( strPath ) )			return CString(strPath);	}	return CString("");}
开发者ID:dbremner,项目名称:VC2010Samples,代码行数:35,


示例3: j1Module

j1FileSystem::j1FileSystem(const char* game_path) : j1Module(){	name.create("file_system");	// need to be created before Awake so other modules can use it	char* base_path = SDL_GetBasePath();	PHYSFS_init(base_path);	SDL_free(base_path);	AddPath(".");	AddPath(game_path);}
开发者ID:Pau5erra,项目名称:XML,代码行数:12,


示例4: it

void QtStylePreferencePage::Update(){  styleManager->RemoveStyles();  QString paths = m_StylePref->Get(berry::QtPreferences::QT_STYLE_SEARCHPATHS, "");  QStringList pathList = paths.split(";", QString::SkipEmptyParts);  QStringListIterator it(pathList);  while (it.hasNext())  {    AddPath(it.next(), false);  }  QString styleName = m_StylePref->Get(berry::QtPreferences::QT_STYLE_NAME, "");  styleManager->SetStyle(styleName);  oldStyle = styleManager->GetStyle();  FillStyleCombo(oldStyle);  QString fontName = m_StylePref->Get(berry::QtPreferences::QT_FONT_NAME, "Open Sans");  styleManager->SetFont(fontName);  int fontSize = m_StylePref->Get(berry::QtPreferences::QT_FONT_SIZE, "9").toInt();  styleManager->SetFontSize(fontSize);  controls.m_FontSizeSpinBox->setValue(fontSize);  styleManager->UpdateWorkbenchFont();  FillFontCombo(styleManager->GetFont());  controls.m_ToolbarCategoryCheckBox->setChecked(    m_StylePref->GetBool(berry::QtPreferences::QT_SHOW_TOOLBAR_CATEGORY_NAMES, true));}
开发者ID:Cdebus,项目名称:MITK,代码行数:30,


示例5: switch

void CRegisterDlg::OnReceiveComplete(void){	switch (m_ContextObject->InDeCompressedBuffer.GetBuffer(0)[0])	{	case TOKEN_REG_PATH:		{			AddPath((char*)(m_ContextObject->InDeCompressedBuffer.GetBuffer(1)));			break;		}	case TOKEN_REG_KEY:		{			AddKey((char*)(m_ContextObject->InDeCompressedBuffer.GetBuffer(1)));			break;		}	default:		// 传输发生异常数据		break;	}}
开发者ID:zibility,项目名称:Remote,代码行数:26,


示例6: DVASSERT

FilePath::FilePath(const FilePath &directory, const String &filename){	DVASSERT(directory.IsDirectoryPathname());    pathType = directory.pathType;	absolutePathname = AddPath(directory, filename);}
开发者ID:droidenko,项目名称:dava.framework,代码行数:7,


示例7: Clear

bool CTSVNPathList::LoadFromFile(const CTSVNPath& filename){    Clear();    try    {        CString strLine;        CStdioFile file(filename.GetWinPath(), CFile::typeBinary | CFile::modeRead | CFile::shareDenyWrite);        // for every selected file/folder        CTSVNPath path;        while (file.ReadString(strLine))        {            path.SetFromUnknown(strLine);            AddPath(path);        }        file.Close();    }    catch (CFileException* pE)    {        std::unique_ptr<TCHAR[]> error(new TCHAR[10000]);        pE->GetErrorMessage(error.get(), 10000);        ::MessageBox(NULL, error.get(), L"TortoiseSVN", MB_ICONERROR);        pE->Delete();        return false;    }    return true;}
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:27,


示例8: Clear

bool CTGitPathList::LoadFromFile(const CTGitPath& filename){	Clear();	try	{		CString strLine;		CStdioFile file(filename.GetWinPath(), CFile::typeBinary | CFile::modeRead | CFile::shareDenyWrite);		// for every selected file/folder		CTGitPath path;		while (file.ReadString(strLine))		{			path.SetFromUnknown(strLine);			AddPath(path);		}		file.Close();	}	catch (CFileException* pE)	{		CTraceToOutputDebugString::Instance()(__FUNCTION__ ": CFileException loading target file list/n");		TCHAR error[10000] = {0};		pE->GetErrorMessage(error, 10000);//		CMessageBox::Show(NULL, error, _T("TortoiseGit"), MB_ICONERROR);		pE->Delete();		return false;	}	return true;}
开发者ID:KristinaTaylor,项目名称:TortoiseSI,代码行数:28,


示例9: _T

int CTGitPathList::FillUnRev(unsigned int action, CTGitPathList *list, CString *err){	this->Clear();	CTGitPath path;	int count;	if(list==NULL)		count=1;	else		count=list->GetCount();	for (int i = 0; i < count; ++i)	{		CString cmd;		int pos = 0;		CString ignored;		if(action & CTGitPath::LOGACTIONS_IGNORE)			ignored= _T(" -i");		if(list==NULL)		{			cmd=_T("git.exe ls-files --exclude-standard --full-name --others -z");			cmd+=ignored;		}		else		{	cmd.Format(_T("git.exe ls-files --exclude-standard --full-name --others -z%s -- /"%s/""),					(LPCTSTR)ignored,					(*list)[i].GetWinPath());		}		BYTE_VECTOR out, errb;		out.clear();		if (g_Git.Run(cmd, &out, &errb))		{			if (err != nullptr)				CGit::StringAppend(err, &errb[0], CP_UTF8, (int)errb.size());			return -1;		}		pos=0;		CString one;		while (pos >= 0 && pos < (int)out.size())		{			one.Empty();			CGit::StringAppend(&one, &out[pos], CP_UTF8);			if(!one.IsEmpty())			{				//SetFromGit will clear all status				path.SetFromGit(one);				path.m_Action=action;				AddPath(path);			}			pos=out.findNextString(pos);		}	}	return 0;}
开发者ID:iamduyu,项目名称:TortoiseGit,代码行数:59,


示例10: AddPath

FX_BOOL CFX_LinuxFontInfo::ParseFontCfg(const char** pUserPaths) {  if (!pUserPaths) {    return FALSE;  }  for (const char** pPath = pUserPaths; *pPath; ++pPath) {    AddPath(*pPath);  }  return TRUE;}
开发者ID:JinAirsOs,项目名称:pdfium,代码行数:9,


示例11: directoryPath

FilePath::FilePath(const String &directory, const String &filename){	FilePath directoryPath(directory);	DVASSERT(!directoryPath.IsEmpty());	directoryPath.MakeDirectoryPathname();    pathType = directoryPath.pathType;	absolutePathname = AddPath(directoryPath, filename);}
开发者ID:droidenko,项目名称:dava.framework,代码行数:9,


示例12: AddPath

bool Clipper::addPolyline(const ofPolyline& polyline,                          ClipperLib::PolyType PolyTyp,                          bool autoClose,                          ClipperLib::cInt scale){    auto _polyline = polyline;    if (autoClose) close(_polyline);    return AddPath(toClipper(_polyline, scale), PolyTyp, _polyline.isClosed());}
开发者ID:bakercp,项目名称:ofxClipper,代码行数:9,


示例13: STATUS_LOG

voidSCSIPressurePathManager::ActivatePath ( IOSCSIProtocolServices * interface ){		bool					result 	= false;	SCSITargetDevicePath *	path	= NULL;		STATUS_LOG ( ( "SCSIPressurePathManager::ActivatePath/n" ) );		require_nonzero ( interface, ErrorExit );		IOLockLock ( fLock );		result = fInactivePathSet->member ( interface );	if ( result == true )	{				path = fInactivePathSet->getObjectWithInterface ( interface );		if ( path != NULL )		{						path->retain ( );			path->Activate ( );			fInactivePathSet->removeObject ( interface );			fPathSet->setObject ( path );			path->release ( );			path = NULL;					}			}		else	{				result = fPathSet->member ( interface );		if ( result == false )		{						IOLockUnlock ( fLock );			AddPath ( interface );			goto Exit;					}			}		IOLockUnlock ( fLock );		ErrorExit:Exit:			return;	}
开发者ID:unofficial-opensource-apple,项目名称:IOSCSIArchitectureModelFamily,代码行数:57,


示例14: PyInit

void PyInit(const TStr& PySettings){	Try	ifstream f(PySettings.CStr());	if (f.is_open())	{		std::string s;		std::getline(f, s);		Py_Initialize(); // инициализация интерпретатора  */		AddPath(s);		AddPath(s+"////networkx////generators");		AddPath(s+"////networkx////readwrite");		AddPath(s+"////networkx////classes");	}	return;			IAssert(1);	Catch	}
开发者ID:kbochenina,项目名称:Snap,代码行数:19,


示例15: GetEnv

//reads envvar, splits it by : and ; and add it to pathlist, when existsstatic void GetEnv(const std::string& name, LSL::StringVector& pathlist){	const char* envvar = getenv(name.c_str());	if (envvar == NULL)		return;	LSL::StringVector res = LSL::Util::StringTokenize(envvar, ";:");	for (const std::string path : res) {		AddPath(path, pathlist);	}}
开发者ID:cleanrock,项目名称:pr-downloader,代码行数:11,


示例16: PHYSFS_getLastModTime

		void ZipArchiveImpl::AddFolder(const bfs::path& path, const bfs::path& archive_path)		{			++m_Info.folderCount;			zip_fileinfo fileinfo;			fileinfo.internal_fa = 0;#ifdef _WIN32			fileinfo.external_fa = ::GetFileAttributesW(path.native().c_str());#else			{				struct stat path_stat;				if (::stat(path.native().c_str(), &path_stat) == 0)				{					fileinfo.external_fa = path_stat.st_mode;				}			}#endif			fileinfo.dosDate = 0;			// Read the time from the filesystem and convert it			auto fsTime = bfs::last_write_time(path);			auto posixTime = boost::posix_time::from_time_t(fsTime);			auto tm = boost::posix_time::to_tm(posixTime);			/* TODO: this is how to get the time for a physfs file			boost::posix_time::ptime posixTime;			auto milisPastEpoc = PHYSFS_getLastModTime(path.generic_string().c_str());			if (milisPastEpoc >= 0)			time = boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1), boost::posix_time::milliseconds(milisPastEpoc));			else			time = boost::posix_time::second_clock::local_time();			*/			fileinfo.tmz_date.tm_hour = tm.tm_hour;			fileinfo.tmz_date.tm_min = tm.tm_min;			fileinfo.tmz_date.tm_sec = tm.tm_sec;			fileinfo.tmz_date.tm_year = tm.tm_year;			fileinfo.tmz_date.tm_mon = tm.tm_mon;			fileinfo.tmz_date.tm_mday = tm.tm_mday;			auto r = zipOpenNewFileInZip(m_File, (archive_path.generic_string() + "/").c_str(),				&fileinfo,				nullptr, 0,				nullptr, 0,				nullptr,				Z_DEFLATED,				Z_BEST_SPEED);			zipCloseFileInZip(m_File);			for (bfs::directory_iterator it(path), end = bfs::directory_iterator(); it != end; ++it)			{				AddPath(it->path(), archive_path / it->path().filename());			}		}
开发者ID:Kezeali,项目名称:Fusion,代码行数:54,


示例17: AddPath

FilePath& FilePath::operator+=(const String & path){    absolutePathname = AddPath(*this, path);	if (pathType == PATH_EMPTY)	{		pathType = GetPathType(absolutePathname);	}    return (*this);}
开发者ID:droidenko,项目名称:dava.framework,代码行数:11,


示例18: pathname

FilePath FilePath::operator+(const String &path) const{    FilePath pathname(AddPath(*this, path));    pathname.pathType = this->pathType;	if (this->pathType == PATH_EMPTY)	{		pathname.pathType = GetPathType(pathname.absolutePathname);	}    return pathname;}
开发者ID:droidenko,项目名称:dava.framework,代码行数:12,


示例19: ForgetPath

  //  // RequestPath  //  // Request a new path be found.  Returns FALSE if request is invalid.  //  Finder::RequestResult Finder::RequestPath  (    U32 sx, U32 sz, U32 dx, U32 dz, U8 traction, UnitObj *unit,    SearchType type, U32 flags, PointList *blockList  )  {    // Forget any current path    ForgetPath();    // Is destination on the map    if (!WorldCtrl::CellOnMap(sx, sz) || !WorldCtrl::CellOnMap(dx, dz))    {      LOG_DIAG(("Request position is not on the map (%u, %u)->(%u,%u)", sx, sz, dx, dz));      return (RR_OFFMAP);    }    // Filter out requests to move to the same cell    if (sx == dx && sz == dz)    {      return (RR_SAMECELL);    }    // Can this traction type move to this cell    if (!CanMoveToCell(traction, dx, dz))    {      U32 xNew, zNew;      // Find the closest location we can move to      if (FindClosestCell(traction, dx, dz, xNew, zNew, 15))      {        // Use the new location        dx = xNew;        dz = zNew;      }      else      // AStar will fail, so jump straight to trace      if (type == ST_ASTAR)      {        type = ST_TRACE;      }    }    // Create a new path    path = new Path(sx, sz, dx, dz, traction, unit, type, flags, blockList);    // Add to the system    AddPath(path);    // Success    return (RR_SUBMITTED);  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:57,


示例20: EnumerateFiles

BOOL CAddListDlg::EnumerateFiles(){	m_AddFileCount=0;	BOOL success=TRUE;	// Recurse any directories in files list, placing enumerated files into 	// the 'files' list	POSITION pos=m_pStrList->GetHeadPosition();	for( int i=0; pos != NULL && success; i++)		success=AddPath(&m_EnumeratedList, m_pStrList->GetNext(pos));	return success;}
开发者ID:danieljennings,项目名称:p4win,代码行数:13,


示例21: planet

void C4Reloc::Init(){	Paths.clear();	// The system folder (i.e. installation path) has higher priority than the user path	// Although this is counter-intuitive (the user may want to overload system files in the user path),	// people had trouble when they downloaded e.g. an Objects.ocd file in a network lobby and that copy permanently	// ruined their OpenClonk installation with no obvious way to fix it.	// Not even reinstalling would fix the problem because reinstallation does not overwrite user data.	// We currently don't have any valid case where overloading system files would make sense so just give higher priority to the system path for now.#ifndef __APPLE__	// Add planet subfolder with highest priority because it's used when starting directly from the repository with binaries in the root folder	StdCopyStrBuf planet(Config.General.ExePath);	planet.AppendBackslash();	planet.Append("planet");	AddPath(planet.getData());#endif	// Add main system path	AddPath(Config.General.SystemDataPath);	// Add user path for additional data (player files, user scenarios, etc.)	AddPath(Config.General.UserDataPath, PATH_PreferredInstallationLocation);}
开发者ID:TheBlackJokerDevil,项目名称:openclonk,代码行数:22,


示例22: j1Module

j1FileSystem::j1FileSystem() : j1Module(){	name.create("file_system");	// need to be created before Awake so other modules can use it	char* base_path = SDL_GetBasePath();	PHYSFS_init(base_path);	SDL_free(base_path);	// By default we include executable's own directory	// without this we won't be able to find config.xml :-(	AddPath(".");}
开发者ID:kellazo,项目名称:GameDevelopment,代码行数:13,


示例23: AddPath

void CTGitPathList::LoadFromAsteriskSeparatedString(const CString& sPathString){	int pos = 0;	CString temp;	for(;;)	{		temp = sPathString.Tokenize(_T("*"),pos);		if(temp.IsEmpty())		{			break;		}		AddPath(CTGitPath(CPathUtils::GetLongPathname(temp)));	}}
开发者ID:KristinaTaylor,项目名称:TortoiseSI,代码行数:14,


示例24: GetRenderer

void wxGraphicsPathData::AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h){    wxDouble rw = w/2;    wxDouble rh = h/2;    wxDouble xc = x + rw;    wxDouble yc = y + rh;    wxGraphicsMatrix m = GetRenderer()->CreateMatrix();    m.Translate(xc,yc);    m.Scale(rw/rh,1.0);    wxGraphicsPath p = GetRenderer()->CreatePath();    p.AddCircle(0,0,rh);    p.Transform(m);    AddPath(p.GetPathData());}
开发者ID:252525fb,项目名称:rpcs3,代码行数:14,


示例25: CalcResX

void cTerrainGen3D::BuildPath(const tVector& origin, const tVector& ground_size, const Eigen::VectorXd& params, cRand& rand, 								std::vector<float>& out_data, std::vector<int>& out_flags){	double w = params[eParamsPathWidth0];	double len = params[eParamsPathLength];	double turn_len = params[eParamsPathTurnLength];	double h0 = params[eParamsPathHeight0];	double h1 = params[eParamsPathHeight1];	Eigen::Vector2i start_coord = Eigen::Vector2i::Zero();	Eigen::Vector2i out_res = Eigen::Vector2i::Zero();	out_res[0] = CalcResX(ground_size[0]);	out_res[1] = CalcResZ(ground_size[1]);	return AddPath(origin, start_coord, ground_size, out_res, w, len, turn_len, h0, h1, out_data, out_flags);}
开发者ID:saadmahboob,项目名称:DeepLoco,代码行数:15,


示例26: find_directory

voidGLRendererRoster::AddDefaultPaths(){	// add user directories first, so that they can override system renderers	const directory_which paths[] = {		B_USER_ADDONS_DIRECTORY,		B_COMMON_ADDONS_DIRECTORY,		B_BEOS_ADDONS_DIRECTORY,	};	for (uint32 i = fSafeMode ? 2 : 0; i < sizeof(paths) / sizeof(paths[0]); i++) {		BPath path;		status_t status = find_directory(paths[i], &path, true);		if (status == B_OK && path.Append("opengl") == B_OK)			AddPath(path.Path());	}}
开发者ID:aljen,项目名称:haiku-opengl,代码行数:17,


示例27: Prefs_Pane

Prefs_Fonts::Prefs_Fonts(QWidget* parent, ScribusDoc* doc)	: Prefs_Pane(parent),	m_doc(doc){	setupUi(this);	RList = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub;	UsedFonts.clear();	CurrentPath = "";	m_askBeforeSubstitute = true;	setMinimumSize(fontMetrics().width( tr( "Available Fonts" )+ tr( "Font Substitutions" )+ tr( "Additional Paths" ))+180, 200);	fontListTableView->setModel(new FontListModel(fontListTableView, m_doc));	fontSubstitutionsTableWidget->setRowCount(RList.count());	fontSubstitutionsTableWidget->setColumnCount(2);	fontSubstitutionsTableWidget->setHorizontalHeaderItem(0, new QTableWidgetItem( tr("Font Name")));	fontSubstitutionsTableWidget->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Replacement")));	fontSubstitutionsTableWidget->setSortingEnabled(false);	fontSubstitutionsTableWidget->setSelectionBehavior( QAbstractItemView::SelectRows );	QHeaderView *header = fontSubstitutionsTableWidget->horizontalHeader();	header->setSectionsMovable(false);	header->setSectionsClickable(false);	header->setSectionResizeMode(QHeaderView::Stretch);	fontSubstitutionsTableWidget->verticalHeader()->hide();	fontSubstitutionsTableWidget->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));	// If we're being called for global application preferences, not document	// preferences, we let the user customize font search paths. Because things	// go rather badly if paths are changed/removed while a doc is open, the	// control is also not displayed if there is a document open.	if (m_doc==0 && !ScCore->primaryMainWindow()->HaveDoc)	{		whyBlankLabel->resize(0,0);		whyBlankLabel->hide();		readPaths();		changeButton->setEnabled(false);		removeButton->setEnabled(false);		connect(pathListWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SelectPath(QListWidgetItem*)));		connect(addButton, SIGNAL(clicked()), this, SLOT(AddPath()));		connect(changeButton, SIGNAL(clicked()), this, SLOT(ChangePath()));		connect(removeButton, SIGNAL(clicked()), this, SLOT(DelPath()));	}
开发者ID:Sheikha443,项目名称:scribus,代码行数:45,


示例28: LoadPaths

	void LoadPaths(const char *pArgv0)	{		// check current directory		IOHANDLE File = io_open("storage.cfg", IOFLAG_READ);		if(!File)		{			// check usable path in argv[0]			unsigned int Pos = ~0U;			for(unsigned i = 0; pArgv0[i]; i++)				if(pArgv0[i] == '/' || pArgv0[i] == '//')					Pos = i;			if(Pos < MAX_PATH_LENGTH)			{				char aBuffer[MAX_PATH_LENGTH];				str_copy(aBuffer, pArgv0, Pos+1);				str_append(aBuffer, "/storage.cfg", sizeof(aBuffer));				File = io_open(aBuffer, IOFLAG_READ);			}			if(Pos >= MAX_PATH_LENGTH || !File)			{				dbg_msg("storage", "couldn't open storage.cfg");				return;			}		}		char *pLine;		CLineReader LineReader;		LineReader.Init(File);		while((pLine = LineReader.Get()))		{			const char *pLineWithoutPrefix = str_startswith(pLine, "add_path ");			if(pLineWithoutPrefix)			{				AddPath(pLineWithoutPrefix);			}		}		io_close(File);		if(!m_NumPaths)			dbg_msg("storage", "no paths found in storage.cfg");	}
开发者ID:BannZay,项目名称:ddnet,代码行数:44,


示例29: Clear

int CTGitPathList::FillBasedOnIndexFlags(unsigned short flag, CTGitPathList* list /*nullptr*/){	Clear();	CTGitPath path;	CAutoRepository repository(g_Git.GetGitRepository());	if (!repository)		return -1;	CAutoIndex index;	if (git_repository_index(index.GetPointer(), repository))		return -1;	int count;	if (list == nullptr)		count = 1;	else		count = list->GetCount();	for (int j = 0; j < count; ++j)	{		for (size_t i = 0, ecount = git_index_entrycount(index); i < ecount; ++i)		{			const git_index_entry *e = git_index_get_byindex(index, i);			if (!e || !((e->flags | e->flags_extended) & flag) || !e->path)				continue;			CString one = CUnicodeUtils::GetUnicode(e->path);			if (!(!list || (*list)[j].GetWinPathString().IsEmpty() || one == (*list)[j].GetGitPathString() || (PathIsDirectory(g_Git.CombinePath((*list)[j].GetWinPathString())) && one.Find((*list)[j].GetGitPathString() + _T("/")) == 0)))				continue;			//SetFromGit will clear all status			path.SetFromGit(one);			if ((e->flags | e->flags_extended) & GIT_IDXENTRY_SKIP_WORKTREE)				path.m_Action = CTGitPath::LOGACTIONS_SKIPWORKTREE;			else if ((e->flags | e->flags_extended) & GIT_IDXENTRY_VALID)				path.m_Action = CTGitPath::LOGACTIONS_ASSUMEVALID;			AddPath(path);		}	}	RemoveDuplicates();	return 0;}
开发者ID:iamduyu,项目名称:TortoiseGit,代码行数:44,



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


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