bridgepoint/ooaofooa.py
def is_contained_in(pe_pe, root):
    '''
    Determine if a PE_PE is contained within a EP_PKG or a C_C.
    '''
    if not pe_pe:
        return False
    
    if type(pe_pe).__name__ != 'PE_PE':
        pe_pe = one(pe_pe).PE_PE[8001]()
    
    ep_pkg = one(pe_pe).EP_PKG[8000]()
    c_c = one(pe_pe).C_C[8003]()
    
    if root in [ep_pkg, c_c]:
        return True
    
    elif is_contained_in(ep_pkg, root):
        return True
    
    elif is_contained_in(c_c, root):
        return True
    
    else:
        return False
def is_contained_in(pe_pe, root):
    '''
    Determine if a PE_PE is contained within a EP_PKG or a C_C.
    '''
    if not pe_pe:
        return False
    
    if type(pe_pe).__name__ != 'PE_PE':
        pe_pe = one(pe_pe).PE_PE[8001]()
    
    ep_pkg = one(pe_pe).EP_PKG[8000]()
    c_c = one(pe_pe).C_C[8003]()
    
    if root in [ep_pkg, c_c]:
        return True
    
    elif is_contained_in(ep_pkg, root):
        return True
    
    elif is_contained_in(c_c, root):
        return True
    
    else:
        return False
def is_contained_in ( pe_pe , root ) : if not pe_pe : return False if type ( pe_pe ) . __name__ != 'PE_PE' : pe_pe = one ( pe_pe ) . PE_PE [ 8001 ] ( ) ep_pkg = one ( pe_pe ) . EP_PKG [ 8000 ] ( ) c_c = one ( pe_pe ) . C_C [ 8003 ] ( ) if root in [ ep_pkg , c_c ] : return True elif is_contained_in ( ep_pkg , root ) : return True elif is_contained_in ( c_c , root ) : return True else : return False
Determine if a PE_PE is contained within a EP_PKG or a C_C.
Determine if a PE_PE is contained within a EP_PKG or a C_C .