Thread: Creating events and registering to them in C++

  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Question Creating events and registering to them in C++

    Hello,

    I am thinking about a hierachy for my application, and I need some advice regarding it. I want to build a library using c++ which will serve as an abstraction layer between applications and low-level process. The library will provide some APIs for the applications for some purposes.

    For example the low-level process, may send an indication to the library i.e. raise an event, and the library in turns send it to all the applications, which have their registered callbacks to this library.

    If anyone can you provide me with an example for the previous scenario in c++ using boost library or the standard library will be perfect in Linux environment? The example that I want is: Generate event from a process and pass it to the library, then let an application register callback to the library.

    Initially I know in Linux, I may use signal to send events, but my plan is to have a something more general not tighten to a specific OS.

    Thanks a lot.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,665
    These kind of signals perhaps?
    Chapter 28. Boost.Signals2 - 1.55.0
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Registering VCE2005
    By ulillillia in forum Tech Board
    Replies: 11
    Last Post: 04-04-2009, 08:25 AM
  2. Self-registering Components
    By CornedBee in forum C++ Programming
    Replies: 23
    Last Post: 01-16-2005, 01:22 PM
  3. registering a domain
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 06-28-2004, 01:13 PM
  4. Registering DLL
    By ccopp in forum Windows Programming
    Replies: 1
    Last Post: 10-08-2001, 10:41 PM
  5. registering a tld
    By iain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 09-20-2001, 07:38 PM

Tags for this Thread