convManIntToName()
Converts an integer, which corresponds to the manager identifier, to manager name.
Synopsis
int convManIntToName(int manIDInt, string &manName, [bool bNum=true],
[bool bShort=false]);
Parameters
Parameter | Meaning |
---|---|
manIdInt | The manager integer which corresponds to the manager identifier. Use the function convManIdToInt() to get the manager integer. |
manName | The returned manager name , for example, "UI -num 1". |
bNum | If bNum is true, the manager number is included in the result string. |
bShort | If bShort is true, a shortened name is used for the manager type. For example: "EV(2)" instead of "EVENT -num 2". |
Return Value
In the event of an error -1, otherwise 0.
Errors
Incorrect or missing arguments.
Description
Converts an integer, which corresponds to the manager identifier, to manager name. The integer can be get via the function convManIdToInt().
Example
The following example returns first a manager integer, which corresponds to the manager identifier, via the convManIdToInt() function and then converts the integer to a manager name.
main()
{
int manID;
dyn_char managers;
managers = makeDynChar(UI_MAN);
manID = convManIdToInt(UI_MAN, 1);/* Returns an integer which
corresponds
to the manager identifier */
DebugN(manID);
string manName;
convManIntToName(manID, manName); /* Converts the manager
integer to
manager name */
Debug(manName);
}
Example
The example converts a manager integer to manager name. In this example the manager type (manType = 4) is specified as number (the number corresponds to the constant UI_MAN). The manager integer is returned via the convManIdToInt() function and it is converted to a manager name via the convManIntToName() function.
main()
{
int manID;
char manType = 4, manNum = 8, sysNum = 1, replica = 1;
manID = convManIdToInt(manType, manNum,sysNum,replica);
DebugN(manID);
string manName;
convManIntToName(manID, manName);
}
Assignment
Administration of managers..., User administration
Availability
CTRL