![]() |
Stan
2.14.0
probability, sampling & optimization
|
#include <stan/version.hpp>
#include <stan/lang/compiler.hpp>
#include <stan/io/cmd_line.hpp>
#include <exception>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <string>
Go to the source code of this file.
Functions | |
void | print_version (std::ostream *out_stream) |
Print the version of stanc with major, minor and patch. More... | |
void | print_stanc_help (std::ostream *out_stream) |
Prints the Stan compiler (stanc) help. More... | |
void | delete_file (std::ostream *err_stream, const std::string &file_name) |
Delte the file at the specified path, writing messages to error stream if not possible. More... | |
int | stanc_helper (int argc, const char *argv[], std::ostream *out_stream, std::ostream *err_stream) |
Invoke the stanc command on the specified argument list, writing output and error messages to the specified streams, return a return code. More... | |
void delete_file | ( | std::ostream * | err_stream, |
const std::string & | file_name | ||
) |
Delte the file at the specified path, writing messages to error stream if not possible.
Do nothing on zero size file name input. Only write to error stream if it is non-null.
[in,out] | err_stream | stream to which error messages are written |
[in] | file_name | path of file |
Definition at line 74 of file stanc_helper.hpp.
void print_stanc_help | ( | std::ostream * | out_stream | ) |
Prints the Stan compiler (stanc) help.
[in,out] | out_stream | stream to which help is written |
Definition at line 34 of file stanc_helper.hpp.
void print_version | ( | std::ostream * | out_stream | ) |
Print the version of stanc with major, minor and patch.
[in,out] | out_stream | stream to which version is written. |
Definition at line 18 of file stanc_helper.hpp.
int stanc_helper | ( | int | argc, |
const char * | argv[], | ||
std::ostream * | out_stream, | ||
std::ostream * | err_stream | ||
) |
Invoke the stanc command on the specified argument list, writing output and error messages to the specified streams, return a return code.
The return codes are: 0 for success, -1 for an exception, -2 is parsing failed, and -3 if there are invalid arguments.
[in] | argc | number of arguments |
[in] | argv | arguments |
[in,out] | out_stream | stream to which output is written |
[in,out] | err_stream | stream to which error messages are written |
Definition at line 100 of file stanc_helper.hpp.