Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / orbsvcs / Trading_Service / Trading_Service.h
blob55b8cb5ac5cf04ee090b8be8272d5e55a0b1d39d
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/Sig_Handler.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "orbsvcs/IOR_Multicast.h"
22 #include "orbsvcs/Trader/Trader.h"
23 #include "orbsvcs/Trader/Service_Type_Repository.h"
24 #include "orbsvcs/Trader/Trading_Loader.h"
26 class Trading_Service;
28 /**
29 * @class Trading_Shutdown
31 * @brief A class that shutsdown a Trading Service instance.
33 class Trading_Shutdown : public ACE_Event_Handler
35 public:
36 /// Constructor.
37 Trading_Shutdown (Trading_Service& trader);
39 /// Signal handler.
40 virtual int handle_signal (int,
41 siginfo_t *,
42 ucontext_t *);
44 protected:
45 Trading_Service &trader_;
46 ACE_Sig_Handler shutdown_;
49 /**
50 * @class Trading_Service
52 * @brief A class that initializes a Trading Service instance.
54 class Trading_Service
56 public:
57 Trading_Service () = default;
59 ~Trading_Service ();
61 /// Initialize the Trading Service with arguments.
62 int init (int argc,
63 ACE_TCHAR *argv[]);
65 /// Run the Trading Service.
66 int run ();
68 int shutdown ();
70 protected:
71 /// Instance of TAO_Trading_Laoder
72 TAO_Trading_Loader trading_loader_;
75 #endif /* _TRADING_SERVICE_H */