config.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- python -*-
3 #
4 # @file omniidl_be/doil/config.py
5 # @brief configuration module for doil backend
6 # @date $Date$
7 # @author Norkai Ando <n-ando@aist.go.jp>
8 #
9 # Copyright (C) 2008
10 # Task-intelligence Research Group,
11 # Intelligent Systems Research Institute,
12 # National Institute of
13 # Advanced Industrial Science and Technology (AIST), Japan
14 # All rights reserved.
15 #
16 # $Id$
17 #
18 
19 import string
20 import config
21 from omniidl_be.cxx import util
22 
24  def __init__(self):
25  self._config = {
26  # Name of this program
27  'Program Name': 'omniidl (doil adapter backend)',
28  # Useful data from CVS
29  'CVS ID': '$Id$',
30  # Relevant omniORB C++ library version
31  'Library Version': 'omniORB_4_0',
32  # Debug mode
33  'Debug': True,
34  #
35  # generated classes for doil
36  # - doil Interface
37  # - CORBA Servant
38  # - CORBA Adapter
39  # - Ice slice
40  # - Ice servant
41  # - Ice adapter
42  #
43  'Interface': False,
44  'CORBAServant': False,
45  'CORBAAdapter': False,
46  'CORBAProxy': False,
47  'IceSlice': False,
48  'IceServant': False,
49  'IceAdapter': False,
50  'IceProxy': False,
51  #
52  # Type mapping
53  #
54  'MappingFile': '',
55  'TypeMapping': None,
56  #
57  # Additional includes
58  #
59  'IncludeHeaders': [],
60  #
61  #
62  #
63  'ImplicitInclude': False,
64  #
65  # Servant stuff
66  #
67  # Suffix of generated servant class
68  'ServantSuffix': 'Servant',
69  # Prefix of generated servant class
70  'ServantPrefix': '',
71  # Namespace of servant class
72  'ServantNs': [],
73  # servant class header directory
74  'ServantDir': '',
75  #
76  # Adapter stuff
77  #
78  # Suffix of generated servant class
79  'AdapterSuffix': 'Adapter',
80  # Prefix of generated servant class
81  'AdapterPrefix': '',
82  # Namespace of servant class
83  'AdapterNs': [],
84  # servant class header directory
85  'AdapterDir': '',
86  #
87  # Proxy stuff
88  #
89  # Suffix of generated proxy class
90  'ProxySuffix': 'Proxy',
91  # Prefix of generated proxy class
92  'ProxyPrefix': '',
93  # Namespace of proxy class
94  'ProxyNs': [],
95  # proxy class header directory
96  'ProxyDir': '',
97  #
98  # Interface stuff
99  #
100  # Suffix of generated servant class
101  'IfaceSuffix': '',
102  # Prefix of generated servant class
103  'IfacePrefix': 'I',
104  # Namespace of delegated interface class
105  'IfaceNs': [],
106  # interface class header directory
107  'IfaceDir': '',
108  # Base name of file being processed
109  'Basename': None,
110  # Directory name of file being processed
111  'Directory': None
112  }
113 
114  def __getitem__(self, key):
115  if self._config.has_key(key):
116  return self._config[key]
117  util.fatalError("Configuration key not found (" + key + ")")
118 
119  def __setitem__(self, key, value):
120  if self._config.has_key(key):
121  self._config[key] = value
122  return
123  util.fatalError("Configuration key not found (" + key + ")")
124 
125  def dump(self):
126  # find the longest key string
127  max = 0
128  for key in self._config.keys():
129  if len(key) > max: max = len(key)
130  # display the table
131  for key in self._config.keys():
132  print string.ljust(key, max), ": ", repr(self._config[key])
133 
134 # Create state-holding singleton object
135 if not hasattr(config, "state"):
136  config.state = ConfigurationState()
def __setitem__(self, key, value)
Definition: config.py:119
def __getitem__(self, key)
Definition: config.py:114


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:50