Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
moot::cmdutil_file_churner Class Reference

Class for churning through many input files, given either directly or as a list-file.

Collaboration diagram for moot::cmdutil_file_churner:
Collaboration graph
[legend]

Public Member Functions

 cmdutil_file_churner (const char *my_progname=__null, char **my_inputs=__null, int my_ninputs=0, bool my_use_list=false, bool my_paranoid=true)
 
 ~cmdutil_file_churner ()
 
FILE * first_input_file ()
 
std::string & first_input_name ()
 
FILE * next_input_file ()
 
std::string & next_input_name ()
 

Public Attributes

const char * progname
 
char ** inputs
 
int ninputs
 
bool use_list
 
bool paranoid
 
mifstream in
 
mifstream list
 
std::string line
 

Private Member Functions

FILE * next_list_file ()
 

Private Attributes

bool is_first_input
 

Constructor & Destructor Documentation

◆ cmdutil_file_churner()

moot::cmdutil_file_churner::cmdutil_file_churner ( const char *  my_progname = __null,
char **  my_inputs = __null,
int  my_ninputs = 0,
bool  my_use_list = false,
bool  my_paranoid = true 
)
inline

Constructor

◆ ~cmdutil_file_churner()

moot::cmdutil_file_churner::~cmdutil_file_churner ( )
inline

Destructor

Member Function Documentation

◆ first_input_file()

FILE* moot::cmdutil_file_churner::first_input_file ( )

Step to the first (valid) input file; returns NULL if no input files were given : OBSOLETE: use next_input_file() instead.

◆ first_input_name()

std::string& moot::cmdutil_file_churner::first_input_name ( )

Step to the first (valid) input file, without opening it : OBSOLETE: use next_input_name() instead.

◆ next_input_file()

FILE* moot::cmdutil_file_churner::next_input_file ( )

Step the the next input file: returns NULL if no input files are left

◆ next_input_name()

std::string& moot::cmdutil_file_churner::next_input_name ( )

Step the the next input file, without opening it

◆ next_list_file()

FILE* moot::cmdutil_file_churner::next_list_file ( )
private

Step the the next input-list filename (list mode): returns NULL if no input files are left

Member Data Documentation

◆ progname

const char* moot::cmdutil_file_churner::progname

Name of the running program (for error reporting)

◆ inputs

char** moot::cmdutil_file_churner::inputs

Input files/file-lists to be chruned (i.e. argv)

◆ ninputs

int moot::cmdutil_file_churner::ninputs

Number of inputs given (i.e. argc)

◆ use_list

bool moot::cmdutil_file_churner::use_list

Whether inputs are filenames or list-filenames

◆ paranoid

bool moot::cmdutil_file_churner::paranoid

Whether to abort() for unreadable files

◆ in

mifstream moot::cmdutil_file_churner::in

Current real input file, wrapped

◆ list

mifstream moot::cmdutil_file_churner::list

Current list input file, if in list-mode

◆ line

std::string moot::cmdutil_file_churner::line

Input line buffer

◆ is_first_input

bool moot::cmdutil_file_churner::is_first_input
private

true until next_input_name() has been called at least once


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