当前位置: 首页>>代码示例>>C++>>正文


C++ FileInfoListPtr::end方法代码示例

本文整理汇总了C++中ogre::FileInfoListPtr::end方法的典型用法代码示例。如果您正苦于以下问题:C++ FileInfoListPtr::end方法的具体用法?C++ FileInfoListPtr::end怎么用?C++ FileInfoListPtr::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ogre::FileInfoListPtr的用法示例。


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

示例1:

void
SoundTrack::loadImpl()
{
	Log *errorLog = OGF::LogFactory::getSingletonPtr()->get(OGF::LOG_ERR);

	Ogre::FileInfoListPtr resourceInfo = Ogre::ResourceGroupManager::getSingletonPtr()->findResourceFileInfo(mGroup, mName);

	for(Ogre::FileInfoList::iterator it = resourceInfo->begin(); it != resourceInfo->end(); it++)
		_path = it->archive->getName() + "/" + it->filename;
	
	if (_path == "") {
		std::string errorMessage = "Impossible to find sound resource: " + mName;
		errorLog->log("SoundTrack", "loadImpl", errorMessage, OGF::LOG_SEVERITY_ERROR);
		throw errorMessage;
	}

	if ((_playableSource = Mix_LoadMUS(_path.c_str())) == NULL) {
		std::string errorMessage = "Impossible to load sound resource: " + _path;
		errorLog->log("SoundTrack", "loadImpl", errorMessage, OGF::LOG_SEVERITY_ERROR);
		throw errorMessage;
	}

	// Calculate size
	std::ifstream stream;
	stream.open(_path.c_str(), std::ios_base::binary);
	char temp;

	while (stream >> temp)
		_size++;

	stream.close();
}
开发者ID:angulo,项目名称:ogf,代码行数:32,代码来源:SoundTrack.cpp

示例2:

	const VectorString& OgreDataManager::getDataListNames(const std::string& _pattern, bool _fullpath)
	{
		static VectorString result;
		result.clear();

		Ogre::FileInfoListPtr pFileInfo = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(mGroup, _pattern);

		result.reserve(pFileInfo->size());

		for (Ogre::FileInfoList::iterator fi = pFileInfo->begin(); fi != pFileInfo->end(); ++fi )
		{
			if (fi->path.empty())
			{
				bool found = false;
				for (VectorString::iterator iter = result.begin(); iter != result.end(); ++iter)
				{
					if (*iter == fi->filename)
					{
						found = true;
						break;
					}
				}
				if (!found)
				{
					result.push_back(_fullpath ? fi->archive->getName() + "/" + fi->filename : fi->filename);
				}

			}
		}

		pFileInfo.setNull();

		return result;
	}
开发者ID:siangzhang,项目名称:starworld,代码行数:34,代码来源:MyGUI_OgreDataManager.cpp

示例3: loadImpl

void SoundFX::loadImpl() {
  Ogre::LogManager* pLogManager = Ogre::LogManager::getSingletonPtr();

  // Ruta al archivo.
  Ogre::FileInfoListPtr info;
  info = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(mGroup, mName);
  for (Ogre::FileInfoList::iterator i = info->begin(); i != info->end(); ++i) {
    _path = i->archive->getName() + "/" + i->filename;
  }
  
  // Archivo no encontrado...
  if (_path == "") {
    pLogManager->logMessage("SoundFX::loadImpl() Imposible encontrar el recurso.");
    throw (Ogre::Exception(Ogre::Exception::ERR_FILE_NOT_FOUND,
			   "Imposible encontrar el recurso", "SoundFX::loadImpl()"));
  }
  
  // Cargar el efecto de sonido.
  if ((_pSound = Mix_LoadWAV(_path.c_str())) == NULL) {
    pLogManager->logMessage("SoundFX::loadImpl() Imposible cargar el efecto.");
    throw (Ogre::Exception(Ogre::Exception::ERR_INTERNAL_ERROR,
			   "Imposible cargar el efecto", "SoundFX::loadImpl()"));
  }
  
  // Cálculo del tamaño del recurso de sonido.
  std::ifstream stream;
  char byteBuffer;
  stream.open(_path.c_str(), std::ios_base::binary);
  
  while (stream >> byteBuffer) {
    ++_size;
  }
  
  stream.close();
}
开发者ID:RiballoJose,项目名称:Get-the-Cup,代码行数:35,代码来源:SoundFX.cpp

示例4:

	const VectorString& Ogre2DataManager::getDataListNames(const std::string& _pattern, bool _fullpath)
	{
		static VectorString result;
		result.clear();

		VectorString search;
		if (mAllGroups)
		{
			Ogre::StringVector sp = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
			search.reserve(sp.size());
			for (size_t i = 0; i < sp.size(); i++)
				search.push_back(sp[i]);
		}
		else
			search.push_back(mGroup);

		std::vector<Ogre::FileInfoListPtr> pFileInfos;

		int resultSize = 0;
		for (size_t i = 0; i < search.size(); i++)
		{
			Ogre::FileInfoListPtr pFileInfo = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(search[i], _pattern);
			resultSize += pFileInfo->size();
			if (!pFileInfo->empty())
				pFileInfos.push_back(pFileInfo);
			else
				pFileInfo.setNull();
		}

		result.reserve(resultSize);

		for (size_t i = 0; i < pFileInfos.size(); i++)
		{
			Ogre::FileInfoListPtr pFileInfo = pFileInfos[i];
			for (Ogre::FileInfoList::iterator fi = pFileInfo->begin(); fi != pFileInfo->end(); ++fi )
			{
				if (fi->path.empty())
				{
					bool found = false;
					for (VectorString::iterator iter = result.begin(); iter != result.end(); ++iter)
					{
						if (*iter == fi->filename)
						{
							found = true;
							break;
						}
					}
					if (!found)
					{
						result.push_back(_fullpath ? fi->archive->getName() + "/" + fi->filename : fi->filename);
					}
				}
			}

			pFileInfo.setNull();
		}

		return result;
	}
开发者ID:DotWolff,项目名称:mygui,代码行数:59,代码来源:MyGUI_Ogre2DataManager.cpp

示例5: addEditorResources

//-----------------------------------------------------------------------------------------
void CTerrainGroupEditorFactory::addEditorResources(bool changeDefaultNames)
{
    OgitorsRoot* ogitorsRoot = OgitorsRoot::getSingletonPtr();
    Ogre::String terrainDir = ogitorsRoot->GetProjectOptions()->TerrainDirectory;
    // create Terrain project folder and folder to hold the terrain
    ogitorsRoot->GetProjectFile()->createDirectory(terrainDir.c_str());
    ogitorsRoot->GetProjectFile()->createDirectory((terrainDir+"/terrain/").c_str());

    // copy default plant textures
    ogitorsRoot->GetProjectFile()->createDirectory((terrainDir+"/plants/").c_str());
    Ogre::String copydir = Ogitors::Globals::MEDIA_PATH + "/plants/";
    OgitorsUtils::CopyDirOfs(copydir, (terrainDir+"/plants/").c_str());

    // copy default terrain textures sorting them into two different folders
    ogitorsRoot->GetProjectFile()->createDirectory((terrainDir+"/textures/").c_str());
    ogitorsRoot->GetProjectFile()->createDirectory((terrainDir+"/textures/diffusespecular").c_str());
    ogitorsRoot->GetProjectFile()->createDirectory((terrainDir+"/textures/normalheight").c_str());

    Ogre::ResourceGroupManager *mngr = Ogre::ResourceGroupManager::getSingletonPtr();
    copydir = Ogitors::Globals::MEDIA_PATH + "/terrainTextures/";
    mngr->addResourceLocation(copydir,"FileSystem","CopyTerrain");

    Ogre::FileInfoListPtr resList = mngr->listResourceFileInfo("CopyTerrain");

    // copy the files to the different directories
    OFS::OfsPtr& file = ogitorsRoot->GetProjectFile();
    for (Ogre::FileInfoList::const_iterator it = resList->begin(); it != resList->end(); ++it)
    {
        Ogre::FileInfo fInfo = (*it);
        Ogre::String loc = copydir + fInfo.path + fInfo.filename;
        Ogre::String newName = fInfo.filename;
        
        if(fInfo.archive->getType() == "FileSystem")
        {
            if(fInfo.filename.find("diffusespecular") != -1)
            {
                /* since we're using different resource groups for the terrain lets
                remove the naming scheme from the filenames except if the project
                is being upgraded, in which case leave the name alone. */
                if (changeDefaultNames) {
                    newName = Ogre::StringUtil::replaceAll(newName, "_diffusespecular", "");
                }
                OgitorsUtils::CopyFileOfs(loc, terrainDir+"/textures/diffusespecular/"+newName);
            }
            
            if(fInfo.filename.find("normalheight") != -1)
            {
                if (changeDefaultNames) {
                    newName = Ogre::StringUtil::replaceAll(newName, "_normalheight", "");
                }
                OgitorsUtils::CopyFileOfs(loc, terrainDir+"/textures/normalheight/"+newName);
            }
        }
    }
    resList.setNull();
    
    ogitorsRoot->DestroyResourceGroup("CopyTerrain");
}
开发者ID:xubingyue,项目名称:Ogitor,代码行数:59,代码来源:TerrainGroupEditor.cpp

示例6: wxEnumProperty

void
ObjectPropertyEditor::onSelectObject(const Fairy::ObjectPtr& object)
{
    mPropertiesViewer->GetGrid()->Clear();
    mCurrentObject = object;

	if (mObjNameList.GetCount()<=0)
	{
		Ogre::FileInfoListPtr fileInfoList =
			Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(
			Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
			"*.obj");

		for(Ogre::FileInfoList::const_iterator it = fileInfoList->begin(); it != fileInfoList->end(); ++it)
		{	
			const Ogre::String name = it->filename;
			mObjNameList.AddString(name.c_str());
		}
	}

    const Fairy::PropertyList& properties = object->getProperties();
    for (Fairy::PropertyList::const_iterator it = properties.begin(); it != properties.end(); ++it)
    {
        const Fairy::PropertyDef& propertyDef = *it;
        Fairy::uint propertyFlags = object->getPropertyFlags(propertyDef.name);	
		wxPGId id;
		if (propertyDef.name == "actor name")
		{
			wxPGProperty* property = NULL;
			wxString name = propertyDef.name.c_str();
			property = wxEnumProperty(name, name, mObjNameList);
			property->SetValueFromString(propertyDef.defaultValue.c_str(),0);
			id = AddPropertyRecursive(property);
		}
		else
		{
			id = AddPropertyRecursive(mPropertyManager->CreateProperty(propertyDef));
		}
			
		wxPGIdToPtr(id)->SetValueFromString(AS_STRING(object->getPropertyAsString(propertyDef.name)), wxPG_FULL_VALUE);
		
		if (propertyFlags & Fairy::PF_READONLY)
        {
            mPropertiesViewer->DisableProperty(id);
        }
    }

    mPropertiesViewer->Refresh();
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:49,代码来源:ObjectPropertyEditor.cpp

示例7: move

std::vector<std::wstring> ManipulatorEffect::GetAttachEffectMeshNames()
{
	std::vector<std::wstring> ret;

	Ogre::FileInfoListPtr fileinfo = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(
		"Effect", "*.mesh");

	for(auto iter=fileinfo->begin(); iter!=fileinfo->end(); ++iter)
	{
		const Ogre::FileInfo& info = *iter;
		ret.push_back(Utility::EngineToUnicode(info.basename));
	}

	return std::move(ret);
}
开发者ID:mavaL,项目名称:MiniCraft,代码行数:15,代码来源:ManipulatorEffect.cpp

示例8: setFirstTextureGeneration


//.........这里部分代码省略.........
    Ogre::String textureFileNameGeneration = getTextureFileNameGeneration (sequence); // returns full qualified filename
    if (sequence == 0)
        loadTextureGeneration(textureFileNameGeneration); // Don't check the filename if sequence is 0, because it is without path
    else if (textureFileExists(textureFileNameGeneration))
        loadTextureGeneration(textureFileNameGeneration);
}

//****************************************************************************/
void TextureLayer::loadTextureGeneration (const Ogre::String& filename)
{
    // Assume the filename exists
    mTextureOnWhichIsPainted.load(filename, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    mPixelboxTextureOnWhichIsPainted = mTextureOnWhichIsPainted.getPixelBox(0, 0);
    mTextureOnWhichIsPaintedHasAlpha = mTextureOnWhichIsPainted.getHasAlpha();
    mTextureOnWhichIsPaintedWidth = mPixelboxTextureOnWhichIsPainted.getWidth();
    mTextureOnWhichIsPaintedHeight = mPixelboxTextureOnWhichIsPainted.getHeight();
    // In theory, createCarbonCopyTexture() of all related paintlayers should be called,
    // but the texture size doesn't change in practice.

    blitTexture();
}

//****************************************************************************/
void TextureLayer::saveTextureGeneration (void)
{
    // Increase the sequence
    ++mMaxSequence;
    Ogre::String textureFileNameGeneration = getTextureFileNameGeneration (mMaxSequence); // returns full qualified filename

    // Saving the Image must be done in the background, otherwise the painting stutters
    QThread* thread = new QThread;
    TextureSaveWorker* textureSaveWorker = new TextureSaveWorker (mTextureOnWhichIsPainted, textureFileNameGeneration);
    textureSaveWorker->moveToThread(thread);
    connect(thread, SIGNAL(started()), textureSaveWorker, SLOT(saveImage()));
    connect(textureSaveWorker, SIGNAL(finished()), thread, SLOT(quit()));
    connect(textureSaveWorker, SIGNAL(finished()), textureSaveWorker, SLOT(deleteLater()));
    connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
    thread->start();
}

//****************************************************************************/
const Ogre::String& TextureLayer::saveTextureWithTimeStampToImportDir (void)
{
    Ogre::String strippedTextureFileName = mTextureFileName;
    Ogre::String extension = mTextureFileName;
    strippedTextureFileName.erase(strippedTextureFileName.find_last_of("."), Ogre::String::npos); // Remove extension
    if (strippedTextureFileName.find("_hlms") != Ogre::String::npos)
        strippedTextureFileName.erase(strippedTextureFileName.find("_hlms"), Ogre::String::npos); // Remove earlier hlms editor additions
    extension.erase(0, extension.find_last_of("."));
    mHelperString = strippedTextureFileName +
            "_hlms" +
            Ogre::StringConverter::toString((size_t)time(0)) +
            extension;

    mTextureOnWhichIsPainted.save(DEFAULT_IMPORT_PATH.toStdString() + mHelperString); // Saving to the import dir doesn't have to be in the background
    return mHelperString; // Return the basename
}

//****************************************************************************/
const Ogre::String& TextureLayer::getTextureFileNameGeneration (int sequence, bool fullQualified)
{
    mHelperString = mTextureFileName;

    // Do not go beyond the max sequence number
    sequence = sequence > mMaxSequence ? mMaxSequence : sequence;
    if (sequence > 0)
    {
        // Do not go below sequence number 1 (otherwise the original mTextureFileName (without path) is returned)
        Ogre::String strippedTextureFileName = mTextureFileName;
        Ogre::String extension = mTextureFileName;
        strippedTextureFileName.erase(strippedTextureFileName.find_last_of("."), Ogre::String::npos);
        extension.erase(0, extension.find_last_of("."));
        mHelperString = strippedTextureFileName +
                Ogre::StringConverter::toString(sequence) +
                extension;

        if (fullQualified)
            mHelperString = TEMP_PATH + mHelperString;
    }

    return mHelperString;
}

//****************************************************************************/
bool TextureLayer::isTextureFileNameDefinedAsResource (const Ogre::String& filename)
{
    Ogre::String path;
    Ogre::FileInfoListPtr list = Ogre::ResourceGroupManager::getSingleton().listResourceFileInfo(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) ;
    Ogre::FileInfoList::iterator it;
    Ogre::FileInfoList::iterator itStart = list->begin();
    Ogre::FileInfoList::iterator itEnd = list->end();
    for(it = itStart; it != itEnd; ++it)
    {
        Ogre::FileInfo& fileInfo = (*it);
        if (fileInfo.basename == filename || fileInfo.filename == filename)
            return true;
    }

    return false;
}
开发者ID:spookyboo,项目名称:HLMSEditor,代码行数:101,代码来源:texturelayer.cpp

示例9: wxT

void
ReshapeDialog::ReloadTextureList(void)
{

	if (!Ogre::ResourceGroupManager::getSingletonPtr())
		return;

	Ogre::Codec::CodecIterator it = Ogre::Codec::getCodecIterator();
	while (it.hasMoreElements())
	{
		const Ogre::String& ext = it.peekNextKey();
		Ogre::Codec* codec = it.getNext();
		if (codec->getDataType() != "ImageData")
			continue;

		Ogre::FileInfoListPtr fileInfoList =
			Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(
			AS_STRING(mResourceGroup),
			"*." + ext);
		for (Ogre::FileInfoList::const_iterator it = fileInfoList->begin(); it != fileInfoList->end(); ++it)
		{
			Ogre::String path, baseName;
			Ogre::StringUtil::splitFilename(it->filename, baseName, path);




			// 把相对路径的最后一个/去掉
			if (!path.empty() && path[path.length()-1] == '/')
				path.erase(path.length() - 1);

			Ogre::String value;
			if(path.empty())
			{
				value = baseName;
			}
			else
			{
				value = path + "/" + baseName;
			}

			mCmbTexture->AppendString( wxT(baseName) );

			pathNameMap.insert(make_pair(baseName,value));
		}
	}
}
开发者ID:rvpoochen,项目名称:wxsj2,代码行数:47,代码来源:ReshapeDialog.cpp

示例10:

const Ogre::StringVector& ManipulatorTerrain::GetAllLayerTexThumbnailNames()
{
	m_vecLayerTex.clear();

	Ogre::FileInfoListPtr fileinfo = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(
		"TerrainTextures", "*.png");

	int i = 0;
	m_vecLayerTex.resize(fileinfo->size());
	for (auto iter=fileinfo->begin(); iter!=fileinfo->end(); ++iter)
	{
		const Ogre::FileInfo& info = (*iter);
		m_vecLayerTex[i++] = info.archive->getName() + "/" + info.filename;
	}

	return m_vecLayerTex;
}
开发者ID:mavaL,项目名称:MiniCraft,代码行数:17,代码来源:ManipulatorTerrain.cpp

示例11: resolveFilePathForMesh

std::string AssetsManager::resolveFilePathForMesh(Ogre::MeshPtr meshPtr)
{
	Ogre::ResourceGroupManager& manager = Ogre::ResourceGroupManager::getSingleton();
	const std::multimap<std::string, std::string>& locations = EmberOgre::getSingleton().getResourceLocations();

	for (std::multimap<std::string, std::string>::const_iterator I = locations.begin(); I != locations.end(); ++I) {
		std::string group = I->first;
		std::string fileName = meshPtr->getName();
		Ogre::FileInfoListPtr files = manager.findResourceFileInfo(group, fileName, false);
		for (Ogre::FileInfoList::const_iterator J = files->begin(); J != files->end(); ++J) {
			if (J->filename == fileName) {
				return I->second + J->filename;
			}
		}
	}
	return "";

}
开发者ID:Laefy,项目名称:ember,代码行数:18,代码来源:AssetsManager.cpp

示例12: openFile

void SoundBank::openFile(std::string path, std::string id, int index)
{
	std::string foundPath = path;
	Ogre::ResourceGroupManager* groupManager = Ogre::ResourceGroupManager::getSingletonPtr() ;
	Ogre::String group = groupManager->findGroupContainingResource(path) ;
	Ogre::FileInfoListPtr fileInfos = groupManager->findResourceFileInfo(group,foundPath);
	Ogre::FileInfoList::iterator it = fileInfos->begin();
	if(it != fileInfos->end())
	{
		foundPath = it->archive->getName() + "/" + foundPath;
	}
	else
	{
		foundPath = "";
	}

	this->addSound(new SoundChunk(foundPath), id, index);
}
开发者ID:simonkwong,项目名称:Shamoov,代码行数:18,代码来源:Sound.cpp

示例13: findFilePath

        std::string findFilePath(const std::string& filename)
        {
          // on demand init
          Model::initRessources() ;
          
          std::string foundPath = filename;
          Ogre::ResourceGroupManager* groupManager = Ogre::ResourceGroupManager::getSingletonPtr() ;
          Ogre::String group = groupManager->findGroupContainingResource(filename) ;
          Ogre::FileInfoListPtr fileInfos = groupManager->findResourceFileInfo(group,foundPath);
          Ogre::FileInfoList::iterator it = fileInfos->begin();
          if(it != fileInfos->end())
          {
            foundPath = it->archive->getName() + "/" + foundPath;
            foundPath;
          }
          else
            foundPath = "";

          return foundPath;
        }
开发者ID:BackupTheBerlios,项目名称:projet-univers-svn,代码行数:20,代码来源:manager.cpp

示例14: InitMaterialCombo

void MaterialEditorDialog::InitMaterialCombo(void)
{
	typedef std::list<Ogre::String> MaterialFileNameList;
	MaterialFileNameList materialFileNameList;

	Ogre::FileInfoListPtr fileInfoList =
		Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(
		Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
		"*.material");
	for (Ogre::FileInfoList::const_iterator it = fileInfoList->begin(); it != fileInfoList->end(); ++it)
	{
		if ( it->archive->getName() == EFFECT_PATH)
		{
			materialFileNameList.push_back(it->filename);
		}
	}

	Ogre::ResourceManager::ResourceMapIterator resourceMapIterator = Ogre::MaterialManager::getSingleton().getResourceIterator();

	while ( resourceMapIterator.hasMoreElements() )
	{				
		Ogre::String matName = resourceMapIterator.peekNextValue()->getName();

		for ( MaterialFileNameList::iterator i = materialFileNameList.begin();
			i != materialFileNameList.end(); ++i )
		{
			if ( *i == resourceMapIterator.peekNextValue()->getOrigin() )
			{
				mMaterialComboBox->Append(matName);

				break;

			}
		}

		resourceMapIterator.moveNext();
	}

}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:39,代码来源:WXMaterialEditorDialog.cpp

示例15: loadImpl

// Carga del recurso.
void Track::loadImpl() {
  Ogre::LogManager* pLogManager = Ogre::LogManager::getSingletonPtr();

  // Ruta al archivo.
  Ogre::FileInfoListPtr info;
  info = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(mGroup, mName);

  for (Ogre::FileInfoList::const_iterator i = info->begin(); i != info->end(); ++i) {
    _path = i->archive->getName() + "/" + i->filename;
  }
 
  // Archivo no encontrado...
  if (_path == "") {
    pLogManager->logMessage("Track::loadImpl() Imposible cargar el recurso de sonido.");
    throw (Ogre::Exception(Ogre::Exception::ERR_FILE_NOT_FOUND,
			   "Archivo no encontrado", "Track::loadImpl()"));
  }
    cout << "\n\nPath: " << _path << "\n\n" << endl;
    // Cargar el recurso de sonido.
    if ((_pTrack = Mix_LoadMUS(_path.c_str())) == NULL) {
      pLogManager->logMessage("Track::loadI() Imposible cargar el recurso de sonido.");
      throw (Ogre::Exception(Ogre::Exception::ERR_FILE_NOT_FOUND,
			     "Archivo no encontrado", "Track::loadI()"));
    }
    
    // Cálculo del tamaño del recurso de sonido.
    std::ifstream stream;
    char byteBuffer;
    stream.open(_path.c_str(), std::ios_base::binary);
 
    while (stream >> byteBuffer) {
      _size++;
    }
    
    stream.close();
}
开发者ID:RubenCardos,项目名称:CrackShot,代码行数:37,代码来源:Track.cpp


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