Mir
Public Types | Public Member Functions | List of all members
miral::SetCommandLineHandler Class Reference

Set a handler for any command line options Mir/MirAL does not recognise. This will be invoked if any unrecognised options are found during initialisation. Any unrecognised arguments are passed to this function. The pointers remain valid for the duration of the call only. If set_command_line_handler is not called the default action is to exit by throwing mir::AbnormalExit (which will be handled by the exception handler prior to exiting run(). More...

#include <set_command_line_handler.h>

Public Types

using Handler = std::function< void(int argc, char const *const *argv)>
 

Public Member Functions

 SetCommandLineHandler (Handler const &handler)
 
 ~SetCommandLineHandler ()
 
void operator() (mir::Server &server) const
 

Detailed Description

Set a handler for any command line options Mir/MirAL does not recognise. This will be invoked if any unrecognised options are found during initialisation. Any unrecognised arguments are passed to this function. The pointers remain valid for the duration of the call only. If set_command_line_handler is not called the default action is to exit by throwing mir::AbnormalExit (which will be handled by the exception handler prior to exiting run().

Member Typedef Documentation

◆ Handler

using miral::SetCommandLineHandler::Handler = std::function<void(int argc, char const* const* argv)>

Constructor & Destructor Documentation

◆ SetCommandLineHandler()

miral::SetCommandLineHandler::SetCommandLineHandler ( Handler const &  handler)
explicit

◆ ~SetCommandLineHandler()

miral::SetCommandLineHandler::~SetCommandLineHandler ( )

Member Function Documentation

◆ operator()()

void miral::SetCommandLineHandler::operator() ( mir::Server &  server) const

The documentation for this class was generated from the following file:

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.