Example #1
0
	std::vector<std::string> TextFile::read()
	{
		if(!isValid_() || !isReading()) {
			throw IOError("File is not open for reading");
		}

		for(const auto& symbol : skipSymbols_)
		{
			if(boost::starts_with(next_line_, symbol))
			{
				advanceLine_();
				return read();
			}
		}

		std::vector<std::string> sline;
		boost::split(sline, next_line_, boost::is_any_of(delimiter_));
		for(auto& s : sline)
		{
			boost::trim(s);
		}

		// Prefetch the next line from the file.
		advanceLine_();

		return sline;
	}
Example #2
0
	void TextFile::advanceLine_()
	{
		do {
			std::getline(*in_strm_, next_line_);
			trim(next_line_);
		} while(isValid_() && next_line_ == "");
	}
Example #3
0
void TextureObject::unload_( )
{
    LBASSERT( isValid_() );

    if( !textureState_->texturePoolPtr )
        return;

    textureState_->texturePoolPtr->releaseTexture( textureState_ );
#ifdef _DEBUG_
    LBVERB << "Texture released : " << lodNodePtr_->getNodeId()
           << " Last used at : " << getLastUsed()
           << " Number of references : " << getReferenceCount_( )
           << std::endl;

#endif //_DEBUG
}