Leosac  0.8.0
Open Source Access Control
Leosac::Tools::UnixShellScript Class Reference

#include <unixshellscript.hpp>

+ Collaboration diagram for Leosac::Tools::UnixShellScript:

Public Member Functions

 UnixShellScript (const std::string &script)
 
 ~UnixShellScript ()=default
 
 UnixShellScript (const UnixShellScript &other)=delete
 
UnixShellScriptoperator= (const UnixShellScript &other)=delete
 
int run (const std::string &args=std::string())
 
const std::string & getOutput () const
 

Static Public Member Functions

template<typename T >
static std::string toCmdLine (T value)
 
template<typename T , typename... Targs>
static std::string toCmdLine (T value, Targs... args)
 

Private Attributes

const std::string _script
 
std::string _output
 

Static Private Attributes

static const std::size_t BufferSize = 1024
 

Detailed Description

Definition at line 36 of file unixshellscript.hpp.

Constructor & Destructor Documentation

◆ UnixShellScript() [1/2]

UnixShellScript::UnixShellScript ( const std::string &  script)
explicit

Definition at line 41 of file unixshellscript.cpp.

◆ ~UnixShellScript()

Leosac::Tools::UnixShellScript::~UnixShellScript ( )
default

◆ UnixShellScript() [2/2]

Leosac::Tools::UnixShellScript::UnixShellScript ( const UnixShellScript other)
delete

Member Function Documentation

◆ getOutput()

const std::string & UnixShellScript::getOutput ( ) const

Definition at line 66 of file unixshellscript.cpp.

◆ operator=()

UnixShellScript& Leosac::Tools::UnixShellScript::operator= ( const UnixShellScript other)
delete

◆ run()

int UnixShellScript::run ( const std::string &  args = std::string())

Definition at line 46 of file unixshellscript.cpp.

◆ toCmdLine() [1/2]

template<typename T >
static std::string Leosac::Tools::UnixShellScript::toCmdLine ( value)
inlinestatic

Definition at line 55 of file unixshellscript.hpp.

◆ toCmdLine() [2/2]

template<typename T , typename... Targs>
static std::string Leosac::Tools::UnixShellScript::toCmdLine ( value,
Targs...  args 
)
inlinestatic

Definition at line 64 of file unixshellscript.hpp.

Member Data Documentation

◆ _output

std::string Leosac::Tools::UnixShellScript::_output
private

Definition at line 72 of file unixshellscript.hpp.

◆ _script

const std::string Leosac::Tools::UnixShellScript::_script
private

Definition at line 71 of file unixshellscript.hpp.

◆ BufferSize

const std::size_t Leosac::Tools::UnixShellScript::BufferSize = 1024
staticprivate

Definition at line 38 of file unixshellscript.hpp.


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