Methods for using objects of the Element class.
Methods for using objects of the Element class.
static Element alloc(
int id = 0,
int id2 = 0,
int id3 = 0,
char* stringid = "")
Create a new object of type Element. The object must be deleted again using element::release.
Name | Type | Default | Description |
Return | Element | A new object of type Element | |
id | int | 0 | First int value of Element or 0 |
id2 | int | 0 | Second int value of Element or 0 |
id3 | int | 0 | Third int value of Element or 0 |
stringid | String or char* | "" | StringID of Element or "" |
Element str = element::alloc (1);
Element str = element::alloc (1, 0, 0, "my StringID");
static void release(Element id)
Delete an element object created using element::alloc
Name | Type | Default | Description |
str | Element | - | Delete an object from the memory |
Element id = element::alloc (); : : element::release (id);
static Element copy(Element e1, Element e2)
Copy the contents of one element to another. The contents of e2 will by copied to e1.
Name | Type | Default | Description |
Return | Element | e1 will be returned for a better usage | |
e1 | Element | - | Change this object |
e2 | Element | - | Use this object to change e1 |
static int id(Element element)
Get the first number of a given object.
Name | Type | Default | Description |
Return | Element | First number of a given object of type Element | |
element | Element | - | Valid object of type Element |
static int id2(Element element)
Get the second number of a given object.
Name | Type | Default | Description |
Return | Element | Second number of a given object of type Element | |
element | Element | - | Valid object of type Element |
static int id3(Element element)
Get the third number of a given object.
Name | Type | Default | Description |
Return | Element | Third number of a given object of type Element | |
element | Element | - | Valid object of type Element |
static char* stringid(Element element)
Get the string id of a given object. Do not change nor delete this return value!
Name | Type | Default | Description |
Return | char * | string id of a given object of type Element
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. |
|
element | Element | - | Valid object of type Element |
static int templateid(Element element)
Get the template Id of an element
Name | Type | Default | Description |
Return | int | template Id of a given object of type Element | |
element | Element | - | Valid object of type Element |
static int classid(Element element)
Get the class Id of an element
Name | Type | Default | Description |
Return | int | class Id of a given object of type Element | |
element | Element | - | Valid object of type Element |
static char* formatstring(Element element)
Get the format string of a given object. Do not change nor delete this return value!
Name | Type | Default | Description |
Return | char * | format string of a given object of type Element
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. |
|
element | Element | - | Valid object of type Element |
static ItemRef masterframe(Element element)
Get the main frame of a repeated element.
Name | Type | Default | Description |
Return | ItemRef | Main frame of a repeated element. The call is valid for elements from lists filled by elementlist::get_area_built_elements only. Otherwise the return value is 0. | |
element | Element | - | Valid object of type Element |
Here you will find an example of the function.
-
static ItemList frames(Element element)
Get a list of all frames of an repeated element.
Name | Type | Default | Description |
Return | ItemList | List of all frames of an repeated element. The call is usefull for elements from lists filled by elementlist::get_area_built_elements only. Otherwise the return value is 0. | |
element | Element | - | Valid object of type Element |
Here you will find an example of the function.
-
static ItemList ordernumber(Element element)
Get the order number of an repeated element. Order numbers are growing in steps of 10 by default.
Name | Type | Default | Description |
Return | int | Order number of an repeated element. The call is usefull for elements from lists filled by elementlist::get_area_built_elements only. Otherwise the return value is -1. | |
element | Element | - | Valid object of type Element |
Here you will find an example of the function.
-
static int set_id(Element element, int i)
Set the first number of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
i | int | - | New value for first number |
static int set_id2(Element element, int i)
Set the second number of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
i | int | - | New value for second number |
static int set_id3(Element element, int i)
Set the third number of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
i | int | - | New value for third number |
static int set_stringid(Element element, char* si)
Set the string id of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
si | String orchar* | - | New value for the string id |
static int set_templateid(Element element, int templateId)
Set the template Id of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
templateId | int | - | New value for template Id |
static int set_classid(Element element, int classId)
Set the class Id of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
classId | int | - | New value for class Id |
static int set_formatstring(Element element, char* fs)
Set the format string of a given object.
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
element | Element | - | Valid object of type Element |
fs | String or char* | - | New value for the format string of repeated elements |
static char* record_id(char* stringId)
Get the RecordID part of a StringID.
Name | Type | Default | Description |
Return | char * | RecordID part 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 the PublishingServer schema |
static char* group_id(char* stringId)
Get the GroupID part of a StringID.
Name | Type | Default | Description |
Return | char * | GroupID part 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 the PublishingServer schema |
static char* entity_id(char* stringId)
Get the EntityID part of a StringID.
Name | Type | Default | Description |
Return | char * | EntityID part 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 the PublishingServer schema |
static char* entity_class(char* stringId)
Get the EntityClass part of a StringID.
Name | Type | Default | Description |
Return | char * | EntityClass part 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 the PublishingServer schema |
static char* parent_record_id(char* stringId)
Get the Parent RecordID part of a StringID.
Name | Type | Default | Description |
Return | char * | Parent RecordID part 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 the PublishingServer schema |
static char* parent_group_id(char* stringId)
Get the Parent GroupID part of a StringID.
Name | Type | Default | Description |
Return | char * | Parent GroupID part 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 the PublishingServer schema |
static char* parent_entity_id(char* stringId)
Get the Parent EntityID part of a StringID.
Name | Type | Default | Description |
Return | char * | Parent EntityID part 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 the PublishingServer schema |
static char* parent_entity_class(char* stringId)
Get the Parent EntityClass part of a StringID.
Name | Type | Default | Description |
Return | char * | Parent EntityClass part 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 the PublishingServer schema |
static char* to_xml(Element object, char* rootElementName = "element")
Generate a XML structure of a Element 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 | Element | - object | |
rootElementName | String or char* | element | name of the root element |
static Element from_xml(char* xml)
Create a Element 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