summaryrefslogtreecommitdiff
path: root/trunk/CIAO/ciao/Client_init.cpp
blob: 15325cf7a4ecc2bf529b868a1be946380be22058 (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
56
// $Id$

#include "Client_init.h"
#include "CIAO_common.h"
#include "CCM_ComponentC.h"
#include "CCM_StandardConfiguratorC.h"
#include "ace/Env_Value_T.h"

int
CIAO::Client_init (CORBA::ORB_ptr o)
{
  CIAO_REGISTER_VALUE_FACTORY (o, Components::Cookie_init,
                               Components::Cookie);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::PortDescription_init,
                               Components::PortDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::FacetDescription_init,
                               Components::FacetDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::ConnectionDescription_init,
                               Components::ConnectionDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::ReceptacleDescription_init,
                               Components::ReceptacleDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::ConsumerDescription_init,
                               Components::ConsumerDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::EmitterDescription_init,
                               Components::EmitterDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::SubscriberDescription_init,
                               Components::SubscriberDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::PublisherDescription_init,
                               Components::PublisherDescription);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::ConfigValue_init,
                               Components::ConfigValue);
  CIAO_REGISTER_VALUE_FACTORY (o, Components::ComponentPortDescription_init,
                               Components::ComponentPortDescription);
  return 0;
}

/// This should really be an anonymous namespace, but some compilers
/// still don't support this features.  Therefore, just use a long
/// namespace name here.
namespace ciao_anonymous_namespace
{
  int debug_level = -1;
}

int
CIAO::debug_level (void)
{
  if (ciao_anonymous_namespace::debug_level == -1)
    {
      // Initialize the thing.
      ACE_Env_Value<int> envar ("CIAO_DEBUG_LEVEL", 1);
      ciao_anonymous_namespace::debug_level = envar;
    }

  return ciao_anonymous_namespace::debug_level;
}