libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | List of all members
integra_api::CPollingNotificationSink Class Reference

Helper class to receive notifications within a single thread. More...

#include "api/polling_notification_sink.h"

Inheritance diagram for integra_api::CPollingNotificationSink:
Inheritance graph
[legend]
Collaboration diagram for integra_api::CPollingNotificationSink:
Collaboration graph
[legend]

Public Types

typedef std::unordered_map
< string, CCommandSource
changed_endpoint_map
 

Public Member Functions

void get_changed_endpoints (changed_endpoint_map &changed_endpoints)
 Polling function. More...
 

Detailed Description

Helper class to receive notifications within a single thread.

CPollingNotificationSink is a helper class for users who wish to receive notifications about changed endpoints within a single thread, for example in an event-driven gui application.

To use it, create an instance of CPollingNotificationSink, and pass a pointer to it via CServerStartupInfo into CIntegraSession::start_session.

To receive notifications about changed endpoints, users should repeatedly call get_changed_endpoints. The method will return the set of endpoints which have been set since the method was last called, mapped to the command source for each set command.

Member Typedef Documentation

Map string-representation of endpoint path to CCommandSource

Member Function Documentation

void integra_api::CPollingNotificationSink::get_changed_endpoints ( changed_endpoint_map changed_endpoints)

Polling function.

/param[out] changed_endpoints This map will be populated with the paths of all control endpoints which have been set since the polling function was last called. Each map entry also stores the CCommandSource relating to why the endpoint was set.


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