Command
QisLib_SetVectorDataCallback Function: int QisLib_SetVectorDataCallback(const QLibVectorDataCbFnPtr CbFnPtr); Inputs: CbFnPtr: Pointer to a function of type QLibVectorDataCbFnPtr which is 'int Func(const char TypeOfData, const void* Data)' Return: 0 (always) Errors: - Description: - This function must be called before any of the "Vector Data" functions such as QisLib_GetDataVector, QisLib_GetDisplayVector, QisLib_GetWindowInfo, QisLib_GetVertexInfo, etc. are called. - The callback function whose address is passed as a parameter to this call, will be called everytime QisLib wants to return a vector data (Boundary, Path, Text, Sref, Aref, Filtered Rectangle) to the user. - The callback function accepts 2 parameters: TypeOfData : 'B' (Boundary), 'F' (Filtered Rectangle), 'T' (Text), 'P' (Path), 'S' (Cell Reference), 'A' (Array Cell Reference) represents the type of data passed as 'Data'. Data: Depending on TypeOfData, type cast this argument to one of the following: CQisBoundary*(B & F) CQisPath*(P) CQisText*(T) CQisSAref*(S & A). See 'DATA STRUCTURES' for further information on these types. - The flow of the vector data callback mechanism is briefly described as follow: 1. The user program sets a vector data handler (callback function) using QisLib_SetVectorDataCallback. .g int HandleVectorData(const char TypeOfData, const void* Data); ... QisLib_SetVectorDataCallback(HandleVectorData); ... 2. The user program calls QisLib_GetDataVector or any other vector data function. e.g ... QisLib_GetVectorData(); ... 3. Internally QisLib starts searching the database for vector data to be returned to the user program. 4. While QisLib_GetVectorData is processing and before it returns, for every single vector datum (boundary, path, text, cell reference, array reference, filtered rectangle), internally QisLib calls the user's vector data handler (HandleVectorData) and passes the data type ('B','P','T','S','A','F' respectively) via the 'TypeOfData' parameter and the data via the 'Data' parameter. Thus, if there are 100 data to be returned, the callback function is called 100 times. 5. Finally, when all vector data has been processed, QisLib_GetVectorData returns.References: Functions that require vector data handler to be set: QisLib_GetDataVector QisLib_GetDataVectorExactWindows QisLib_GetDataVectorWindows QisLib_GetDisplayVector QisLib_GetDisplayVectorExactWindows QisLib_GetDisplayVectorWindows QisLib_GetWindowInfo QisLib_GetVertexInfo QisLib_GetStructureReferences QisLib_GetStructureTree QisLib_CQisBoundary QisLib_CQisPath QisLib_CQisText QisLib_CQisSAref |