Notcurses 3.0.13
a blingful library for TUIs and character graphics
Loading...
Searching...
No Matches
Subproc Class Reference

#include <Subproc.hh>

Inheritance diagram for Subproc:
Collaboration diagram for Subproc:

Public Member Functions

 Subproc (Plane *plane, const char *bin, bool use_path=true, char *const arg[]=nullptr, char *const env[]=nullptr, ncfdplane_callback cbfxn=nullptr, ncfdplane_done_cb donecbfxn=nullptr)
 
 Subproc (Plane *plane, const char *bin, const ncsubproc_options *opts, bool use_path=true, char *const arg[]=nullptr, char *const env[]=nullptr, ncfdplane_callback cbfxn=nullptr, ncfdplane_done_cb donecbfxn=nullptr)
 
 Subproc (Plane &plane, const char *bin, bool use_path=true, char *const arg[]=nullptr, char *const env[]=nullptr, ncfdplane_callback cbfxn=nullptr, ncfdplane_done_cb donecbfxn=nullptr)
 
 Subproc (Plane &plane, const char *bin, const ncsubproc_options *opts, bool use_path=true, char *const arg[]=nullptr, char *const env[]=nullptr, ncfdplane_callback cbfxn=nullptr, ncfdplane_done_cb donecbfxn=nullptr)
 
 ~Subproc ()
 
Planeget_plane () const noexcept
 
- Public Member Functions inherited from Root
notcursesget_notcurses () const
 
NotCursesget_notcurses_cpp () const
 

Static Public Attributes

static ncsubproc_options default_options
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 Widget (NotCurses *ncinst)
 
void ensure_valid_plane (Plane *plane) const
 
void ensure_valid_plane (Plane &plane) const
 
void take_plane_ownership (Plane *plane) const
 
void take_plane_ownership (Plane &plane) const
 
- Protected Member Functions inherited from Root
 Root (NotCurses *ncinst)
 
bool is_notcurses_stopped () const noexcept
 
- Static Protected Member Functions inherited from Root
template<typename TRet = bool, typename TValue = int>
static TRet error_guard (TValue ret, TValue error_value)
 
template<typename TRet = bool, typename TValue = int>
static TRet error_guard_cond (TValue ret, bool error_value)
 
- Static Protected Attributes inherited from Root
static constexpr char ncpp_invalid_state_message [] = "notcurses++ is in an invalid state (already stopped?)"
 

Detailed Description

Definition at line 13 of file Subproc.hh.

Constructor & Destructor Documentation

◆ Subproc() [1/4]

Subproc ( Plane plane,
const char bin,
bool  use_path = true,
char *const  arg[] = nullptr,
char *const  env[] = nullptr,
ncfdplane_callback  cbfxn = nullptr,
ncfdplane_done_cb  donecbfxn = nullptr 
)
inlineexplicit

Definition at line 19 of file Subproc.hh.

22 : Subproc (plane, bin, nullptr, use_path, arg, env, cbfxn, donecbfxn)
23 {}
static TRet error_guard(TValue ret, TValue error_value)
Definition Root.hh:39
Subproc(Plane *plane, const char *bin, bool use_path=true, char *const arg[]=nullptr, char *const env[]=nullptr, ncfdplane_callback cbfxn=nullptr, ncfdplane_done_cb donecbfxn=nullptr)
Definition Subproc.hh:19

◆ Subproc() [2/4]

Subproc ( Plane plane,
const char bin,
const ncsubproc_options opts,
bool  use_path = true,
char *const  arg[] = nullptr,
char *const  env[] = nullptr,
ncfdplane_callback  cbfxn = nullptr,
ncfdplane_done_cb  donecbfxn = nullptr 
)
inlineexplicit

Definition at line 25 of file Subproc.hh.

29 {
30 ensure_valid_plane (plane);
31 create_subproc (*plane, bin, opts, use_path, arg, env, cbfxn, donecbfxn);
33 }
static NotCurses * get_notcurses_cpp(const Root *o) noexcept
Widget(NotCurses *ncinst)
Definition Widget.hh:12
void take_plane_ownership(Plane *plane) const
Definition Widget.hh:29
void ensure_valid_plane(Plane *plane) const
Definition Widget.hh:16
const struct ncplane_options * opts
Definition notcurses.h:3483

◆ Subproc() [3/4]

Subproc ( Plane plane,
const char bin,
bool  use_path = true,
char *const  arg[] = nullptr,
char *const  env[] = nullptr,
ncfdplane_callback  cbfxn = nullptr,
ncfdplane_done_cb  donecbfxn = nullptr 
)
inlineexplicit

Definition at line 35 of file Subproc.hh.

38 : Subproc (plane, bin, nullptr, use_path, arg, env, cbfxn, donecbfxn)
39 {}

◆ Subproc() [4/4]

Subproc ( Plane plane,
const char bin,
const ncsubproc_options opts,
bool  use_path = true,
char *const  arg[] = nullptr,
char *const  env[] = nullptr,
ncfdplane_callback  cbfxn = nullptr,
ncfdplane_done_cb  donecbfxn = nullptr 
)
inlineexplicit

Definition at line 41 of file Subproc.hh.

45 {
46 ensure_valid_plane (plane);
47 create_subproc (plane, bin, opts, use_path, arg, env, cbfxn, donecbfxn);
49 }

◆ ~Subproc()

~Subproc ( )
inline

Definition at line 51 of file Subproc.hh.

52 {
54 return;
55
56 ncsubproc_destroy (subproc);
57 }
bool is_notcurses_stopped() const noexcept
int ncsubproc_destroy(ncsubproc *n)
Definition fd.c:402
Here is the call graph for this function:

Member Function Documentation

◆ get_plane()

Plane * get_plane ( ) const
inlinenoexcept

Definition at line 59 of file Subproc.hh.

60 {
61 return Plane::map_plane (ncsubproc_plane (subproc));
62 }
static Plane * map_plane(ncplane *ncp, Plane *associated_plane=nullptr) noexcept
ncplane * ncsubproc_plane(ncsubproc *n)
Definition fd.c:449
Here is the call graph for this function:

Field Documentation

◆ default_options

ncsubproc_options default_options
static

Definition at line 16 of file Subproc.hh.


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