 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
124 msg =
build(msg, addType);
136 msg =
build(msg, addType);
213 if (oc.
getBool(
"no-warnings")) {
217 if (oc.
isSet(
"log",
false)) {
220 if (!oc.
getBool(
"no-warnings")) {
225 if (oc.
isSet(
"message-log",
false)) {
229 if (oc.
isSet(
"error-log",
false)) {
256 myType(type), myWasInformed(false) {
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
static void initOutputOptions()
init output options
bool wasInformed() const
Returns the information whether any messages were added.
Static storage of an output device and its base (abstract) implementation.
static void removeRetrieverFromAllInstances(OutputDevice *out)
ensure that that given output device is no longer used as retriever by any instance
The message is only something to show.
The message is a warning.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list
bool isRetriever(OutputDevice *retriever) const
Returns whether the given output device retrieves messages from the handler.
virtual void beginProcessMsg(std::string msg, bool addType=true)
Begins a process information.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
std::string build(const std::string &msg, bool addType)
Builds the string which includes the mml-message type.
bool myWasInformed
information wehther an error occurred at all
static void cleanupOnEnd()
Removes pending handler.
static MsgHandler * myErrorInstance
The instance to handle errors.
static bool myAmProcessingProcess
Information whether a process information is printed to cout.
virtual void clear()
Clears information whether an error occurred previously.
static void enableDebugGLMessages(bool enable)
enable/disable gl-debug messages
MsgHandler *(* Factory)(MsgType)
static MsgHandler * myWarningInstance
The instance to handle warnings.
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
virtual void endProcessMsg(std::string msg)
Ends a process information.
MsgHandler(MsgType type)
standard constructor
static bool myWriteDebugGLMessages
static MsgHandler * getGLDebugInstance()
Returns the instance to add GLdebug to.
static Factory myFactory
The function to call for new MsgHandlers, nullptr means use default constructor.
A storage for options typed value containers)
static MsgHandler * myMessageInstance
The instance to handle normal messages.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
static MsgHandler * myDebugInstance
The instance to handle debug.
static MsgHandler * getDebugInstance()
Returns the instance to add debug to.
virtual void addRetriever(OutputDevice *retriever)
Adds a further retriever to the instance responsible for a certain msg type.
std::vector< OutputDevice * > myRetrievers
The list of retrievers that shall be informed about new messages or errors.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
static MsgHandler * myGLDebugInstance
The instance to handle glDebug.
static bool myWriteDebugMessages
Flag to enable or disable debug GL Functions.
virtual ~MsgHandler()
destructor
virtual void removeRetriever(OutputDevice *retriever)
Removes the retriever from the handler.
static void enableDebugMessages(bool enable)
enable/disable debug messages
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.