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

C++ pathName函数代码示例

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

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



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

示例1: path

std::string JSCEnum::enumName() const {
  std::string result;

  const auto lPath = path();
  if (lPath.size() > 2) {
    return lPath[1] + "_" + pathName();
  }

  return pathName();
}
开发者ID:ivlevAstef,项目名称:CodeGeneratorByJSONSchema,代码行数:10,代码来源:JSCEnum.cpp


示例2: SkFontStyleSet_Android

    explicit SkFontStyleSet_Android(const FontFamily& family,
                                    const SkTypeface_FreeType::Scanner& scanner)
    {
        const SkString* cannonicalFamilyName = NULL;
        if (family.fNames.count() > 0) {
            cannonicalFamilyName = &family.fNames[0];
        }
        // TODO? make this lazy
        for (int i = 0; i < family.fFonts.count(); ++i) {
            const FontFileInfo& fontFile = family.fFonts[i];

            SkString pathName(family.fBasePath);
            pathName.append(fontFile.fFileName);

            SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(pathName.c_str()));
            if (!stream.get()) {
                SkDEBUGF(("Requested font file %s does not exist or cannot be opened.\n",
                          pathName.c_str()));
                continue;
            }

            const int ttcIndex = fontFile.fIndex;
            SkString familyName;
            SkFontStyle style;
            bool isFixedWidth;
            if (!scanner.scanFont(stream.get(), ttcIndex, &familyName, &style, &isFixedWidth)) {
                SkDEBUGF(("Requested font file %s exists, but is not a valid font.\n",
                          pathName.c_str()));
                continue;
            }

            int weight = fontFile.fWeight != 0 ? fontFile.fWeight : style.weight();
            SkFontStyle::Slant slant = style.slant();
            switch (fontFile.fStyle) {
                case FontFileInfo::Style::kAuto: slant = style.slant(); break;
                case FontFileInfo::Style::kNormal: slant = SkFontStyle::kUpright_Slant; break;
                case FontFileInfo::Style::kItalic: slant = SkFontStyle::kItalic_Slant; break;
                default: SkASSERT(false); break;
            }
            style = SkFontStyle(weight, style.width(), slant);

            const SkLanguage& lang = family.fLanguage;
            uint32_t variant = family.fVariant;
            if (kDefault_FontVariant == variant) {
                variant = kCompact_FontVariant | kElegant_FontVariant;
            }

            // The first specified family name overrides the family name found in the font.
            // TODO: SkTypeface_AndroidSystem::onCreateFamilyNameIterator should return
            // all of the specified family names in addition to the names found in the font.
            if (cannonicalFamilyName != NULL) {
                familyName = *cannonicalFamilyName;
            }

            fStyles.push_back().reset(SkNEW_ARGS(SkTypeface_AndroidSystem,
                                                 (pathName, ttcIndex,
                                                  style, isFixedWidth, familyName,
                                                  lang, variant)));
        }
    }
开发者ID:BenzoRoms,项目名称:external_skia,代码行数:60,代码来源:SkFontMgr_android.cpp


示例3: curl_escape

void LLWLParamManager::savePreset(const std::string & name)
{
	// bugfix for SL-46920: preventing filenames that break stuff.
	char * curl_str = curl_escape(name.c_str(), name.size());
	std::string escaped_filename(curl_str);
	curl_free(curl_str);
	curl_str = NULL;

	escaped_filename += ".xml";

	// make an empty llsd
	LLSD paramsData(LLSD::emptyMap());
	std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename));

	// fill it with LLSD windlight params
	paramsData = mParamList[name].getAll();

	// write to file
	llofstream presetsXML(pathName);
	LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
	formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY);
	presetsXML.close();

	propagateParameters();
	notifyObservers();
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:26,代码来源:llwlparammanager.cpp


示例4: pathName

String Directory::MakePathName(bool addSepFlag, const char *pathNameTrail) const
{
	String pathName(_name);
	for (Directory *pDirectory = GetParent(); pDirectory != nullptr;
										pDirectory = pDirectory->GetParent()) {
		// a "boundary container" directory may have an empty name
		if (*pDirectory->GetName() != '\0' || pDirectory->IsRootContainer()) {
			String str(pDirectory->GetName());
			size_t len = str.size();
			if (len == 0 || !IsFileSeparator(str[len - 1])) {
				str += pDirectory->GetSeparator();
			}
			str += pathName;
			pathName = str;
		}
	}
	if (pathNameTrail != nullptr) {
		size_t len = pathName.size();
		if (len == 0 || !IsFileSeparator(pathName[len - 1])) {
			pathName += GetSeparator();
		}
		for (const char *p = pathNameTrail; *p != '\0'; p++) {
			char ch = IsFileSeparator(*p)? GetSeparator() : *p;
			pathName += ch;
		}
	} else if (addSepFlag && IsContainer() && !_name.empty()) {
		size_t len = pathName.size();
		if (len > 0 && !IsFileSeparator(pathName[len - 1])) {
			pathName += GetSeparator();
		}
	}
	return pathName;
}
开发者ID:gura-lang,项目名称:gura,代码行数:33,代码来源:Directory.cpp


示例5: pathName

Directory *Directory_FileSys::DoNext(Environment &env)
{
	WIN32_FIND_DATA findData;
	if (_hFind == INVALID_HANDLE_VALUE) {
		String pathName(MakePathName(false));
		if (!pathName.empty()) pathName += GetSeparator();
		pathName += "*.*";
		_hFind = ::FindFirstFile(OAL::ToNativeString(pathName.c_str()).c_str(), &findData);
		if (_hFind == INVALID_HANDLE_VALUE) return nullptr;
	} else if (!::FindNextFile(_hFind, &findData)) {
		::FindClose(_hFind);
		_hFind = INVALID_HANDLE_VALUE;
		return nullptr;
	}
	while (::strcmp(findData.cFileName, ".") == 0 ||
			::strcmp(findData.cFileName, "..") == 0) {
		if (!::FindNextFile(_hFind, &findData)) {
			::FindClose(_hFind);
			_hFind = INVALID_HANDLE_VALUE;
			return nullptr;
		}
	}
	Type type = (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)?
												TYPE_Container : TYPE_Item;
	String fileName = OAL::FromNativeString(findData.cFileName);
	return new Directory_FileSys(Directory::Reference(this), fileName.c_str(),
							type, new OAL::FileStat(fileName.c_str(), findData));
}
开发者ID:gura-lang,项目名称:gura,代码行数:28,代码来源:module-fs.cpp


示例6: delItems

void Mailbox::readSettings(QSettings *config)
{
    _name = config->value("name").toString();
    oldName = config->value("oldname").toString();
    delimiter = config->value("delimiter").toString();
    uid = config->value("uid").toString();
    exists = config->value("exists", 0).toInt();
    byUser = config->value("byuser").toBool();
    deleted = config->value("deleted").toBool();

    QString delItems(config->value("queuedelete").toString().trimmed());
    if (!delItems.isEmpty())
        delList = delItems.split( "," );
    
    _localCopy = config->value("localcopy", false ).toBool();
    _syncSetting = config->value("syncsettings", Sync_AllMessages).toInt();

    serverUidList.clear();
    QString str;
    for (int x = 1; x < (exists + 1); x++) {
        int theUid = config->value( QString::number(x) ).toInt();
        str = QString::number(theUid);
        if ( !str.isEmpty() )
            serverUidList.append( str );
    }

    search->setFromFolder( pathName() );

    if(_account && _account->accountType() == QMailAccount::IMAP)
        _displayName = decodeModUTF7(baseName());
    else
        _displayName = _name;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:33,代码来源:account.cpp


示例7: _LIT

TInt CTestUtils::OpenMainLogL()
	{
	_LIT(KDisplayLogFile,"Log File %S\n");
	TParse loglocation;
	TFileName logfile;
	TInt err=ResolveLogFile(KNullDesC, loglocation);
	if(err!=KErrNone) 
		{
		TChar driveChar=RFs::GetSystemDriveChar();
 		TBuf<2> systemDrive;
 		systemDrive.Append(driveChar);
 		systemDrive.Append(KDriveDelimiter);
 		TPath pathName(systemDrive) ;
		pathName.Append(KMsvTestFileDefaultOutputBase);		
		iFs.MkDirAll(pathName);
		err=ResolveLogFile(KNullDesC, loglocation);
		}
	User::LeaveIfError(err);
	logfile.Copy(loglocation.FullName());
	logfile.Delete(logfile.Length()-1,1);
	AppendVariantName(logfile);
	iRTest.Printf(KDisplayLogFile, &logfile);
	iFs.MkDirAll(logfile);

	iLogBuf=HBufC::NewL(KMaxLogLineLength);
	iLogBuf8=HBufC8::NewL(KMaxLogLineLength);
	return(iFile.Replace(iFs,logfile,EFileWrite|EFileShareAny));
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:28,代码来源:MsvTestUtilsBase.cpp


示例8: paramsData

void LLWLParamManager::savePresets(const std::string & fileName)
{
	//Nobody currently calls me, but if they did, then its reasonable to write the data out to the user's folder
	//and not over the RO system wide version.

	LLSD paramsData(LLSD::emptyMap());
	
	std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", fileName));

	for(std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.begin();
		mIt != mParamList.end();
		++mIt) 
	{
		paramsData[mIt->first] = mIt->second.getAll();
	}

	llofstream presetsXML(pathName);

	LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();

	formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY);

	presetsXML.close();

	propagateParameters();
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:26,代码来源:llwlparammanager.cpp


示例9: pathName

void CMsvIndexContext::DoStoreConfigL()
	{
	// we only want to store the config file if it has changed,
	// we also don't care about UniqueIDs for the internal drive
	if(iConfig.iDebug!=iConfig.iDebugAsLoaded ||
		iConfig.iDrive!=iConfig.iDriveAsLoaded ||
		(iConfig.iDrive!=iServer.FileSession().GetSystemDrive() && iConfig.iUniqueID!=iConfig.iUniqueIDAsLoaded))
		{
		TChar driveChar= iServer.FileSession().GetSystemDriveChar();
		TBuf<2> systemDrive;
		systemDrive.Append(driveChar);
		systemDrive.Append(KDriveDelimiter);
	    TPath pathName(systemDrive);
		pathName.Append(KServerINIFile);
		CDictionaryFileStore *store=CDictionaryFileStore::OpenLC(iServer.FileSession(),pathName,KNullUid);
		RDictionaryWriteStream stream;
		stream.AssignLC(*store, KUidMsvMessageDriveStream);

		stream.WriteUint8L(KMsvMessageDriveStreamVersionNumber); // version number
		stream << iConfig.iDrive.Name();
		stream.WriteUint32L(iConfig.iUniqueID);
		stream.WriteInt8L(iConfig.iDebug);

		stream.CommitL();
		store->CommitL();
		CleanupStack::PopAndDestroy(2,store); // stream, store
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:28,代码来源:indexcontext.cpp


示例10: curl_escape

void LLWLParamManager::loadPreset(const std::string & name,bool propagate)
{
	
	// bugfix for SL-46920: preventing filenames that break stuff.
	char * curl_str = curl_escape(name.c_str(), name.size());
	std::string escaped_filename(curl_str);
	curl_free(curl_str);
	curl_str = NULL;

	escaped_filename += ".xml";

	std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename));
	LL_DEBUGS2("AppInit", "Shaders") << "Loading WindLight sky setting from " << pathName << LL_ENDL; 

	llifstream presetsXML;
	presetsXML.open(pathName.c_str());

	// That failed, try loading from the users area instead.
	if(!presetsXML)
	{
		pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename);
		LL_DEBUGS2("AppInit", "Shaders")<< "Loading User WindLight sky setting from "  << LL_ENDL; 
		presetsXML.open(pathName.c_str());
	}

	if (presetsXML)
	{
		LLSD paramsData(LLSD::emptyMap());

		LLPointer<LLSDParser> parser = new LLSDXMLParser();

		parser->parse(presetsXML, paramsData, LLSDSerialize::SIZE_UNLIMITED);

		std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.find(name);
		if(mIt == mParamList.end())
		{
			addParamSet(name, paramsData);
		}
		else 
		{
			setParamSet(name, paramsData);
		}
		presetsXML.close();
	} 
	else 
	{
		llwarns << "Can't find " << name << llendl;
		return;
	}

	
	if(propagate)
	{
		getParamSet(name, mCurParams);
		propagateParameters();
	}

	notifyObservers();
}	
开发者ID:ArminW,项目名称:imprudence,代码行数:59,代码来源:llwlparammanager.cpp


示例11: getParamSet

void LLWLParamManager::loadPreset(const std::string & name,bool propagate)
{
	// Check if we already have the preset before we try loading it again.
	if(mParamList.find(name) != mParamList.end())
	{
		if(propagate)
		{
			getParamSet(name, mCurParams);
			propagateParameters();
		}
		return;
	}

	// bugfix for SL-46920: preventing filenames that break stuff.
	char * curl_str = curl_escape(name.c_str(), name.size());
	std::string escaped_filename(curl_str);
	curl_free(curl_str);
	curl_str = NULL;

	escaped_filename += ".xml";

	std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename));
	LL_DEBUGS2("AppInit", "Shaders") << "Loading WindLight sky setting from " << pathName << LL_ENDL; 

	llifstream presetsXML;
	presetsXML.open(pathName.c_str());

	// That failed, try loading from the users area instead.
	if(!presetsXML)
	{
		pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename);
		LL_DEBUGS2("AppInit", "Shaders")<< "Loading User WindLight sky setting from "  << LL_ENDL; 
		presetsXML.open(pathName.c_str());
	}

	if (presetsXML)
	{
		loadPresetXML(name, presetsXML);
		presetsXML.close();
	} 
	else 
	{
		llwarns << "Can't find " << name << llendl;
		return;
	}

	
	if(propagate)
	{
		getParamSet(name, mCurParams);
		propagateParameters();
	}

	notifyObservers();
}	
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:55,代码来源:llwlparammanager.cpp


示例12: mVBO

LLPostProcess::LLPostProcess(void) : 
					mVBO(NULL),  
					mAllEffects(LLSD::emptyMap()),
					mScreenWidth(1), mScreenHeight(1)
{
	mSceneRenderTexture = NULL ; 
	mNoiseTexture = NULL ;
					
	/*  Do nothing.  Needs to be updated to use our current shader system, and to work with the move into llrender.*/
	std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
	LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;

	llifstream effectsXML(pathName);

	if (effectsXML)
	{
		LLPointer<LLSDParser> parser = new LLSDXMLParser();

		parser->parse(effectsXML, mAllEffects, LLSDSerialize::SIZE_UNLIMITED);
	}

	if (!mAllEffects.has("default"))
	{
		LLSD & defaultEffect = (mAllEffects["default"] = LLSD::emptyMap());

		/*defaultEffect["enable_night_vision"] = LLSD::Boolean(false);
		defaultEffect["enable_color_filter"] = LLSD::Boolean(false);*/

		/// NVG Defaults
		defaultEffect["brightness_multiplier"] = 3.0;
		defaultEffect["noise_size"] = 25.0;
		defaultEffect["noise_strength"] = 0.4;

		// TODO BTest potentially add this to tweaks?
		mNoiseTextureScale = 1.0f;

		/// Color Filter Defaults
		defaultEffect["gamma"] = 1.0;
		defaultEffect["brightness"] = 1.0;
		defaultEffect["contrast"] = 1.0;
		defaultEffect["saturation"] = 1.0;

		LLSD& contrastBase = (defaultEffect["contrast_base"] = LLSD::emptyArray());
		contrastBase.append(1.0);
		contrastBase.append(1.0);
		contrastBase.append(1.0);
		contrastBase.append(0.5);

		defaultEffect["gauss_blur_passes"] = 2;
	}

	setSelectedEffect("default");
	//*/
}
开发者ID:djhonga2001,项目名称:SingularityViewer,代码行数:54,代码来源:llpostprocess.cpp


示例13: if

/**
 * Removes model from project and deletes its file.
 */
bool BaseModel::remove(){
	bool succ = QFile::remove(pathName());

	if(succ){
		prj->removeModel(this);
		return true;
	}
	else if(!QFile::exists(pathName())){
		prj->removeModel(this);
		return true;
	}

	QMessageBox msgBox;
    msgBox.setWindowTitle(tr("Delete"));
    msgBox.setText(tr("File can't be deleted."));
	msgBox.setInformativeText(pathName());
	msgBox.setIcon(QMessageBox::Critical);
	msgBox.exec();
	return false;
}
开发者ID:kacerpetr,项目名称:NNCreator,代码行数:23,代码来源:BaseModel.cpp


示例14: path

/**
 * Sets new model name, renames model file end emits rename signal.
 */
void BaseModel::rename(QString name){
	bool succ = QFile::rename(pathName(), path() + "/" + name + ".xml");

	if(succ){
		QString oldName = mdlName;
		mdlName = name;
		save();
		prj->save();
		prj->emitModelRenamed(mdlName, oldName, mdlType);
		emit changed(ModelRenamed);
		return;
	}

	QMessageBox msgBox;
    msgBox.setWindowTitle(tr("Rename"));
    msgBox.setText(tr("File can't be renamed."));
	msgBox.setInformativeText(pathName() + " -> " + path() + "/" + name + ".xml");
	msgBox.setIcon(QMessageBox::Critical);
	msgBox.exec();
}
开发者ID:kacerpetr,项目名称:NNCreator,代码行数:23,代码来源:BaseModel.cpp


示例15: pathName

void LLWaterParamManager::loadPreset(const std::string & name,bool propagate)
{
	// bugfix for SL-46920: preventing filenames that break stuff.
	std::string escaped_filename = LLWeb::curlEscape(name);

	escaped_filename += ".xml";

	std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", escaped_filename));
	llinfos << "Loading water settings from " << pathName << llendl;
	
	std::ifstream presetsXML;
	presetsXML.open(pathName.c_str());
	
	// That failed, try loading from the users area instead.
	if(!presetsXML)
	{
		pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename);
		llinfos << "Loading User water setting from " << pathName << llendl;
		presetsXML.open(pathName.c_str());
	}

	if (presetsXML)
	{
		LLSD paramsData(LLSD::emptyMap());

		LLPointer<LLSDParser> parser = new LLSDXMLParser();

		parser->parse(presetsXML, paramsData, LLSDSerialize::SIZE_UNLIMITED);

		std::map<std::string, LLWaterParamSet>::iterator mIt = mParamList.find(name);
		if(mIt == mParamList.end())
		{
			addParamSet(name, paramsData);
		}
		else 
		{
			setParamSet(name, paramsData);
		}
		presetsXML.close();
	} 
	else 
	{
		llwarns << "Can't find " << name << llendl;
		return;
	}

	if(propagate)
	{
		getParamSet(name, mCurParams);
		propagateParameters();
	}
}	
开发者ID:arsenico,项目名称:SingularityViewer,代码行数:52,代码来源:llwaterparammanager.cpp


示例16: pathName

void LLPostProcess::saveEffectAs(std::string const & effectName)
{
	mAllEffectInfo[effectName] = mSelectedEffectInfo;

	std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
	//llinfos << "Saving PostProcess Effects settings to " << pathName << llendl;

	llofstream effectsXML(pathName);

	LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();

	formatter->format(mAllEffectInfo, effectsXML);
}
开发者ID:Nekrofage,项目名称:SingularityViewer,代码行数:13,代码来源:llpostprocess.cpp


示例17: getCompleteName

StringBuffer getCompleteName(const char* dir, const StringBuffer& name) {
    
    if (name.find(dir) == 0) {
        // Filename contains the path from the first char -> it's already the complete name
        return name;
    }
    else {
        StringBuffer pathName(dir);
        pathName += "/"; 
        pathName += name;
        return pathName;
    }
}
开发者ID:fieldwind,项目名称:syncsdk,代码行数:13,代码来源:baseutils.cpp


示例18: switch

bool KdevDoc::canCloseFrame(KdevView* pFrame)
{
	if(!isLastView())
		return true;
		
	bool ret=false;
  if(isModified())
  {
		QString saveName;
  	switch(QMessageBox::information(pFrame, title(), tr("The current file has been modified.\n"
                          "Do you want to save it?"),QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel ))
    {
			case QMessageBox::Yes:
				if(title().contains(tr("Untitled")))
				{
					saveName=QFileDialog::getSaveFileName(0, 0, pFrame);
          if(saveName.isEmpty())
          	return false;
				}
				else
					saveName=pathName();
					
				if(!saveDocument(saveName))
				{
 					switch(QMessageBox::critical(pFrame, tr("I/O Error !"), tr("Could not save the current document !\n"
																												"Close anyway ?"),QMessageBox::Yes ,QMessageBox::No))
 	
 					{
 						case QMessageBox::Yes:
 							ret=true;
 						case QMessageBox::No:
 							ret=false;
 					}	        			
				}
				else
					ret=true;
				break;
			case QMessageBox::No:
				ret=true;
				break;
			case QMessageBox::Cancel:
			default:
				ret=false; 				
				break;
		}
	}
	else
		ret=true;
		
	return ret;
}
开发者ID:alannet,项目名称:example,代码行数:51,代码来源:kdevdoc.cpp


示例19: mVBO

LLPostProcess::LLPostProcess(void) : 
					mVBO(NULL),
					mDepthTexture(0),
					mNoiseTexture(NULL),
					mScreenWidth(0),
					mScreenHeight(0),
					mNoiseTextureScale(0.f),
					mSelectedEffectInfo(LLSD::emptyMap()),
					mAllEffectInfo(LLSD::emptyMap())
{
	mShaders.push_back(new LLMotionShader());
	mShaders.push_back(new LLColorFilterShader());
	mShaders.push_back(new LLNightVisionShader());
	mShaders.push_back(new LLGaussBlurShader());
	mShaders.push_back(new LLPosterizeShader());


	/*  Do nothing.  Needs to be updated to use our current shader system, and to work with the move into llrender.*/
	std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
	LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;

	llifstream effectsXML(pathName);

	if (effectsXML)
	{
		LLPointer<LLSDParser> parser = new LLSDXMLParser();

		parser->parse(effectsXML, mAllEffectInfo, LLSDSerialize::SIZE_UNLIMITED);
	}

	if (!mAllEffectInfo.has("default"))
		mAllEffectInfo["default"] = LLSD::emptyMap();

	LLSD& defaults = mAllEffectInfo["default"];

	for(std::list<LLPointer<LLPostProcessShader> >::iterator it=mShaders.begin();it!=mShaders.end();++it)
	{
		LLSD shader_defaults = (*it)->getDefaults();
		for (LLSD::map_const_iterator it2 = defaults.beginMap();it2 != defaults.endMap();++it2)
		{
			if(!defaults.has(it2->first))
				defaults[it2->first]=it2->second;
		}
	}
	for(std::list<LLPointer<LLPostProcessShader> >::iterator it=mShaders.begin();it!=mShaders.end();++it)
	{
		(*it)->loadSettings(defaults);
	}
	setSelectedEffect("default");
}
开发者ID:Nekrofage,项目名称:SingularityViewer,代码行数:50,代码来源:llpostprocess.cpp


示例20: pathName

IxWrite *IxWrite::writeToFile(char const *name)
{
    FILE *f = 0;
    std::string pathName(name);
#if defined(_WINDOWS)
    std::replace(pathName.begin(), pathName.end(), '/', '\\');
#endif
    fopen_s(&f, pathName.c_str(), "wb");
    if (!f)
    {
        throw std::runtime_error(std::string("Cannot write to file: ") + pathName);
    }
    IxWrite *ret = new IxWrite();
    ret->handle_ = f;
    return ret;
}
开发者ID:amaula,项目名称:ode-0.12,代码行数:16,代码来源:ixfile.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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