Parallel Make  1.0
My implementation of make utility, which can run in multiple threads according to user request.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
pmake_options Class Reference

Class representing options passed on command line. More...

#include <pmake_options.hpp>

Public Types

using records = std::vector< std::string >
 
using targets = std::vector< file >
 

Public Member Functions

 pmake_options ()
 Constructs an object with default values. More...
 
void set_always_make ()
 Sets -B, –always-make flag on. More...
 
void set_verbose ()
 Sets -d, –verbose flag on. More...
 
void set_just_print ()
 Sets -n, –just-print, –dry-run, –recon flag on. More...
 
void set_question ()
 Sets -q, –question flag on. More...
 
void set_warn_undefined ()
 Sets –warn-undefined-variables flag on. More...
 
void set_jobs (unsigned jobs)
 
void set_make_file (const std::string &makefile)
 
void set_files (const std::string &file)
 
void set_targets (std::string &&target)
 
bool is_always_make () const
 
bool is_verbose () const
 
bool is_just_print () const
 
bool is_question () const
 
bool is_warn_undefined () const
 
unsigned get_jobs () const
 
const std::string & get_makefile () const
 
const records & get_files () const
 
const targets & get_targets () const
 
void set_default_target (const file &target)
 

Detailed Description

Class representing options passed on command line.

!

See also
main.hpp::print_help()

Member Typedef Documentation

using pmake_options::records = std::vector<std::string>
using pmake_options::targets = std::vector<file>

Constructor & Destructor Documentation

pmake_options::pmake_options ( )
inline

Constructs an object with default values.

Member Function Documentation

const records& pmake_options::get_files ( ) const
inline

Gets value representing -W, –what-if, –new-file, –assume-new.

Returns
Value of that option.
unsigned pmake_options::get_jobs ( ) const
inline

Gets value representing -j, –jobs.

Returns
Value of that option.
const std::string& pmake_options::get_makefile ( ) const
inline

Gets value representing -f.

Returns
Value of that option.
const targets& pmake_options::get_targets ( ) const
inline

Gets targets to be build given on command line.

Returns
Targets to be build
bool pmake_options::is_always_make ( ) const
inline

Checks, whether -B, –always-make flag is on.

Returns
true, if is on, false otherwise.
bool pmake_options::is_just_print ( ) const
inline

Checks, whether -n, –just-print, –dry-run, –recon flag is on.

Returns
true, if is on, false otherwise.
bool pmake_options::is_question ( ) const
inline

Checks, whether -q, –question flag is on.

Returns
true, if is on, false otherwise.
bool pmake_options::is_verbose ( ) const
inline

Checks, whether -d, –verbose flag is on.

Returns
true, if is on, false otherwise.
bool pmake_options::is_warn_undefined ( ) const
inline

Checks, whether –warn-undefined-variables flag is on.

Returns
true, if is on, false otherwise.
void pmake_options::set_always_make ( )
inline

Sets -B, –always-make flag on.

void pmake_options::set_default_target ( const file &  target)
inline

Sets default target if none is given.

Parameters
targettarget to be set.
void pmake_options::set_files ( const std::string &  file)
inline

Sets -W, –what-if, –new-file, –assume-new value

Parameters
fileValue to be appended.
void pmake_options::set_jobs ( unsigned  jobs)
inline

Sets -j, –jobs value.

Parameters
jobsValue to be set.
void pmake_options::set_just_print ( )
inline

Sets -n, –just-print, –dry-run, –recon flag on.

void pmake_options::set_make_file ( const std::string &  makefile)
inline

Sets -f value.

Parameters
makefileValue to be set.
void pmake_options::set_question ( )
inline

Sets -q, –question flag on.

void pmake_options::set_targets ( std::string &&  target)
inline

Sets which targets have to be build.

Parameters
targettarget to be build.
void pmake_options::set_verbose ( )
inline

Sets -d, –verbose flag on.

void pmake_options::set_warn_undefined ( )
inline

Sets –warn-undefined-variables flag on.


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