NAG CPP Interface
iomanager::IOManager
#include "include/utility/nagcpp_iomanager.hpp"
class IOManager : IOManagerBase
1
Description
A class for translating between std::istream or std::ostream (referred to as Input channel and Output channel respectively in the rest of this documentation) and the Input/Output unit numbers used in the algorithmic engine.
The Input/Output unit numbers (usually just referred to as unit numbers) are roughly synonymous with Unix file descriptors, with Input channels registered to a particular unit number using
IOManager::register_istream and Output channels using
IOManager::register_ostream.
Resource management (opening/closing/deleting etc. files) remains the reponsibility of the user. In particular, files used for channels must have been opened before their associated unit numbers are used.
When a channel is no longer required it may be deregistered by calling
IOManager::deregister_ostream or
IOManager::deregister_istream. The special nature of the error unit and the advisory unit means that these must have persistent channel associations; therefore if a channel associated with their unit number is deregistered then they are reset to their default values.
A global variable
GLOBAL_IOMANAGER is supplied for convenience and will be used by all functions unless it is specifically overridden in the optional argument class as described in
Optional Arguments.
2
Variables
None.
3
Methods