Classes | Typedefs | Functions
SQStringMatrix.h File Reference
#include "SQDef.h"
#include "SQErrorCodes.h"

Go to the source code of this file.

Classes

struct  tagSQ_StringMatrix
 

Typedefs

typedef struct tagSQ_StringMatrixSQ_StringMatrix
 

Functions

SQ_ErrorCode SQ_InitStringMatrix (SQ_StringMatrix *pMatrix, int iRow, int iColumn)
 
SQ_ErrorCode SQ_CopyStringMatrix (SQ_StringMatrix pInMatrix, SQ_StringMatrix *pOutMatrix)
 
SQ_ErrorCode SQ_ClearStringMatrix (SQ_StringMatrix *pMatrix)
 
SQ_ErrorCode SQ_SetStringInMatrix (SQ_StringMatrix pMatrix, int iRow, int iColumn, const char *szString)
 
SQ_ErrorCode SQ_GetStringFromMatrix (SQ_StringMatrix pMatrix, int iRow, int iColumn, char **pszString)
 
SQ_ErrorCode SQ_SetRowStringsInMatrix (SQ_StringMatrix pMatrix, int iRow, const char **pszStrings)
 
SQ_ErrorCode SQ_SetColumnStringsInMatrix (SQ_StringMatrix pMatrix, int iColumn, const char **pszStrings)
 
SQ_ErrorCode SQ_SetStringMatrix (SQ_StringMatrix pMatrix, const char *const *pszStrings)
 
SQ_ErrorCode SQ_GetRowStringsFromMatrix (SQ_StringMatrix pMatrix, int iRow, char ***pszStrings)
 
SQ_ErrorCode SQ_GetColumnStringsFromMatrix (SQ_StringMatrix pMatrix, int iColumn, char ***pszStrings)
 
SQ_ErrorCode SQ_GetStringMatrix (SQ_StringMatrix pMatrix, char ***pszStrings)
 
SQ_ErrorCode SQ_GetNumRowsInStringMatrix (SQ_StringMatrix pMatrix, int *piNumRows)
 
SQ_ErrorCode SQ_GetNumColumnsInStringMatrix (SQ_StringMatrix pMatrix, int *piNumCols)
 

Detailed Description

This file list the SQStringMatrix object used in Umetrics SIMCA-Q products.

Typedef Documentation

◆ SQ_StringMatrix

A string matrix that is used to get and send strings to many functions. Index base = 1. IMPORTANT: Always initialize it to NULL!

Function Documentation

◆ SQ_ClearStringMatrix()

SQ_ErrorCode SQ_ClearStringMatrix ( SQ_StringMatrix pMatrix)

Removes the matrix, this function must be called for every matrix that has been initialized with SQ_InitStringMatrix.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to be removed.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_CopyStringMatrix()

SQ_ErrorCode SQ_CopyStringMatrix ( SQ_StringMatrix  pInMatrix,
SQ_StringMatrix pOutMatrix 
)

Get a copy of the string matrix

See also
tagSQ_StringMatrix
Parameters
[in]pInMatrixThe matrix to copy.
[in,out]pOutMatrixThe result matrix.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetColumnStringsFromMatrix()

SQ_ErrorCode SQ_GetColumnStringsFromMatrix ( SQ_StringMatrix  pMatrix,
int  iColumn,
char ***  pszStrings 
)

Gets the strings from a given column.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to get the strings from.
[in]iColumnThe column to get the strings from.
[out]pszStringsThe strings in the given column, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_GetNumColumnsInStringMatrix()

SQ_ErrorCode SQ_GetNumColumnsInStringMatrix ( SQ_StringMatrix  pMatrix,
int *  piNumCols 
)

Returns the number of columns in the matrix.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to get the number of columns from.
[out]piNumColsThe number of columns in the matrix.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_GetNumRowsInStringMatrix()

SQ_ErrorCode SQ_GetNumRowsInStringMatrix ( SQ_StringMatrix  pMatrix,
int *  piNumRows 
)

Returns the number of rows in the matrix.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to get the number of rows from.
[out]piNumRowsThe number of rows in the matrix.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_GetRowStringsFromMatrix()

SQ_ErrorCode SQ_GetRowStringsFromMatrix ( SQ_StringMatrix  pMatrix,
int  iRow,
char ***  pszStrings 
)

Gets the strings from a given row.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to get the strings from.
[in]iRowThe row to get the strings from.
[out]pszStringsThe strings in given row, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_GetStringFromMatrix()

SQ_ErrorCode SQ_GetStringFromMatrix ( SQ_StringMatrix  pMatrix,
int  iRow,
int  iColumn,
char **  pszString 
)

Gets the string from a given cell.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to get the string from.
[in]iRowThe row to get the string from.
[in]iColumnThe column to get the string from.
[out]pszStringThe string in the cell. A pointer to where the string should be stored, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_GetStringMatrix()

SQ_ErrorCode SQ_GetStringMatrix ( SQ_StringMatrix  pMatrix,
char ***  pszStrings 
)

Gets the strings from the matrix.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to get the strings from.
[out]pszStringsA pointer to a matrix to be filled with strings from the StringMatrix, UTF-8 encoded. The format is Row 1, Row 2, etc.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_InitStringMatrix()

SQ_ErrorCode SQ_InitStringMatrix ( SQ_StringMatrix pMatrix,
int  iRow,
int  iColumn 
)

Initialize a string matrix with its size.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to be initialized.
[in]iRowNumber of rows to give the matrix.
[in]iColumnNumber of columns to give the matrix.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_SetColumnStringsInMatrix()

SQ_ErrorCode SQ_SetColumnStringsInMatrix ( SQ_StringMatrix  pMatrix,
int  iColumn,
const char **  pszStrings 
)

Sets the strings in the given column.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to set the strings in.
[in]iColumnThe column to set the strings in.
[in]pszStringsAn array of strings to set the column with. Must be of same length as number of rows, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_SetRowStringsInMatrix()

SQ_ErrorCode SQ_SetRowStringsInMatrix ( SQ_StringMatrix  pMatrix,
int  iRow,
const char **  pszStrings 
)

Sets the strings in the given row.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to set the strings in.
[in]iRowThe row to set the strings in.
[in]pszStringsAn array of strings to set the row with. Must be of same length as number of columns, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_SetStringInMatrix()

SQ_ErrorCode SQ_SetStringInMatrix ( SQ_StringMatrix  pMatrix,
int  iRow,
int  iColumn,
const char *  szString 
)

Sets the string in the given cell.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to set the string in.
[in]iRowThe row to set the string in.
[in]iColumnThe column to set the string in.
[in]szStringThe string to set the cell with, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_SetStringMatrix()

SQ_ErrorCode SQ_SetStringMatrix ( SQ_StringMatrix  pMatrix,
const char *const *  pszStrings 
)

Sets the strings in the matrix.

See also
tagSQ_StringMatrix
Parameters
[in]pMatrixThe matrix to set the strings in.
[in]pszStringsA matrix of strings to fill the StringMatrix, UTF-8 encoded. Must be of same size as the StringMatrix. The format is Row 1, Row 2, etc.
Returns
Returns SQ_E_OK if success or an error code.

Copyright (C) Sartorius Stedim Data Analytics AB - Generated by Doxygen