summaryrefslogtreecommitdiff
path: root/examples/Callback_Quoter/Supplier_Timer_Handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Callback_Quoter/Supplier_Timer_Handler.h')
-rw-r--r--examples/Callback_Quoter/Supplier_Timer_Handler.h70
1 files changed, 34 insertions, 36 deletions
diff --git a/examples/Callback_Quoter/Supplier_Timer_Handler.h b/examples/Callback_Quoter/Supplier_Timer_Handler.h
index b359a59e40c..40799b73a52 100644
--- a/examples/Callback_Quoter/Supplier_Timer_Handler.h
+++ b/examples/Callback_Quoter/Supplier_Timer_Handler.h
@@ -1,22 +1,18 @@
/* -*- C++ -*- */
-// $Id$
-
-// ===========================================================
-//
-//
-// = LIBRARY
-// TAO/examples/Callback_Quoter
-//
-// = FILENAME
-// Consumer_Input_Handler.h
-//
-// = DESCRIPTION
-// Definition of the Supplier_Timer_Handler class.
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ===========================================================
+
+//=============================================================================
+/**
+ * @file Supplier_Timer_Handler.h
+ *
+ * $Id$
+ *
+ * Definition of the Supplier_Timer_Handler class.
+ *
+ *
+ * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
+ */
+//=============================================================================
+
#ifndef SUPPLIER_TIMER_HANDLER_H
#define SUPPLIER_TIMER_HANDLER_H
@@ -31,47 +27,49 @@
class Supplier;
+/**
+ * @class Supplier_Timer_Handler
+ *
+ * @brief Feeds stock information to the Callback Quoter notifier
+ * periodically.
+ * = Description
+ * Create a class to handle timer events. Since only timer events
+ * need to be handled, only the handle_timeout method is overlaoded.
+ */
class Supplier_Timer_Handler : public ACE_Event_Handler
{
- // = TITLE
- // Feeds stock information to the Callback Quoter notifier
- // periodically.
- //
- // = Description
- // Create a class to handle timer events. Since only timer events
- // need to be handled, only the handle_timeout method is overlaoded.
public:
+ /// Initilization.
Supplier_Timer_Handler (Supplier *supplier,
- ACE_Reactor *reactor,
+ ACE_Reactor *reactor,
FILE *file_ptr);
- // Initilization.
+ /// Destructor.
~Supplier_Timer_Handler (void);
- // Destructor.
-
+
+ /// Method which will be called by the Reactor when timeout occurs.
virtual int handle_timeout (const ACE_Time_Value &tv,
const void *arg = 0);
- // Method which will be called by the Reactor when timeout occurs.
private:
+ /// The values of the stock and its rate are got from the file.
int get_stock_information (void);
- // The values of the stock and its rate are got from the file.
+ /// The supplier instance.
Supplier *supplier_obj_;
- // The supplier instance.
+ /// Reactor used by the supplier.
ACE_Reactor *reactor_;
- // Reactor used by the supplier.
+ /// The file handle of the file from where the stock input is obtained.
FILE* file_ptr_;
- // The file handle of the file from where the stock input is obtained.
+ /// The name of the stock.
char stockname_[BUFSIZ];
- // The name of the stock.
+ /// The market value of the stock.It will be typecasted to long later.
long value_;
- // The market value of the stock.It will be typecasted to long later.
};
#endif /* SUPPLIER_TIMER_HANDLER_H */