PICout refactoring, new SHSTKMacros
This commit is contained in:
@@ -267,8 +267,8 @@ PICout PICout::operator <<(const PICoutAction v) {
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case PICoutManipulators::SaveContol: saveControl(); break;
|
||||
case PICoutManipulators::RestoreControl: restoreControl(); break;
|
||||
case PICoutManipulators::SaveContol: saveControls(); break;
|
||||
case PICoutManipulators::RestoreControl: restoreControls(); break;
|
||||
default: break;
|
||||
};
|
||||
return *this;
|
||||
@@ -440,14 +440,14 @@ PICout PICout::operator <<(const PICoutSpecialChar v) {
|
||||
}
|
||||
|
||||
|
||||
PICout & PICout::saveControl() {
|
||||
PICout & PICout::saveControls() {
|
||||
if (!act_) return *this;
|
||||
PRIVATE->cos_.push(co_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
PICout & PICout::restoreControl() {
|
||||
PICout & PICout::restoreControls() {
|
||||
if (!act_) return *this;
|
||||
if (!PRIVATE->cos_.isEmpty()) {
|
||||
co_ = PRIVATE->cos_.top();
|
||||
@@ -650,24 +650,17 @@ void PICout::applyFormat(PICoutFormat f) {
|
||||
}
|
||||
|
||||
|
||||
bool PICout::setBufferActive(bool on, bool clear) {
|
||||
PIString PICout::getBuffer() {
|
||||
PIMutexLocker ml(PICout::__mutex__());
|
||||
bool ret = isBufferActive();
|
||||
if (clear) PICout::__string__().clear();
|
||||
setOutputDevice(Buffer, on);
|
||||
PIString ret = PICout::__string__();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool PICout::isBufferActive() {
|
||||
return isOutputDeviceActive(Buffer);
|
||||
}
|
||||
|
||||
|
||||
PIString PICout::buffer(bool clear) {
|
||||
PIString PICout::getBufferAndClear() {
|
||||
PIMutexLocker ml(PICout::__mutex__());
|
||||
PIString ret = PICout::__string__();
|
||||
if (clear) PICout::__string__().clear();
|
||||
PICout::__string__().clear();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user