[Orxonox-commit 4141] r8812 - in code/branches/output/src: . libraries/core libraries/util
landauf at orxonox.net
landauf at orxonox.net
Mon Aug 1 20:42:26 CEST 2011
Author: landauf
Date: 2011-08-01 20:42:26 +0200 (Mon, 01 Aug 2011)
New Revision: 8812
Modified:
code/branches/output/src/Orxonox.cc
code/branches/output/src/OrxonoxConfig.h.in
code/branches/output/src/libraries/core/OrxonoxClass.h
code/branches/output/src/libraries/util/Output.h
Log:
removed COUT, CCOUT, and DOUT macros. COUT is now defined as a deprecated function.
Modified: code/branches/output/src/Orxonox.cc
===================================================================
--- code/branches/output/src/Orxonox.cc 2011-08-01 17:09:29 UTC (rev 8811)
+++ code/branches/output/src/Orxonox.cc 2011-08-01 18:42:26 UTC (rev 8812)
@@ -58,6 +58,8 @@
int main(int argc, char** argv)
#endif
{
+ using namespace orxonox;
+
try
{
#ifndef ORXONOX_USE_WINMAIN
@@ -69,18 +71,18 @@
// 0 is the execution path
const int firstArgument = 1;
#endif
-
+
std::string strCmdLine;
for (int i = firstArgument; i < argc; ++i)
strCmdLine = strCmdLine + argv[i] + ' ';
#endif
- return orxonox::main(strCmdLine);
+ return main(strCmdLine);
}
catch (...)
{
- COUT(0) << "Orxonox failed to initialise: " << orxonox::Exception::handleMessage() << std::endl;
- COUT(0) << "Terminating program." << std::endl;
+ orxout(user_error) << "Orxonox failed to initialise: " << orxonox::Exception::handleMessage() << endl;
+ orxout(user_error) << "Terminating program." << endl;
return 1;
}
}
Modified: code/branches/output/src/OrxonoxConfig.h.in
===================================================================
--- code/branches/output/src/OrxonoxConfig.h.in 2011-08-01 17:09:29 UTC (rev 8811)
+++ code/branches/output/src/OrxonoxConfig.h.in 2011-08-01 18:42:26 UTC (rev 8812)
@@ -108,6 +108,17 @@
# endif
#endif
+// Declare a function deprecated
+#ifndef __DEPRECATED__
+# if defined(ORXONOX_COMPILER_GCC)
+# define __DEPRECATED__(function) function __attribute__ ((deprecated))
+# elif defined(ORXONOX_COMPILER_MSVC)
+# define __DEPRECATED__(function) __declspec(deprecated) function
+# else
+# define __DEPRECATED__(function) function
+# endif
+#endif
+
#ifndef __UNIQUE_NUMBER__
# if defined(ORXONOX_COMPILER_GCC) && ORXONOX_COMP_VER >= 430
# define __UNIQUE_NUMBER__ __COUNTER__
Modified: code/branches/output/src/libraries/core/OrxonoxClass.h
===================================================================
--- code/branches/output/src/libraries/core/OrxonoxClass.h 2011-08-01 17:09:29 UTC (rev 8811)
+++ code/branches/output/src/libraries/core/OrxonoxClass.h 2011-08-01 18:42:26 UTC (rev 8812)
@@ -49,13 +49,6 @@
#include <vector>
#include "Super.h"
-/**
- at def CCOUT
- Acts almost exactly like COUT(x), but prepends "ClassName: "
-*/
-#define CCOUT(level) \
- COUT(level) << this->getIdentifier()->getName() << ": "
-
namespace orxonox
{
/**
Modified: code/branches/output/src/libraries/util/Output.h
===================================================================
--- code/branches/output/src/libraries/util/Output.h 2011-08-01 17:09:29 UTC (rev 8811)
+++ code/branches/output/src/libraries/util/Output.h 2011-08-01 18:42:26 UTC (rev 8812)
@@ -48,9 +48,14 @@
{
return orxout(level, context());
}
+
+ // COUT() is deprecated, please use orxout()
+ inline __DEPRECATED__(OutputStream& COUT(int level));
+
+ inline OutputStream& COUT(int)
+ {
+ return orxout();
+ }
}
-#define COUT(level) orxonox::orxout()
-#define DOUT orxonox::orxout()
-
#endif /* _Output_H__ */
More information about the Orxonox-commit
mailing list