Go to the documentation of this file.00001
00002 #include "vrep_ros_plugin/ConsoleHandler.h"
00003
00004
00005
00006 #include "v_repLib.h"
00007 #include <iostream>
00008
00009 namespace ConsoleHandler {
00010
00011 bool ConsoleIsOpen = 0;
00012 simInt consoleHandle = -1;
00013
00014
00015
00016 void printInConsole(const std::stringstream &strStream)
00017 {
00018
00019 if (!ConsoleIsOpen){
00020 consoleHandle = simAuxiliaryConsoleOpen("External console",200,4,NULL,NULL,NULL,NULL);
00021 ConsoleIsOpen = 1;
00022 }
00023
00024
00025 std::stringstream newline;
00026 newline << "-------------------------------------------------------------------" << std::endl;
00027
00028 newline << strStream.str().c_str();
00029
00030 simAuxiliaryConsolePrint(consoleHandle, newline.str().c_str());
00031 std::cout << newline.str().c_str();
00032
00033 }
00034 }