zombie.py
Go to the documentation of this file.
00001 # -*- Python -*-
00002 # -*- coding: utf-8 -*-
00003 
00004 '''rtctree
00005 
00006 Copyright (C) 2009-2014
00007     Geoffrey Biggs
00008     RT-Synthesis Research Group
00009     Intelligent Systems Research Institute,
00010     National Institute of Advanced Industrial Science and Technology (AIST),
00011     Japan
00012     All rights reserved.
00013 Licensed under the Eclipse Public License -v 1.0 (EPL)
00014 http://www.opensource.org/licenses/eclipse-1.0.txt
00015 
00016 Object representing a zombie node in the tree.
00017 
00018 '''
00019 
00020 
00021 from rtctree.exceptions import *
00022 from rtctree.node import TreeNode
00023 
00024 
00025 ##############################################################################
00026 ## Zombie node object
00027 
00028 class Zombie(TreeNode):
00029     '''Node representing a zombie object on a name server.
00030 
00031     Zombie nodes can occur below name server and directory nodes. They
00032     cannot contain any children. They do not contain a reference to a
00033     CORBA object as they represent the lack of such an object under a
00034     name still registered on the name server.
00035 
00036     '''
00037     def __init__(self, name, parent, *args, **kwargs):
00038         '''Constructor.
00039 
00040         @param name Name of this object (i.e. its entry in the path).
00041         @param parent The parent node of this node, if any.
00042 
00043         '''
00044         super(Zombie, self).__init__(name=name, parent=parent, *args, **kwargs)
00045 
00046     @property
00047     def is_zombie(self):
00048         '''Is this node a zombie?'''
00049         return True
00050 
00051 
00052     ###########################################################################
00053     # Internal API
00054 
00055     def _add_child(self):
00056         # Zombies cannot contain children.
00057         raise CannotHoldChildrenError
00058 
00059 
00060 # vim: tw=79
00061 


rtctree
Author(s): Geoffrey Biggs
autogenerated on Wed Aug 26 2015 16:13:08