20.01.2014 Views

SIS - Application Programmatic Interface, Reference Manual - ICS ...

SIS - Application Programmatic Interface, Reference Manual - ICS ...

SIS - Application Programmatic Interface, Reference Manual - ICS ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SIS</strong>- <strong>Application</strong> <strong>Programmatic</strong> <strong>Interface</strong>, <strong>Reference</strong> <strong>Manual</strong><br />

int set_current_node_id(int sessionID, int nodeid)<br />

Set current node the object with system identifier nodeid. This object is now at<br />

the top of the name stack and if it is a link object the name stack is changed<br />

properly (see section 4 where name stack is described).<br />

int reset_name_scope(int sessionID)<br />

Set current name scope the whole <strong>SIS</strong> base. The next set_current_node() will<br />

refer to a class node.<br />

int pop_name_scope(int sessionID)<br />

Go one level below the current name scope. Useful when you have set for<br />

example as current node an attribute of some class and want to refer to (set<br />

current node) another attribute of the same class.<br />

int set_categories(int sessionID, categories_set categs)<br />

Set the categories for any subsequent call of some special recursive query.<br />

Whenever this function is called, any previous set of categories is deleted. The<br />

data type used for defining the categories is described in section 6.8.1.<br />

int set_depth(int sessionID, int depth)<br />

Set the depth the recursive queries are going to traverse links, starting from a<br />

node object. If depth is a negative integer recursive queries traverse links with<br />

no limit to depth.<br />

6.3 Queries<br />

Here follows the set of functions that query the <strong>SIS</strong> data base and calculate and<br />

answer. The first group consists of very simple queries that give the system identifier<br />

of an object if we know the logical name and vice versa. The other two groups consist<br />

of functions that apply on the current node or on each object in a temporary set,<br />

calculate an answer and put it into a new temporary set.<br />

6.3.1 Low level queries<br />

These functions return APISucc(0) on success and APIFail(-1) on error.<br />

int get_classid(int sessionID, l_name lname, int *sysid)<br />

Given the logical name lname of a node object, the function returns the system<br />

identifier sysid of this object.<br />

int get_linkid(int sessionID, l_name fromcls, l_name label, int *sysid)<br />

Given the logical name label of a link object, the function returns the system<br />

identifier sysid of this object. Since the logical name of a link object may not<br />

be unique in the <strong>SIS</strong> base, the logical name fromcls of the node object the link<br />

is pointing from must be given.<br />

August 2002/v2.2.2 -12- <strong>ICS</strong>-FORTH

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!