SomRegisterId: Difference between revisions
Appearance
Created page with "This function registers a SOM ID and determines whether or not it was previously registered. ==Syntax== <PRE> somId id; int rc; rc = somRegisterId(id); </PRE> ==Par..." |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:somRegisterId}} | |||
This function registers a SOM ID and determines whether or not it was previously registered. | This function registers a SOM ID and determines whether or not it was previously registered. | ||
Line 13: | Line 14: | ||
==Return Code== | ==Return Code== | ||
; rc (int) : | ; rc (int): | ||
:Returns 0 if the ID is already registered. | |||
:Returns 1 if the ID is not already registered. | |||
==Remarks== | ==Remarks== | ||
Line 35: | Line 35: | ||
==Related== | ==Related== | ||
;Data Structures | |||
* somId (sombtype.h) | * somId (sombtype.h) | ||
;Functions | |||
* somCheckId | * [[somCheckId]] | ||
* somIdFromString | * [[somIdFromString]] | ||
* somStringFromId | * [[somStringFromId]] | ||
* somCompareIds | * [[somCompareIds]] | ||
* somTotalRegIds | * [[somTotalRegIds]] | ||
* somSetExpectedIds | * [[somSetExpectedIds]] | ||
* somUniqueKey | * [[somUniqueKey]] | ||
* somBeginPersistentIds | * [[somBeginPersistentIds]] | ||
* somEndPersistentIds | * [[somEndPersistentIds]] | ||
[[Category:SOM | [[Category:SOM function]] |
Latest revision as of 02:36, 6 May 2020
This function registers a SOM ID and determines whether or not it was previously registered.
Syntax
somId id; int rc; rc = somRegisterId(id);
Parameters
- id (somId)
Return Code
- rc (int)
- Returns 0 if the ID is already registered.
- Returns 1 if the ID is not already registered.
Remarks
This function registers a SOM ID and converts it into an internal representation. If the ID is already registered, this function returns 0 and has no effect. Otherwise, this function returns 1.
Example Code
#include <som.h> static string s = "unregistered"; static somId sid = &s; main() { somEnvironmentNew(); SOM_Test(somRegisterId(sid) == 1); SOM_Test(somRegisterId(somIdFromString("registered")) == 0); }
Related
- Data Structures
- somId (sombtype.h)
- Functions