DMGETMETADATA(5ICD)

NAME
dmGetMetaDesignData, dmPutMetaDesignData - get/put meta design data

SYNOPSIS

#include "dmincl.h"
char *dmGetMetaDesignData (request, dmproject [, arg]... )
int request;
DM_PROJECT *dmproject;
char *dmPutMetaDesignData (request, dmproject [, arg]... )
int request;
DM_PROJECT *dmproject;

PARAMETERS

request
    the request to be executed.

dmproject
    is a pointer to a valid DM_PROJECT as obtained from dmOpenProject().

DESCRIPTION
The functions dmGetMetaDesignData() and dmPutMetaDesignData() provide access to the meta design data of a project. The requests available for dmGetMetaDesignData() are:

EXISTCELL
    This request checks if the specified cell exists in the specified view of the project.
    Arguments (request, dmproject, cell, view).
    Returns: (int), error = -1, exist = 1, not exist = 0.

EXISTVIEW
    This request checks if the specified view exists in the project.
    Arguments (request, dmproject, view).
    Returns: (int), error = -1, exist = 1, not exist = 0.

PROCESS
    This request can be used to get the design process information (maskdata) that corresponds to the project identified by dmproject. The data will be attached to this project key. If the maskdata has been obtained before with the same process_id (e.g. for another project), dmGetMetaDesignData() will not retrieve it from disk again, but use this information instead.
    Arguments (request, dmproject).
    Returns: (DM_PROCDATA *), error = 0, success > 0.

CELLLIST
    This request will return a pointer to an array of character-pointers pointing to the names of the cells that are present in the specified view of the specified project. To mark the end of the array the last pointer will contain NULL. The array will be attached to the project key that is passed as an argument. If it is already present dmGetMetaDesignData() will assume the information has to be refreshed; it will free the old list before obtaining the new one.
    Arguments (request, dmproject, view).
    Returns: (char **), error = 0, success > 0.

IMPORTEDCELLLIST
    This request will return a pointer to an array of pointers to structures. Each structure will contain the name of a cell that is imported from another project, an alias (unique local name) and a project identification. To mark the end of the array the last pointer will contain NULL. The array will be attached to the project key that is passed as an argument. If it is already present dmGetMetaDesignData() will assume the information has to be refreshed; it will free the old list before obtaining the new one.
    Arguments (request, dmproject, view).
    Returns: (IMPCELL **), error = 0, success > 0.

PROJECTLIST
    This request will return a pointer to an array of character-pointers pointing to the names of the projects that are used in the project dmproject. To mark the end of the array the last pointer will contain NULL.
    Arguments (request, dmproject).
    Returns: (char **), error = 0, success > 0.

CELLEQUIVALENCE
    This request will return a NULL-terminated list of names of cells of the specified range viewtype that are equivalent with the specified domain cell. Currently this request always returns an empty list as no equivalences are yet administered explicitly.
    Arguments (request, dmproject, domain_cell, domain_view, range_view).
    Returns: (char **), error = 0, success > 0.

PROCPATH
    This request must be used to obtain the complete path to a process file for the process that corresponds to the project identified by dmproject.
    Arguments (request, dmproject, filename).
    Returns: (char *), error = 0, success > 0.

FATHERCELL
    This request returns a pointer to a character string containing the name of a fathercell of the specified 'son'cell. Repeated requests with the same specified soncell will return the next fathercell of this soncell on each call. Hence, the 'list' of fathercells can be traversed by repeatedly calling this function with the same soncell argument. If the end of the list is reached NULL will be returned and dmerrno will be set to DME_NOFATH, which should be checked for by the application. The next call for the same soncell will then again return its first fathercell.
    If a soncell is called by the same fathercell more than once, this fathercell is returned only once.
    Calls with different soncell argument values can be intermixed, thereby permitting a 'depth-first' recursive traversal upwards in the hierarchy.
    On the first actual call a static tree-like data structure is built, reflecting the current hierarchical structure of the design. This data structure is not refreshed upon successive calls. Hence this function should only be used by tools that do not affect the hierarchical structure of the design.
    Arguments (request, dmproject, cell, view).
    Returns: (char *), error = 0, success > 0.

CELLISROOT
    This request checks if the specified cell is a rootcell. A rootcell is defined as a cell that is not called by any other cell.
    Arguments (request, dmproject, cell, view).
    Returns: (int), error = -1, root = 1, not a root = 0.

The requests available for dmPutMetaDesignData() are:

IMPORTEDCELLLIST
    This request will add an entry to the imported cell-list. Path is a unix pathname to the directory where the imported project is located.
    Arguments (request, dmproject, cell, alias, view, path).
    Returns: (int), error = -1, success = 0.

CELLEQUIVALENCE
    This request will add an equivalence between two cells of the specified project. Currently this request always succeeds, although the equivalence is not administered yet.
    Arguments (request, dmproject, cell1, view1, cell2, view2).
    Returns: (int), error = -1, success = 0.

DIAGNOSTICS
If an error condition occurs, dmerrno will be set, and a call to function dmError() will be done. This might happen in the following cases:

DME_BADNAME
    Cell name not correct.

DME_PRID
    Unknown process.

DME_PRDATA
    Cannot read the process data file.

DME_PRREAD
    Process data read error. Process data file not in correct format.

DME_CORE
    Cannot allocate enough core.

DME_BADVIEW
    Unknown view specified.

FILES
view/celllist	List of cells.
view/impcelllist	List of imported cells.
view/cell		Cell directory in view.
ICDPATH/lib/process/processlist	List of all processes.
ICDPATH/lib/process/process/maskdata	Mask data of a process.

SEE ALSO
dmTestname(5ICD).