Methods for using objects of the idtype class.
Methods for using objects of the idtype class.
static IDType alloc(
int id = 0,
int id2 = 0,
int id3 = 0,
char* stringid = "")
Create a new ID of type IDType. The object must be deleted again using idtype::release.
Name | Type | Default | Description |
Return | IDType | A new object of type IDType | |
id | int | 0 | First int value of ID or 0 |
id2 | int | 0 | Second int value of ID or 0 |
id3 | int | 0 | Third int value of ID or 0 |
stringid | String or | char* | "" StringID of ID or "" |
IDType str = idtype::alloc (1);
IDType str = idtype::alloc (1, 0, 0, "my StringID");
static IDType clone(IDType id)
Create a clone of an existing ID. The object must be deleted again using idtype::release.
Name | Type | Default | Description |
Return | IDType | A new object of type IDType | |
id | IDType | - | Original ID of type IDType |
IDType str = idtype::clone (myID);
static void release(IDType id)
Delete an idtype object created using idtype::alloc or idtype::clone
Name | Type | Default | Description |
str | IDType | - | Delete an object from the memory |
IDType id = idtype::alloc (); : : idtype::release (id);
static IDType copy(IDType i1, IDType i2)
Copy the contents of one ID to another. The contents of i2 will by copied to i1.
Name | Type | Default | Description |
Return | IDType | i1 will be returned for a better usage | |
i1 | IDType | - | Change this ID |
i2 | IDType | - | Use this ID to change i1 |
static int id(IDType ID)
Get the first number of a given ID.
Name | Type | Default | Description |
Return | int | First number of a given ID of type IDType | |
ID | IDType | - | Valid object of type IDType |
static int id2(IDType ID)
Get the second number of a given ID.
Name | Type | Default | Description |
Return | int | Second number of a given ID of type IDType | |
ID | IDType | - | Valid object of type IDType |
static int id3(IDType ID)
Get the third number of a given ID.
Name | Type | Default | Description |
Return | int | Third number of a given ID of type IDType | |
ID | IDType | - | Valid object of type IDType |
static char* stringid(IDType ID)
Get the string id of a given ID. Do not change nor delete this return value!
Name | Type | Default | Description |
Return | char * | StringID number of a given ID of type IDType
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
ID | IDType | - | Valid object of type IDType |
static int set_id(IDType ID, int i)
Set the first number of a given ID.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
ID | IDType | - | Valid object of type IDType |
i | int | - | New value for first number |
static int set_id2(IDType ID, int i)
Set the second number of a given ID.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
ID | IDType | - | Valid object of type IDType |
i | int | - | New value for second number |
static int set_id3(IDType ID, int i)
Set the third number of a given ID.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
ID | IDType | - | Valid object of type IDType |
i | int | - | New value for third number |
static int set_stringid(IDType ID, char* si)
Set the string id of a given ID.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
ID | IDType | - | Valid object of type IDType |
si | String or char* | - | New value for the string id |
static int is_equal(IDType ID1, IDType ID2)
Compare two IDType objects. Two IDs are equal if they point to the same object (may be 0) or if they have three identical numbers and the same string id.
Name | Type | Default | Description |
Return | int | 0 : not equal 1 : equal |
|
ID1 | IDType | - | Valid object of type IDType or 0 |
ID2 | IDType | - | Valid object of type IDType or 0 |
static char* record_id(char* stringId)
Get the Record.Id of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSRecordId.
Name | Type | Default | Description |
Return | char * | Record.Id of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* group_id(char* stringId)
Get the Record.GroupId of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSGroupId.
Name | Type | Default | Description |
Return | char * | Record.GroupId of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String oder char* | - | StringID in PublishingServer schema |
static char* entity_id(char* stringId)
Get the Entity.Id of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSEntityId.
Name | Type | Default | Description |
Return | char * | Entity.Id of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* entity_class(char* stringId)
Get the Entity.Class of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSEntityClass.
Name | Type | Default | Description |
Return | char * | Entity.Class of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* parent_record_id(char* stringId)
Get the Record.ParentId of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSParentRecordId.
Name | Type | Default | Description |
Return | char * | Record.ParentId of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* parent_group_id(char* stringId)
Get the Record.ParentGroupId of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSParentGroupId.
Name | Type | Default | Description |
Return | char * | Record.ParentGroupId of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* parent_entity_id(char* stringId)
Get the Entity.ParentId of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSParentEntityId.
Name | Type | Default | Description |
Return | char * | Entity.ParentId of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* parent_entity_class(char* stringId)
Get the Entity.ParentClass of a StringID in PublishingServer schema. In placeholder scripts, the result corresponds to the value of gPSParentEntityClass.
Name | Type | Default | Description |
Return | char * | Entity.ParentClass of the StringID.
The return value is read only, do NOT CHANGE. The result will be overridden on following calls to the function. See here to learn more about functions returning r/o char* values. |
|
stringId | String or char* | - | StringID in PublishingServer schema |
static char* to_xml(IDType object, char* rootElementName = "recordid")
Generate a XML structure of a IDType object.
If you think about using this function, you might be interested in further information about cscript / java interaction. Related information can be found here.
Name | Type | Default | Description |
Return | char * | xml string or 0 on errors. The result string is valid until the next time a to_xml function is called and must not be changed or released. | |
list | IDType | - | object |
rootElementName | String or char* | recordid | name of the root element |
static IDType from_xml(char* xml)
Create a IDType object from a xml structure.
If you think about using this function, you might be interested in further information about cscript / java interaction. Related information can be found here.
Alphabetic index HTML hierarchy of classes or Java