The API of the deprecated (legacy) Listing.
More...
|
enum | API_ListDataID {
API_ZombieListDataID
, API_KeyID
, API_UnitID
, API_Obsolete_ComponentID
,
API_DescriptorID
} |
| Possible types of a listdata item. More...
|
|
The API of the deprecated (legacy) Listing.
◆ API_ListDataID
Possible types of a listdata item.
◆ ACAPI_OldListing_Get()
Retrieves the data of a listdata.
- Parameters
-
listdata | [in/out] Parameters of the listdata. The type of the listdata, the index of the set and the index of the listdata must be passed in the typeID, the setIndex and the index fields in the listdata header. Other fields of the structure are filled in automatically. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADINDEX - Invalid listdata index was passed.
- APIERR_BADID - Invalid listdata type was passed.
- APIERR_DELETED - Invalid listdata was deleted.
- Example
GSErrCode err;
GSErrCode ACAPI_OldListing_Get(API_ListData *listdata)
Retrieves the data of a listdata.
char ** name
name of the descriptor
Definition: APIdefs_ListData.h:380
Int32 setIndex
index of the list data set the component is in
Definition: APIdefs_ListData.h:155
Int32 index
index of the listdata in the set
Definition: APIdefs_ListData.h:161
API_ListDataID typeID
type of the listdata
Definition: APIdefs_ListData.h:149
The representation of a listdata.
Definition: APIdefs_ListData.h:403
API_ListData_Head header
A common header for all the listdata types. It contains information which applies to all the listdata...
Definition: APIdefs_ListData.h:409
API_DescriptorType descriptor
a descriptor listdata
Definition: APIdefs_ListData.h:434
◆ ACAPI_OldListing_GetLocal()
Retrieves the data of a local listing component.
- Parameters
-
libIndex | [in] Index of the library part. |
elemHead | [in] Element of the placed object instance (see remarks). |
listdata | [in/out] Parameters of the listdata. The type of the listdata must be passed in the typeID field in the listdata header. The index in the library part must be passed in the index field in the listdata header. The other fields of the structure are filled in automatically. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - Invalid libIndex was passed.
- APIERR_BADID - Invalid listdata type was passed.
- Example
Int32 libIndex;
GSErrCode err;
libPart.
typeID = APILib_PropertyID;
GS::ucscpy (libPart.
docu_UName, L(
"Test property"));
if (err == NoError && libPart.
index != 0) {
libIndex = libPart.
index;
}
GSErrCode ACAPI_LibraryPart_Search(API_LibPart *ancestor, bool createIfMissing, bool onlyPlaceable=false)
Searches for a registered Library Part in the loaded libraries.
GSErrCode ACAPI_OldListing_GetLocal(Int32 libIndex, const API_Elem_Head *elemHead, API_ListData *listdata)
Retrieves the data of a local listing component.
General element header for element types.
Definition: APIdefs_Elements.h:401
Definition of a Library Part.
Definition: APIdefs_LibraryParts.h:80
API_LibTypeID typeID
Type of the Library Part.
Definition: APIdefs_LibraryParts.h:86
Int32 index
Index of the Library Part, contains the current database index of the given Library Part....
Definition: APIdefs_LibraryParts.h:93
GS::uchar_t docu_UName[API_UniLongNameLen]
Unique document name of the Library Part. If more than one Library Part has the same name,...
Definition: APIdefs_LibraryParts.h:101
IO::Location * location
Location of the library part (GSM) file in the file system.
Definition: APIdefs_LibraryParts.h:145
◆ ACAPI_OldListing_GetNum()
GSErrCode ACAPI_OldListing_GetNum |
( |
Int32 |
setIndex, |
|
|
API_ListDataID |
typeID, |
|
|
Int32 * |
count |
|
) |
| |
Returns the number of listdata in given set.
- Parameters
-
setIndex | [in] Index of the sets of the listing database. |
typeID | [in] Type of the listdata. |
count | [out] Number of listdata type in the set. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADID - Invalid listdata type or setIndex was passed.
- Example
Int32 count;
GSErrCode ACAPI_OldListing_GetNum(Int32 setIndex, API_ListDataID typeID, Int32 *count)
Returns the number of listdata in given set.
◆ ACAPI_OldListing_GetSet()
Retrieves the data of a listdata set.
- Parameters
-
listdataSet | [in/out] Parameters of the set. The index of the set must be passed in the setIndex field in the listdataSet; it must be greater than 0. The other fields of the structure are filled in automatically. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADINDEX - Invalid listdataSet setindex was passed.
- Example
GSErrCode err;
GSErrCode ACAPI_OldListing_GetSet(API_ListDataSetType *listdataSet)
Retrieves the data of a listdata set.
Representation of a listdata set.
Definition: APIdefs_ListData.h:40
Int32 setIndex
index of the set of the listing database
Definition: APIdefs_ListData.h:46
◆ ACAPI_OldListing_GetSetNum()
Int32 ACAPI_OldListing_GetSetNum |
( |
void |
| ) |
|
Returns the number of listdata sets.
- Returns
- NoError - The number of listdata sets of the listing database.
- Example
Int32 ACAPI_OldListing_GetSetNum(void)
Returns the number of listdata sets.
◆ ACAPI_OldListing_Search()
GSErrCode ACAPI_OldListing_Search |
( |
API_ListData * |
listdata | ) |
|
Searches for a listdata.
- Parameters
-
listdata | [in/out] Parameters of the listdata. The type and setIndex of the listdata must be passed in the typeID and the setIndex fields in the listdata header. The code and/or the keycode of the listdata must be passed in the code and the keycode fields in the listdata. The setIndex and the index fields of the listdata header are used as the output parameters to return the setIndex/index to the searched listdata. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADKEYCODE - Invalid code or keycode was passed.
API_ListDataID | keycode | code |
API_KeyID or API_UnitID | not exist | required |
API_Obsolete_ComponentID or API_DescriptorID | required | optional |
- Example
char buffer[256];
GSErrCode err;
if (err == NoError) {
sprintf (buffer,
"Set index: %d, key code: \"003\"", listdata.
header.
setIndex);
while (err == NoError && CHEqualASCII (listdata.
component.
keycode,
"003", GS::CaseInsensitive)) {
}
}
void ACAPI_WriteReport(const GS::UniString &format, bool withDial,...)
Writes a report string into the Report Windowot into a custom alert window.
GSErrCode ACAPI_OldListing_Search(API_ListData *listdata)
Searches for a listdata.
char code[API_DBCodeLen]
Component code.
Definition: APIdefs_ListData.h:285
char name[API_DBNameLen]
Component name.
Definition: APIdefs_ListData.h:297
char keycode[API_DBCodeLen]
Component key code.
Definition: APIdefs_ListData.h:291
API_Obsolete_ComponentType component
a component listdata
Definition: APIdefs_ListData.h:428