Trees | Indices | Help |
|
---|
|
1 # Copyright 2004-2008 Roman Yakovenko. 2 # Distributed under the Boost Software License, Version 1.0. (See 3 # accompanying file LICENSE_1_0.txt or copy at 4 # http://www.boost.org/LICENSE_1_0.txt) 5 6 """ 7 this module contains class that keeps dependency information of some declaration 8 """ 9 10 import cpptypes6214 object.__init__( self ) 15 #prevent recursive import 16 import class_declaration 17 assert isinstance( depend_on_it, ( class_declaration.class_t, cpptypes.type_t ) ) 18 self._declaration = declaration 19 self._depend_on_it = depend_on_it 20 self._access_type = access_type 21 self._hint = hint22 23 @property 26 #short name 27 decl = declaration 28 29 @property 3236 self._access_type = access_type37 access_type = property( _get_access_type, _set_access_type ) 3840 return 'declaration "%s" depends( %s ) on "%s" ' \ 41 % ( self.declaration, self.access_type, self.depend_on_it )42 43 @property45 """the declaration, that report dependency can put some additional inforamtion 46 about dependency. It can be used later""" 47 return self._hint4850 """if declaration depends on other declaration and not on some type 51 this function will return reference to it. Otherwise None will be returned 52 """ 53 #prevent recursive import 54 from pygccxml import declarations 55 56 if isinstance( self.depend_on_it, declarations.declaration_t ): 57 return self.depend_on_it 58 base_type = declarations.base_type( declarations.remove_alias( self.depend_on_it ) ) 59 if isinstance( base_type, cpptypes.declarated_t ): 60 return base_type.declaration 61 return None
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 20 08:51:39 2008 | http://epydoc.sourceforge.net |