added Sed::stop() and Sed::isStop()
This commit is contained in:
parent
8f9011bc1d
commit
716237d6c0
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Sed.hpp 558 2011-09-02 15:27:44Z hyunghwan.chung $
|
||||
* $Id: Sed.hpp 571 2011-09-20 14:04:48Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2011 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -202,6 +202,20 @@ public:
|
||||
///
|
||||
int execute (Stream& iostream);
|
||||
|
||||
|
||||
///
|
||||
/// The stop() function makes a request to break a running loop
|
||||
/// inside execute(). Note that this does not affect blocking
|
||||
/// operations in user-defined stream handlers.
|
||||
///
|
||||
void stop ();
|
||||
|
||||
///
|
||||
/// The isStop() function returns true if stop() has been called
|
||||
/// since the last call to execute(), false otherwise.
|
||||
///
|
||||
bool isStop () const;
|
||||
|
||||
///
|
||||
/// The getOption() function gets the current options.
|
||||
/// @return 0 or current options ORed of #option_t enumerators.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Sed.cpp 558 2011-09-02 15:27:44Z hyunghwan.chung $
|
||||
* $Id: Sed.cpp 571 2011-09-20 14:04:48Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2011 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -68,6 +68,18 @@ int Sed::execute (Stream& iostream)
|
||||
return qse_sed_exec (sed, xin, xout);
|
||||
}
|
||||
|
||||
void Sed::stop ()
|
||||
{
|
||||
QSE_ASSERT (sed != QSE_NULL);
|
||||
return qse_sed_stop (sed);
|
||||
}
|
||||
|
||||
bool Sed::isStop () const
|
||||
{
|
||||
QSE_ASSERT (sed != QSE_NULL);
|
||||
return qse_sed_isstop (sed);
|
||||
}
|
||||
|
||||
int Sed::getOption() const
|
||||
{
|
||||
QSE_ASSERT (sed != QSE_NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user