Function set_name

Summary

#include "breeze/process/program.hpp"

(1) void set_name(int argc, char const *const *argv)

(2) void set_name(int argc, char const *const *argv, std::string const &fallback)

(3) void set_name(std::string const &name)

Function overload

Synopsis

#include "breeze/process/program.hpp"

void set_name(int argc, char const *const *argv)

Description

Sets the program name from the arguments to main(), if argv[ 0 ] points to a non-empty name (i.e. if argc > 0 && argv[ 0 ][ 0 ] != '\0'). Otherwise does nothing.

If the name is set, any leading path is stripped.

Precondition
No name was set before
Postcondition
none

Source

Line 93 in breeze/process/program.hpp.

Synopsis

#include "breeze/process/program.hpp"

void set_name(int argc, char const *const *argv, std::string const &fallback)

Description

Sets the program name from the arguments to main(), if argv[ 0 ] points to a non-empty name; otherwise sets it from fallback.

In any case, any leading path is stripped.

Precondition
! fallback.empty() and no name was set before
Postcondition
name().is_valid()

Source

Line 107 in breeze/process/program.hpp.

Synopsis

#include "breeze/process/program.hpp"

void set_name(std::string const &name)

Description

Sets the program name to name, with any leading path stripped.

Precondition
! name.empty() and no name was set before
Postcondition
name().is_valid()

Source

Line 119 in breeze/process/program.hpp.