c0e70035f7996e6585f92428d02a340456879807
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / architecture / osclib / faust / src / lib / OSCFError.cpp
1 /*
2 Copyright (c) Grame 2010
3
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.
7
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
11 for more details.
12
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.
16
17 Grame Research Laboratory, 9, rue du Garet 69001 Lyon - France
18 research@grame.fr
19
20 */
21
22 #include "OSCFError.h"
23 #include "Message.h"
24
25 namespace oscfaust
26 {
27
28 OSCFError OSCFErr; // static OSC error output stream
29 OSCFErrEnd OSCFEndl; // static OSC error output stream end
30
31 OSCFError& operator << (OSCFError& err, const Message* arg)
32 {
33 arg->print (std::cerr);
34 #ifndef NO_OSC
35 if (!err.oscpending) {
36 oscerr << OSCErr();
37 err.oscpending = true;
38 }
39 oscerr << arg->address().c_str();
40 arg->printArgs(oscerr);
41 #endif
42 return err;
43 }
44
45
46 } // end namespace