mirror of https://github.com/libAthena/athena.git
* Forgot to implement isOpenForRead/Writing in TextStream
* Changed isOpenForReading/Writing to const int Stream
This commit is contained in:
parent
6c5e489f71
commit
a0e341f5cf
|
@ -193,13 +193,13 @@ public:
|
|||
*
|
||||
* \return True if open for reading; False otherwise.
|
||||
*/
|
||||
virtual bool isOpenForReading();
|
||||
virtual bool isOpenForReading() const;
|
||||
|
||||
/*! \brief Retuns whether or not the Stream is open for writing
|
||||
*
|
||||
* \return True if open for writing; False otherwise.
|
||||
*/
|
||||
virtual bool isOpenForWriting();
|
||||
virtual bool isOpenForWriting() const;
|
||||
|
||||
/*! \brief Sets the Endianss of the stream
|
||||
*
|
||||
|
|
|
@ -287,12 +287,12 @@ bool Stream::autoResizing() const
|
|||
return m_autoResize;
|
||||
}
|
||||
|
||||
bool Stream::isOpenForReading()
|
||||
bool Stream::isOpenForReading() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Stream::isOpenForWriting()
|
||||
bool Stream::isOpenForWriting() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ std::string TextStream::readLineAt(Uint32 line)
|
|||
return m_lines[line - 1];
|
||||
}
|
||||
|
||||
void TextStream::writeLineAt(Uint32 line, const std::string& line)
|
||||
void TextStream::writeLineAt(Uint32 line, const std::string& str)
|
||||
{
|
||||
if (m_accessmode != WriteOnly || m_accessmode != ReadWrite)
|
||||
throw InvalidOperationException("Stream not open for reading");
|
||||
|
@ -154,7 +154,7 @@ void TextStream::writeLineAt(Uint32 line, const std::string& line)
|
|||
throw InvalidOperationException("A line cannot be zero indexed");
|
||||
|
||||
m_currentLine = line;
|
||||
writeLine(line);
|
||||
writeLine(str);
|
||||
}
|
||||
|
||||
std::vector<std::string> TextStream::readAllLines()
|
||||
|
@ -197,6 +197,16 @@ TextStream::TextMode TextStream::textMode() const
|
|||
return m_textmode;
|
||||
}
|
||||
|
||||
bool TextStream::isOpenForReading() const
|
||||
{
|
||||
return ((m_accessmode == ReadOnly || m_accessmode == ReadWrite) && m_accessmode != WriteOnly);
|
||||
}
|
||||
|
||||
bool TextStream::isOpenForReading() const
|
||||
{
|
||||
return ((m_accessmode == WriteOnly || m_accessmode == ReadWrite) && m_accessmode != ReadOnly);
|
||||
}
|
||||
|
||||
// PRIVATE FUNCTIONS
|
||||
void TextStream::loadLines()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue