next up previous contents index
Next: Link Functions Up: Site Functions Previous: Functions for the

Functions for the Manipulation of Sites

 

bool krui_setFirstSite( void )
initializes the first site of the current unit, i.e. the first site of the current unit becomes current site. If the current unit doesn't have sites, FALSE is returned, else TRUE. bool krui_setNextSite( void )
initializes the next site of the current unit. If the unit doesn't have more sites, FALSE is returned. krui_err krui_setSite( char *site_name )
initializes the given site of the current unit. An error code is generated if the unit doesn't have sites, the site name is invalid, or the unit doesn't have a site with that name. FlintType krui_getSiteValue()
char *krui_getSiteFuncName()
returns the name/value of the site function of the current site. char *krui_getSiteName()
returns the name of the current site. krui_err krui_setSiteName( char *site_name )
changes the name (and thereby also the site function) of the current site. An error code is returned if the site name is unknown. The f-type of the unit is erased. krui_err krui_addSite( char *site_name )
adds a new site to the current unit. The new site is inserted in front, i.e. it becomes the first site of the unit. Therefore it is possible to make the new site current by a call to krui_setFirstSite(). krui_addSite(...) has no effect on the current site! Error codes are generated if the unit has direct input connections, the site name is invalid, or problems with the memory allocation occurred. The functionality type of the unit will be cleared. bool krui_deleteSite()
deletes the current site of the current unit and all input connections to that site. The functionality type of the unit is also erased. krui_setFirstSite() or krui_setNextSite() has to be called before at least once, to confirm the current site/unit. After the deletion the next available site becomes current. The return code is TRUE if further sites exist, else FALSE. The following program is sufficient to delete all sites of a unit:

if ( krui_setFirstSite() )
  while ( krui_deleteSite() ) { }



next up previous contents index
Next: Link Functions Up: Site Functions Previous: Functions for the



Niels Mache
Wed May 17 11:23:58 MET DST 1995