2b6d6423f1c02cce77d31072e8e6dd193be186ad
2 Copyright (c) Grame 2010
4 This library is free software; you can redistribute it and modify it under
5 the terms of the GNU Library General Public License as published by the
6 Free Software Foundation version 2 of the License, or any later version.
8 This library is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
13 You should have received a copy of the GNU Library General Public License
14 along with this library; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 Grame Research Laboratory, 9, rue du Garet 69001 Lyon - France
26 #include "OSCStream.h"
31 //--------------------------------------------------------------------------
33 \brief OSC error stream
35 Combines the \c cerr and \c oscerr streams
37 typedef struct OSCFError
{
39 OSCFError() { oscpending
= false; }
42 typedef struct OSCFErrorEnd
{
46 inline OSCFError
& operator << (OSCFError
& err
, OSCFErrEnd end
)
48 std::cerr
<< std::endl
;
51 err
.oscpending
= false;
56 template <typename T
> OSCFError
& operator << (OSCFError
& err
, const T
& arg
)
60 if (!err
.oscpending
) {
62 err
.oscpending
= true;
70 OSCFError
& operator << (OSCFError
& err
, const Message
* arg
);
72 extern OSCFError OSCFErr
; // static OSC error output stream
73 extern OSCFErrEnd OSCFEndl
; // static OSC error output stream end