mCRL2
Loading...
Searching...
No Matches
mcrl2::smt::child_process Class Reference

#include <child_process.h>

Classes

struct  platform_impl
 

Public Member Functions

 child_process (const std::string &name)
 
 ~child_process ()
 
void write (const std::string &s) const
 
std::string read () const
 Read output from the child process. This is a blocking call.
 
std::string read (const std::chrono::microseconds &timeout) const
 Read output from the child process. If no output is available before the timeout happens, a SIGINT signal is sent to the child process and the resulting output is read and returned. NOTE: this function is not on Windows, and behaves like read()
 

Protected Member Functions

void initialize ()
 
void send_sigint () const
 Send the SIGINT signal to the child.
 

Protected Attributes

std::string m_name
 
std::shared_ptr< platform_implm_pimpl
 

Detailed Description

Definition at line 23 of file child_process.h.

Constructor & Destructor Documentation

◆ child_process()

mcrl2::smt::child_process::child_process ( const std::string &  name)
inline

Definition at line 41 of file child_process.h.

◆ ~child_process()

mcrl2::smt::child_process::~child_process ( )

Definition at line 296 of file child_process.cpp.

Member Function Documentation

◆ initialize()

void mcrl2::smt::child_process::initialize ( )
protected

Definition at line 239 of file child_process.cpp.

◆ read() [1/2]

std::string mcrl2::smt::child_process::read ( ) const

Read output from the child process. This is a blocking call.

Definition at line 189 of file child_process.cpp.

◆ read() [2/2]

std::string mcrl2::smt::child_process::read ( const std::chrono::microseconds &  timeout) const

Read output from the child process. If no output is available before the timeout happens, a SIGINT signal is sent to the child process and the resulting output is read and returned. NOTE: this function is not on Windows, and behaves like read()

Definition at line 211 of file child_process.cpp.

◆ send_sigint()

void mcrl2::smt::child_process::send_sigint ( ) const
protected

Send the SIGINT signal to the child.

Definition at line 234 of file child_process.cpp.

◆ write()

void mcrl2::smt::child_process::write ( const std::string &  s) const

Definition at line 181 of file child_process.cpp.

Member Data Documentation

◆ m_name

std::string mcrl2::smt::child_process::m_name
protected

Definition at line 28 of file child_process.h.

◆ m_pimpl

std::shared_ptr<platform_impl> mcrl2::smt::child_process::m_pimpl
protected

Definition at line 31 of file child_process.h.


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