IFEM 90A354
IFEM.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _IFEM_H_
15#define _IFEM_H_
16
17#define IFEM_VERSION_STRING "2026.10-pre"
18
19#include "SIMoptions.h"
20#include "LogStream.h"
21
22#ifndef NDEBUG
23#include "ScopedLogger.h"
25#define SCOPED_LOG ScopedLogger no_conflict_logger(__PRETTY_FUNCTION__);
26#else
27#define SCOPED_LOG
28#endif
29
30class ControlFIFO;
31class ControlCallback;
32
33
38class IFEM
39{
40public:
47 static int Init(int arg_c, char** arg_v,
48 const char* title = nullptr, bool silent = false);
50 static void Close();
51
53 static void applyCommandLineOptions(SIMoptions& opt);
55 static SIMoptions& getOptions() { return cmdOptions; }
56
58 static void registerCallback(ControlCallback& cb);
60 static bool pollControllerFifo();
61
63
64 static std::shared_ptr<std::ostringstream> memoryLog;
65
66private:
68 static int argc;
69 static char** argv;
70 static ControlFIFO* fifo;
71};
72
73#endif
Log stream class.
Class for encapsulation of general simulation options.
Scoped logger.
Callback for FIFO option handling.
Definition ControlFIFO.h:28
This class enables simple application control over a FIFO.
Definition ControlFIFO.h:45
Class holding global IFEM configuration.
Definition IFEM.h:39
static void applyCommandLineOptions(SIMoptions &opt)
Applies command-line argument values to the general input options.
Definition IFEM.C:204
static char ** argv
The command-line arguments.
Definition IFEM.h:69
static void Close()
Closes the IFEM library.
Definition IFEM.C:180
static SIMoptions cmdOptions
General input options.
Definition IFEM.h:67
static int Init(int arg_c, char **arg_v, const char *title=nullptr, bool silent=false)
Initializes the IFEM library.
Definition IFEM.C:41
static void registerCallback(ControlCallback &cb)
Registers a fifo instruction callback.
Definition IFEM.C:189
static bool pollControllerFifo()
Polls the control fifo for instructions.
Definition IFEM.C:195
static std::shared_ptr< std::ostringstream > memoryLog
Logging data stored in memory.
Definition IFEM.h:64
static utl::LogStream cout
Combined standard out for parallel processes.
Definition IFEM.h:62
static ControlFIFO * fifo
Control fifo helper.
Definition IFEM.h:70
static int argc
The number of command-line arguments.
Definition IFEM.h:68
static SIMoptions & getOptions()
Returns a reference to the general input options.
Definition IFEM.h:55
Class for encapsulation of general simulation options.
Definition SIMoptions.h:37
Logging stream class.
Definition LogStream.h:26