def _pretty_print_aux(p, r, paramdecllist_, roledecllist_, body): text = "" text = text + constants.LOCAL_KW + ' ' + constants.PROTOCOL_KW + ' ' text = text + p + ' ' text = text + constants.AT_KW + ' ' + role_get_role_name(r) if util.get_node_type(paramdecllist_) != \ parameterdecllist_EMPTY_PARAMETER_DECL_LIST: text = text + parameterdecllist_pretty_print(paramdecllist_) text = text + roledecllist_pretty_print(roledecllist_) child = body if util.get_node_type(child) == constants.LOCAL_PROTOCOL_DEF_NODE_TYPE: text = text + localprotocoldef_pretty_print(child) else: raise RuntimeError("TODO:", util.get_node_type(child)) return text
def get_source(node_): return role_get_role_name(get_source_child(node_))
def get_local_role_name(node_): return role_get_role_name(get_local_role_child(node_))
def get_destinations(node_): dests = [] for child in get_destination_children(node_): dests.append(role_get_role_name(child)) return dests