Robowflex  v0.1
Making MoveIt Easy
robowflex::IO::GNUPlotHelper::Instance Class Reference

Public Member Functions

 Instance ()
 Constructor. Setups up pipe to GNUPlot. More...
 
Raw Input
void write (const std::string &line)
 
void writeline (const std::string &line)
 
void flush ()
 

Private Member Functions

 Instance (Instance const &)=delete
 
void operator= (Instance const &)=delete
 

Private Attributes

bool debug_ {false}
 

Detailed Description

Definition at line 87 of file gnuplot.h.

Constructor & Destructor Documentation

◆ Instance() [1/2]

GNUPlotHelper::Instance::Instance ( void  )

Constructor. Setups up pipe to GNUPlot.

Definition at line 14 of file gnuplot.cpp.

15 {
16 #if IS_BOOST_164
17  auto path = bp::search_path("gnuplot");
18  if (path.empty())
19  throw Exception(1, "GNUPlot not found, please install!");
20 
21  gnuplot_ = bp::child(bp::search_path("gnuplot"), //"-persist", //
22  bp::std_err > error_, //
23  // bp::std_out > output_, //
24  bp::std_in < input_);
25 #else
26  throw Exception(1, "GNUPlot helper not supported, Boost 1.64 and above is required!");
27 #endif
28 }

◆ Instance() [2/2]

robowflex::IO::GNUPlotHelper::Instance::Instance ( Instance const &  )
privatedelete

Member Function Documentation

◆ flush()

void GNUPlotHelper::Instance::flush ( )

Definition at line 45 of file gnuplot.cpp.

46 {
47 #if IS_BOOST_164
48  input_ << std::endl;
49  if (debug_)
51 #endif
52 }
T endl(T... args)

◆ operator=()

void robowflex::IO::GNUPlotHelper::Instance::operator= ( Instance const &  )
privatedelete

◆ write()

void GNUPlotHelper::Instance::write ( const std::string line)

Definition at line 30 of file gnuplot.cpp.

31 {
32 #if IS_BOOST_164
33  input_ << line;
34  if (debug_)
35  std::cout << line;
36 #endif
37 }

◆ writeline()

void GNUPlotHelper::Instance::writeline ( const std::string line)

Definition at line 39 of file gnuplot.cpp.

40 {
41  write(line);
42  flush();
43 }
void write(const std::string &line)
Definition: gnuplot.cpp:30

Member Data Documentation

◆ debug_

bool robowflex::IO::GNUPlotHelper::Instance::debug_ {false}
private

Definition at line 108 of file gnuplot.h.


The documentation for this class was generated from the following files: