Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / Trading_Service / Trading_Service.h
blob8caed4cca02d5e8fd8893caa3ccc4354d4ed2f0f
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Trading_Service.h
7 * @author Seth Widoff <sbw1@cs.wustl.edu>
8 */
9 //=============================================================================
12 #ifndef _TRADING_SERVICE_H
13 #define _TRADING_SERVICE_H
15 #include "ace/Auto_Ptr.h"
16 #include "ace/Sig_Handler.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "orbsvcs/IOR_Multicast.h"
23 #include "orbsvcs/Trader/Trader.h"
24 #include "orbsvcs/Trader/Service_Type_Repository.h"
25 #include "orbsvcs/Trader/Trading_Loader.h"
27 class Trading_Service;
29 /**
30 * @class Trading_Shutdown
32 * @brief A class that shutsdown a Trading Service instance.
34 class Trading_Shutdown : public ACE_Event_Handler
36 public:
37 /// Constructor.
38 Trading_Shutdown (Trading_Service& trader);
40 /// Signal handler.
41 virtual int handle_signal (int,
42 siginfo_t *,
43 ucontext_t *);
45 protected:
46 Trading_Service &trader_;
47 ACE_Sig_Handler shutdown_;
50 /**
51 * @class Trading_Service
53 * @brief A class that initializes a Trading Service instance.
55 class Trading_Service
57 public:
59 /// Default constructor.
60 Trading_Service (void);
62 /// Destructor
63 ~Trading_Service (void);
65 /// Initialize the Trading Service with arguments.
66 int init (int argc,
67 ACE_TCHAR *argv[]);
69 /// Run the Trading Service.
70 int run (void);
72 int shutdown (void);
74 protected:
76 /// Pointer to the linked trader.
77 auto_ptr<TAO_Trader_Factory::TAO_TRADER> trader_;
79 /// Instance of TAO_Trading_Laoder
80 TAO_Trading_Loader trading_loader_;
83 #endif /* _TRADING_SERVICE_H */