ConsoleHandler.cpp
Go to the documentation of this file.
00001 
00002 #include "vrep_ros_plugin/ConsoleHandler.h"
00003 
00004 //#include "porting.h"
00005 //#include "access.h"
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            // If the console is not open, open it
00019                 if (!ConsoleIsOpen){
00020                         consoleHandle = simAuxiliaryConsoleOpen("External console",200,4,NULL,NULL,NULL,NULL);
00021                         ConsoleIsOpen = 1;
00022                 }
00023 
00024                 // Print the message in the console
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 }


vrep_ros_plugin
Author(s): Riccardo Spica , Giovanni Claudio
autogenerated on Wed Sep 9 2015 18:54:51