Developer documentation
Version 3.0.3-105-gd3941f44
app.h File Reference
#include <cstring>
#include <limits>
#include <string>
#include <thread>
#include "cmdline_option.h"
#include "types.h"
#include "file/path.h"

Go to the source code of this file.


class  MR::App::Description
 vector of strings to hold more comprehensive command description More...
class  MR::App::Example
 object for storing a single example command usage More...
class  MR::App::ExampleList
 a class to hold the list of Example's More...
class  MR::App::ArgumentList
 a class to hold the list of Argument's More...
class  MR::App::OptionList
 a class to hold the list of option groups More...
class  MR::App::ParsedArgument
class  MR::App::ParsedOption
 object storing information about option parsed from command-line More...


namespace  MR
namespace  MR::App


void usage ()
void run ()
const char * MR::App::argtype_description (ArgType type)
std::string MR::App::help_head (int format)
std::string MR::App::help_synopsis (int format)
std::string MR::App::help_tail (int format)
std::string MR::App::usage_syntax (int format)
void MR::App::check_overwrite (const std::string &name)
void MR::App::init (int argc, const char *const *argv)
 initialise MRtrix and parse command-line arguments More...
void MR::App::verify_usage ()
 verify that command's usage() function has set requisite fields [used internally] More...
void MR::App::parse_special_options ()
 option parsing that should happen before GUI creation [used internally] More...
void MR::App::parse ()
 do the actual parsing of the command-line [used internally] More...
void MR::App::sort_arguments (int argc, const char *const *argv)
 sort command-line tokens into arguments and options [used internally] More...
const Option * MR::App::match_option (const char *stub)
 uniquely match option stub to Option More...
std::string MR::App::full_usage ()
 dump formatted help page [used internally] More...
const vector< ParsedOption > MR::App::get_options (const std::string &name)
 return all command-line options matching name More...
template<typename T >
MR::App::get_option_value (const std::string &name, const T default_value)
 Returns the option value if set, and the default otherwise. More...
std::string MR::App::operator+ (const char *left, const App::ParsedArgument &right)
 convenience function provided mostly to ease writing Exception strings More...
std::ostream & MR::App::operator<< (std::ostream &stream, const App::ParsedArgument &arg)


const char * MR::App::mrtrix_version
const char * MR::App::build_date
int MR::App::log_level
int MR::App::exit_error_code
std::string MR::App::NAME
std::string MR::App::command_history_string
bool MR::App::overwrite_files
void(* MR::App::check_overwrite_files_func )(const std::string &name)
bool MR::App::fail_on_warn
bool MR::App::terminal_use_colour
const std::thread::id MR::App::main_thread_ID
int MR::App::argc
const char *const * MR::App::argv
const char * MR::App::project_version
const char * MR::App::project_build_date
vector< ParsedArgument > MR::App::argument
 the list of arguments parsed from the command-line More...
vector< ParsedOption > MR::App::option
 the list of options parsed from the command-line More...
Description MR::App::DESCRIPTION
 additional description of the command over and above the synopsis More...
ExampleList MR::App::EXAMPLES
 example usages of the command More...
ArgumentList MR::App::ARGUMENTS
 the arguments expected by the command More...
OptionList MR::App::OPTIONS
 the options accepted by the command More...
 set to false if command can operate with no arguments More...
const char * MR::App::AUTHOR
 set the author of the command More...
const char * MR::App::COPYRIGHT
 set the copyright notice if different from that used in MRtrix More...
const char * MR::App::SYNOPSIS
 set a one-sentence synopsis for the command More...
Description MR::App::REFERENCES
 add references to command help page More...
OptionGroup MR::App::__standard_options
 the group of standard options for all commands More...

Function Documentation

◆ run()

void run ( )

◆ usage()

void usage ( )