regarding Event Handling in c++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raghaw
    New Member
    • Sep 2008
    • 7

    regarding Event Handling in c++

    Hi All ,
    The Problem on which iam stuck is as follows:
    I have a header file named as CRingBuffer in which there is a class which contains the methods for enqueing and dequeing structure variable(its basically a Message).

    Now other Header file is there lets say XYZ.h which contains some threads with methods say RxProcess()
    In Rx Process() when i am suppose to enque a message from socket a event should be raised notifying the system that a message has been enqued.



    How iam suppose to implement it in c++(coding been done on Visual studio 2005)?
    Any ideas,code snippets or suggestions will be highly welcomed.Thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Maybe you can have a look at the observer/observable pattern. The observer(s) register itself at the observable. When some state changes in the observable it notifies its registered observers.

    kind regards,

    Jos

    Comment

    • raghaw
      New Member
      • Sep 2008
      • 7

      #3
      thanx buddy .That Helped me....

      Comment

      Working...