23.06.2014 - PICodeParser, PICodeInfo, PIConnection, new binary "pip_cmg"
This commit is contained in:
43
piincludes.h
43
piincludes.h
@@ -39,7 +39,7 @@
|
||||
#define PIP_VERSION_REVISION PIP_VERSION & 0xFF
|
||||
|
||||
//! Suffix of PIP version
|
||||
#define PIP_VERSION_SUFFIX "_prealpha"
|
||||
#define PIP_VERSION_SUFFIX "_beta2"
|
||||
|
||||
#ifdef DOXYGEN
|
||||
|
||||
@@ -747,7 +747,10 @@ private:
|
||||
|
||||
class PIObject;
|
||||
class PIMutex;
|
||||
class PIString;
|
||||
|
||||
extern PIMutex __PICout_mutex__;
|
||||
extern PIString __PICout_string__;
|
||||
|
||||
//! \brief Namespace contains enums controlled PICout
|
||||
namespace PICoutManipulators {
|
||||
@@ -825,16 +828,16 @@ public:
|
||||
~PICout();
|
||||
|
||||
//! Output operator for strings with <tt>"const char * "</tt> type
|
||||
PICout operator <<(const char * v) {space(); quote(); std::cout << v; quote(); return *this;}
|
||||
PICout operator <<(const char * v);
|
||||
|
||||
//! Output operator for strings with <tt>"std::string"</tt> type
|
||||
PICout operator <<(const string & v) {space(); quote(); std::cout << v; quote(); return *this;}
|
||||
PICout operator <<(const string & v);
|
||||
|
||||
//! Output operator for boolean values
|
||||
PICout operator <<(const bool v) {space(); std::cout << (v ? "true" : "false"); return *this;}
|
||||
PICout operator <<(const bool v);
|
||||
|
||||
//! Output operator for <tt>"char"</tt> values
|
||||
PICout operator <<(const char v) {space(); std::cout << v; return *this;}
|
||||
PICout operator <<(const char v);
|
||||
|
||||
//! Output operator for <tt>"unsigned char"</tt> values
|
||||
PICout operator <<(const uchar v);
|
||||
@@ -876,23 +879,7 @@ public:
|
||||
PICout operator <<(const PIObject * v);
|
||||
|
||||
//! Output operator for \a PICoutSpecialChar values
|
||||
PICout operator <<(const PICoutSpecialChar v) {
|
||||
switch (v) {
|
||||
case Null: std::cout << char(0); break;
|
||||
case NewLine: std::cout << '\n'; fo_ = true; break;
|
||||
case Tab: std::cout << '\t'; break;
|
||||
case Esc:
|
||||
#ifdef CC_VC
|
||||
std::cout << char(27);
|
||||
#else
|
||||
std::cout << '\e';
|
||||
#endif
|
||||
break;
|
||||
case Quote: std::cout << '"'; break;
|
||||
};
|
||||
return *this;
|
||||
|
||||
}
|
||||
PICout operator <<(const PICoutSpecialChar v);
|
||||
|
||||
//! Output operator for \a PIFlags<PICoutFormat> values
|
||||
PICout operator <<(const PIFlags<PICoutFormat> v) {
|
||||
@@ -955,21 +942,27 @@ public:
|
||||
/*! \brief Conditional put space character to output
|
||||
* \details If it is not a first output and control \a AddSpaces is set
|
||||
* space character is put \sa \a quote(), \a newLine() */
|
||||
inline PICout & space() {if (!fo_ && co_[AddSpaces]) std::cout << ' '; fo_ = false; return *this;}
|
||||
PICout & space();
|
||||
|
||||
/*! \brief Conditional put quote character to output
|
||||
* \details If control \a AddQuotes is set
|
||||
* quote character is put \sa \a space(), \a newLine() */
|
||||
inline PICout & quote() {if (co_[AddQuotes]) std::cout << '"'; fo_ = false; return *this;}
|
||||
PICout & quote();
|
||||
|
||||
/*! \brief Conditional put new line character to output
|
||||
* \details If control \a AddNewLine is set
|
||||
* new line character is put \sa \a space(), \a quote() */
|
||||
inline PICout & newLine() {if (co_[AddNewLine]) std::cout << std::endl; fo_ = false; return *this;}
|
||||
PICout & newLine();
|
||||
|
||||
static bool setBufferActive(bool on, bool clear = false);
|
||||
static bool isBufferActive();
|
||||
static PIString buffer(bool clear = false);
|
||||
static void clearBuffer();
|
||||
|
||||
private:
|
||||
void applyFormat(PICoutFormat f);
|
||||
|
||||
static bool buffer_;
|
||||
bool fo_, cc_, fc_;
|
||||
int cnb_, attr_;
|
||||
PICoutControls co_;
|
||||
|
||||
Reference in New Issue
Block a user