Synopsis

PDX_MSGT mda_GetParentsByTF(long option, MDA_PTR db_ptr, DDF_TF tf, long *count, MDA_PTR **parent_list)

Purpose

Retrieve parents of an entity only of a given typeform.

Description

The list of entities which reference db_ptr is returned. The memory to contain the list is allocated by this function and must be freed by the caller. If the caller is not part of libpdx, pdx_Free must be used to free the list. The number of pointers in parent_list is returned in count. If the entity does not have any parents then count will be returned as 0 and no memory will be allocated in parent_list. Note that some pointers in parent_list may be duplicated if a single parent makes multiple references to db_ptr. See the mda_intro man page for more information.

Input

option

Options (not used)

db_ptr

Entity to obtain parents for

tf

Type form of entity to look for

Output

count

Number of referencing pointers

parent_list

Array of referencing entity pointers (must be freed by the caller, using pdx_Free if the caller is not part of libpdx). If NULL only the count will be returned.

Return

MDA error code