summaryrefslogtreecommitdiff
path: root/TAO/tao/QtResource_Factory.h
blob: 7fe55dd87ab4f32770d0d9e99ac53d3049f2db3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// -*- C++ -*-

//=============================================================================
/**
 *  @file   QtResource_Factory.h
 *
 *  $Id$
 *
 *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
 *  @author Marek Brudka <mbrudka@aster.pl>
 */
//=============================================================================
#ifndef TAO_QTRESOURCE_FACTORY_H
#define TAO_QTRESOURCE_FACTORY_H
#include /**/ "ace/pre.h"

#include "tao/TAO_QtResource_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include <qapplication.h>
#include "tao/GUIResource_Factory.h"

namespace TAO
{

  /** TAO_GUI_Resource_Factory for creating QtReactor.
   *
   * This factory is intended for creating QtReactor for ORB. This
   * factory can be feed into ORB using
   * TAO_ORB_Core::set_gui_resource_factory method which is usually
   * done by TAO_QtResource_Loader.
   */
  class TAO_QtResource_Export QtResource_Factory : public GUIResource_Factory
  {
  public:
    QtResource_Factory (QApplication *qapp_);

    /// Create or obtain current reactor implementation
    virtual ACE_Reactor_Impl *reactor_impl (void);

  private:

    /// Reactor created by this factory.
    ACE_QtReactor *reactor_impl_;

    /// QApplication running reactor
    QApplication *qapp_;
  };
}

#include /**/ "ace/post.h"
#endif /* TAO_QTRESOURCE_FACTORY_H */