bool cInputStream::GetLine(AString & a_OutLine)
{
	if (!GetLineInternal(a_OutLine))
	{
		return false;
	}
	m_LineNum += 1;
	return true;
}
Example #2
0
// --------------------------------------------------------------------------
//
// Function
//		Name:    FdGetLine::GetLine(bool)
//		Purpose: Returns a file from the file. If Preprocess is true, leading
//				 and trailing whitespace is removed, and comments (after #)
//				 are deleted.
//		Created: 2003/07/24
//
// --------------------------------------------------------------------------
std::string FdGetLine::GetLine(bool Preprocess)
{
	if(mFileHandle == -1) {THROW_EXCEPTION(CommonException, GetLineNoHandle)}
	
	std::string r;
	bool result = GetLineInternal(r, Preprocess);

	if(!result)
	{
		// should never fail for FdGetLine
		THROW_EXCEPTION(CommonException, Internal);
	}
	
	return r;
}
Example #3
0
// --------------------------------------------------------------------------
//
// Function
//		Name:    IOStreamGetLine::GetLine(std::string &, bool, int)
//		Purpose: Gets a line from the file, returning it in rOutput. If Preprocess is true, leading
//				 and trailing whitespace is removed, and comments (after #)
//				 are deleted.
//				 Returns true if a line is available now, false if retrying may get a line (eg timeout, signal),
//				 and exceptions if it's EOF.
//		Created: 2003/07/24
//
// --------------------------------------------------------------------------
bool IOStreamGetLine::GetLine(std::string &rOutput, bool Preprocess, int Timeout)
{
	return GetLineInternal(rOutput, Preprocess, Timeout);
}