示例#1
0
		/**
		 * Parses specified character.
		 * Sets error if parsed character doesnt match.
		 */
		void parse(char ch)
		{
			char ch2;
			if(!m_file.readChar(&ch2) || ch2 != ch)
			{
				m_err = MapFile::ERROR_PARSE;
				m_errLine = m_file.line();
			}
		}
示例#2
0
		/**
		 * Returns true if the next line is empty.
		 */
		bool nextLineEmpty()
		{
			m_file.skipLine();
			char ch;
			while(m_file.peekChar(&ch) && isspace(ch) && ch != '\n')
				m_file.readChar(&ch);
			if(m_file.peekChar(&ch) && ch == '\n')
				return true;
			return false;
		}