Files
pip/piincludes.cpp

71 lines
1.8 KiB
C++

/*
PIP - Platform Independent Primitives
Global includes
Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "piincludes.h"
#include "pimutex.h"
bool isPIInit = false;
bool piDebug = true;
string ifconfigPath;
PIInit piInit;
lconv * currentLocale = std::localeconv();
#ifdef MAC_OS
clock_serv_t __pi_mac_clock;
#endif
PIMutex __PICout_mutex__;
/*! \class PICout
* \brief Class for formatted output similar std::cout
*
* \section PICout_sec0 Synopsis
* This class provide many stream operators for output with some features.
* Output to PICout is thread-sequential, i.e. doesn`t mixed from parallel
* threads.
*
* \section PICout_sec1 Features
* - insertion spaces between entries
* - insertion new line at the end of output
* - strings are quoted
* - custom output operator can be easily written
*
* \section PICout_ex0 Example
* \snippet picout.cpp 0
*/
PICout::PICout(PIFlags<PICoutControl> controls): fo_(true), cc_(false), co_(controls) {
__PICout_mutex__.lock();
}
PICout::~PICout() {
if (cc_) return;
newLine();
__PICout_mutex__.unlock();
}
/*! \mainpage Title
* This is main page
*/