示例#1
0
def has_public_destructor(type):
    """returns True, if class has public destructor, False otherwise"""
    assert isinstance(type, class_declaration.class_t)
    return bool(
        algorithm.find_declaration(type.public_members,
                                   type=calldef.destructor_t,
                                   recursive=False))
 def __find_class_by_class_declaration( self, class_decl ):
     found = algorithm.find_declaration( class_decl.parent.declarations
                                         , name=class_decl.name
                                         , type=class_declaration.class_t )
     return found
示例#3
0
文件: type_traits.py 项目: alekob/tce
def has_public_destructor(type):
    """returns True, if class has public destructor, False otherwise"""
    assert isinstance( type, class_declaration.class_t )
    return bool( algorithm.find_declaration( type.public_members
                                             , type=calldef.destructor_t
                                             , recursive=False ) )
示例#4
0
 def __find_class_by_class_declaration( self, class_decl ):
     found = algorithm.find_declaration( class_decl.parent.declarations
                                         , name=class_decl.name
                                         , type=class_declaration.class_t )
     return found