UHD 003.000.001
Typedefs | Functions

uhd::warning Namespace Reference

Typedefs

typedef boost::function< void(std::string)> handler_t
 Callback function type for a message handler.

Functions

UHD_API void post (const std::string &msg)
UHD_API void register_handler (const std::string &name, const handler_t &handler)
UHD_API handler_t unregister_handler (const std::string &name)
UHD_API const std::vector
< std::string > 
registry_names (void)

Typedef Documentation

typedef boost::function<void(std::string)> uhd::warning::handler_t

Callback function type for a message handler.


Function Documentation

UHD_API void uhd::warning::post ( const std::string &  msg)

Post a warning message to all registered handlers.

Parameters:
msgthe multiline warning message
UHD_API void uhd::warning::register_handler ( const std::string &  name,
const handler_t &  handler 
)

Register a new handler with this name. If the name was already registered for this name, the old registered handler will be replaced.

Parameters:
namea unique name for this handler
handlerthe callback handler function
UHD_API const std::vector<std::string> uhd::warning::registry_names ( void  )

Get a list of registered handler names.

Returns:
a vector of unique string names
UHD_API handler_t uhd::warning::unregister_handler ( const std::string &  name)

Unregister a handler for this name.

Parameters:
namea unique name for a registered handler
Returns:
the handler that was registered
Exceptions:
errorwhen the name was not found in the registry
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines