git-svn-id: svn://db.shs.com.ru/pip@756 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-02-18 18:30:51 +00:00
parent 0af7eabf56
commit 217947cc89
16 changed files with 296 additions and 217 deletions

View File

@@ -216,6 +216,9 @@
#define PRIVATE (__privateinitializer__.p)
#define PRIVATEWB __privateinitializer__.p
#define NO_COPY_CLASS(name) \
explicit name(const name & ); \
void operator =(const name & );
#ifdef FREERTOS
# define PIP_MIN_MSLEEP 10.

View File

@@ -136,7 +136,8 @@ PICout::~PICout() {
if (fc_) applyFormat(PICoutManipulators::Default);
if (cc_) return;
newLine();
PICout::__mutex__().unlock();
if ((co_ & NoLock) != NoLock)
PICout::__mutex__().unlock();
if (buffer_)
((NotifierObject*)Notifier::object())->finished(id_, buffer_);
}
@@ -427,7 +428,8 @@ void PICout::init() {
#endif
buffer_ = 0;
id_ = 0;
PICout::__mutex__().lock();
if ((co_ & NoLock) != NoLock)
PICout::__mutex__().lock();
}

View File

@@ -68,11 +68,13 @@ namespace PICoutManipulators {
//! \brief Enum contains control of PICout
enum PIP_EXPORT PICoutControl {
AddNone /*! No controls */ = 0x0,
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
AddNewLine /*! New line will be appear after all output */ = 0x2,
AddQuotes /*! Each string will be quoted */ = 0x4,
AddAll /*! All controls */ = 0xFFFFFFFF
AddNone /*! No controls */ = 0x0,
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
AddNewLine /*! New line will be appear after all output */ = 0x2,
AddQuotes /*! Each string will be quoted */ = 0x4,
DefaultControls /*! Default controls */ = AddSpaces | AddNewLine,
AddAll /*! All controls */ = 0xFF,
NoLock /*! Don`t use mutex for output */ = 0x100,
};
//! \brief Enum contains output format
@@ -113,7 +115,7 @@ namespace PICoutManipulators {
class PIP_EXPORT PICout {
public:
//! Default constructor with default features (AddSpaces and AddNewLine)
explicit PICout(PIFlags<PICoutManipulators::PICoutControl> controls = PICoutManipulators::AddSpaces | PICoutManipulators::AddNewLine);
explicit PICout(PIFlags<PICoutManipulators::PICoutControl> controls = PICoutManipulators::DefaultControls);
//! Construct with external buffer and id "id". See \a Notifier for details
PICout(PIString * buffer, int id = 0, PIFlags<PICoutManipulators::PICoutControl> controls = PICoutManipulators::AddSpaces | PICoutManipulators::AddNewLine);