Return object index from EN_addnode and EN_addlink (issue #432)

Adds an output argument to EN_addnode and EN_addlink that returns the index of the newly added object.
Also refactors the validity check on object ID names.
This commit is contained in:
Lew Rossman
2019-04-18 07:00:07 -04:00
parent 4494db8f56
commit 1583bea154
18 changed files with 149 additions and 154 deletions

View File

@@ -141,7 +141,7 @@ These are symbolic constants used as function arguments.
/**
@addtogroup Nodes
@{
@fn int EN_addnode(EN_Project ph, char *id, int nodeType)
@fn int EN_addnode(EN_Project ph, char *id, int nodeType, int *index)
@fn int EN_deletenode(EN_Project ph, int index, int actionCode)
@fn int EN_getnodeindex(EN_Project ph, char *id, int *index)
@fn int EN_getnodeid(EN_Project ph, int index, char *id)
@@ -175,7 +175,7 @@ These are symbolic constants used as function arguments.
/**
@addtogroup Links
@{
@fn int EN_addlink(EN_Project ph, char *id, int linkType, char *fromNode, char *toNode)
@fn int EN_addlink(EN_Project ph, char *id, int linkType, char *fromNode, char *toNode, int *index)
@fn int EN_deletelink(EN_Project ph, int index, int actionCode)
@fn int EN_getlinkindex(EN_Project ph, char *id, int *index)
@fn int EN_getlinkid(EN_Project ph, int index, char *id)