unknown.py
Go to the documentation of this file.
1 # -*- Python -*-
2 # -*- coding: utf-8 -*-
3 
4 '''rtctree
5 
6 Copyright (C) 2009-2014
7  Geoffrey Biggs
8  RT-Synthesis Research Group
9  Intelligent Systems Research Institute,
10  National Institute of Advanced Industrial Science and Technology (AIST),
11  Japan
12  All rights reserved.
13 Licensed under the Eclipse Public License -v 1.0 (EPL)
14 http://www.opensource.org/licenses/eclipse-1.0.txt
15 
16 Object representing an unknown node in the tree.
17 
18 '''
19 
20 
21 from rtctree.exceptions import *
22 from rtctree.node import TreeNode
23 
24 
25 ##############################################################################
26 ## Unknown node object
27 
29  '''Node representing an unknown object on a name server.
30 
31  Unknown nodes can occur below name server and directory nodes. They
32  cannot contain any children.
33 
34  '''
35  def __init__(self, name, parent, obj):
36  '''Constructor.
37 
38  @param name Name of this object (i.e. its entry in the path).
39  @param parent The parent node of this node, if any.
40  @param obj The CORBA object to wrap.
41 
42  '''
43  super(Unknown, self).__init__(name, parent)
44  self._obj = obj
45 
46  ###########################################################################
47  # Node functionality
48 
49  @property
50  def is_unknown(self):
51  '''Is this node unknown?'''
52  return True
53 
54  @property
55  def object(self):
56  '''The CORBA object this object wraps.'''
57  with self._mutex:
58  return self._obj
59 
60  ###########################################################################
61  # Internal API
62 
63  def _add_child(self):
64  # Unknowns cannot contain children.
65  raise CannotHoldChildrenError
66 
67 
68 # vim: tw=79
69 
Unknown node object.
Definition: unknown.py:28
def _add_child(self)
Internal API.
Definition: unknown.py:63
def is_unknown(self)
Node functionality.
Definition: unknown.py:50
Base node object.
Definition: node.py:29
def __init__(self, name, parent, obj)
Definition: unknown.py:35


rtctree
Author(s): Geoffrey Biggs
autogenerated on Fri Jun 7 2019 21:56:24