LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
line_cli_main.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012-2026, QORE Lab, Imperial College London
3
* All rights reserved.
4
*
5
* `line-cli`'s entry point, and nothing else.
6
*
7
* ITS OWN TRANSLATION UNIT AND NOT AN `#ifdef` IN line_cli.cpp, because an
8
* object file is indivisible. `line_cli.cpp` is compiled once into the static
9
* library `line_cli_core`, which the C ABI links so that a host can reach the
10
* whole CLI vocabulary in-process; a library carrying `main` would drag that
11
* symbol into the shared object R loads, beside the R interpreter's own `main`.
12
* A guard macro would have meant compiling that 10,700-line, ~15-minute,
13
* multi-gigabyte translation unit TWICE, once per definition of the macro.
14
*
15
* So the split costs one file and zero rebuilds, and the file is this short on
16
* purpose: everything it used to do now lives in `line::cli::main_body`, where
17
* the in-process caller runs it too and the two cannot drift.
18
*/
19
20
#include "
line/cli/cli_run.h
"
21
22
int
main
(
int
argc,
char
** argv) {
return
line::cli::main_body
(argc, argv); }
cli_run.h
The CLI's argument vector, reachable in-process.
main
int main(int argc, char **argv)
Definition
ldes_cli.cpp:407
line::cli::main_body
int main_body(int argc, char **argv)
The binary's main, so line_cli_main.cpp stays ten lines.
Definition
line_cli.cpp:12220
src
cli
line_cli_main.cpp
Generated by
1.18.0