21 #ifndef G_BATCH_FILE_H
22 #define G_BATCH_FILE_H
44 G_EXCEPTION( Error ,
"batch file error" ) ;
55 explicit BatchFile( std::istream & ,
const std::string & stream_name = std::string() ) ;
58 std::string
line()
const ;
62 std::string
name()
const ;
70 const std::string & start_window_name = std::string() ) ;
78 static std::string quote(
const std::string & ) ;
79 static std::string percents(
const std::string & ) ;
80 static void dequote( std::string & ) ;
81 std::string readFrom( std::istream & ,
const std::string & ,
bool ) ;
83 static bool ignorable(
const std::string &
line ) ;
84 static bool relevant(
const std::string &
line ) ;
85 static std::string join(
const std::string & file_name ,
unsigned int line_number ) ;
std::string line() const
Returns the main command-line from within the batchfile, with normalised spaces, without any "start" ...
static void write(const G::Path &, const StringArray &args, const std::string &start_window_name=std::string())
Writes a startup batch file, including a "start" prefix.
BatchFile(const G::Path &)
Constructor that reads from a file.
std::vector< std::string > StringArray
A std::vector of std::strings.
std::string name() const
Returns the "start" window name, if any.
const G::StringArray & args() const
Returns the startup command-line broken up into de-quoted pieces.
A class for reading and writing windows-style startup batch files containing a single command-line...
Overload discriminator for G::BatchFile.
A Path object represents a file system path.