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:
@@ -190,7 +190,7 @@ extern "C" {
|
||||
|
||||
********************************************************************/
|
||||
|
||||
int DLLEXPORT ENaddnode(char *id, int nodeType);
|
||||
int DLLEXPORT ENaddnode(char *id, int nodeType, int *index);
|
||||
|
||||
int DLLEXPORT ENdeletenode(int index, int actionCode);
|
||||
|
||||
@@ -252,7 +252,7 @@ extern "C" {
|
||||
|
||||
********************************************************************/
|
||||
|
||||
int DLLEXPORT ENaddlink(char *id, int linkType, char *fromNode, char *toNode);
|
||||
int DLLEXPORT ENaddlink(char *id, int linkType, char *fromNode, char *toNode, int *index);
|
||||
|
||||
int DLLEXPORT ENdeletelink(int index, int actionCode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user