summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp
blob: 7eeeaf02ce832a60b997d8d051cb6fb530414f3c (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
#include "orbsvcs/Event/EC_Event_Channel.h"
#include "orbsvcs/Event/EC_Default_Factory.h"
#include "ace/Dynamic_Service.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_EC_Event_Channel::
TAO_EC_Event_Channel (const TAO_EC_Event_Channel_Attributes& attr,
                      TAO_EC_Factory* factory,
                      int own_factory)
  : TAO_EC_Event_Channel_Base (attr, factory, own_factory)
{
  if (this->factory () == nullptr)
    {
      this->factory (
             ACE_Dynamic_Service<TAO_EC_Factory>::instance ("EC_Factory"),
             0);

      if (this->factory () == nullptr)
        {
          TAO_EC_Factory *f = nullptr;
          ACE_NEW (f,
                   TAO_EC_Default_Factory);
          this->factory (f, 1);
        }
    }
  this->scheduler_ =
    CORBA::Object::_duplicate (attr.scheduler);

  this->create_strategies ();
}

TAO_END_VERSIONED_NAMESPACE_DECL