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

Go to the source code of this file.

Classes

struct  tagSQ_StringVector
 

Typedefs

typedef struct tagSQ_StringVectorSQ_StringVector
 

Functions

SQ_ErrorCode SQ_InitStringVector (SQ_StringVector *pVector, int iSize)
 
SQ_ErrorCode SQ_CopyStringVector (SQ_StringVector pInVector, SQ_StringVector *pOutVector)
 
SQ_ErrorCode SQ_ClearStringVector (SQ_StringVector *pVector)
 
SQ_ErrorCode SQ_SetStringInVector (SQ_StringVector pVector, int iPos, const char *szString)
 
SQ_ErrorCode SQ_SetStringVector (SQ_StringVector pVector, const char **pszString)
 
SQ_ErrorCode SQ_GetStringVector (SQ_StringVector pVector, char ***pszString)
 
SQ_ErrorCode SQ_GetStringFromVector (const SQ_StringVector pVector, int iPos, char *pszString, int iLength)
 
SQ_ErrorCode SQ_GetNumStringsInVector (const SQ_StringVector pVector, int *piNumStrings)
 

Detailed Description

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

Typedef Documentation

◆ SQ_StringVector

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

Function Documentation

◆ SQ_ClearStringVector()

SQ_ErrorCode SQ_ClearStringVector ( SQ_StringVector pVector)

Removes the Vector, this function must be called for every Vector that is created.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe vector to be removed.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_CopyStringVector()

SQ_ErrorCode SQ_CopyStringVector ( SQ_StringVector  pInVector,
SQ_StringVector pOutVector 
)

Get a copy of the string vector

See also
tagSQ_StringVector
Parameters
[in]pInVectorThe vector to copy.
[in,out]pOutVectorThe result vector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumStringsInVector()

SQ_ErrorCode SQ_GetNumStringsInVector ( const SQ_StringVector  pVector,
int *  piNumStrings 
)

Returns the number of strings in the Vector.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe Vector to get the number of strings from.
[out]piNumStringsThe number of strings in the Vector or a negative number if an error occurred.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetStringFromVector()

SQ_ErrorCode SQ_GetStringFromVector ( const SQ_StringVector  pVector,
int  iPos,
char *  pszString,
int  iLength 
)

Gets the string from a given position in the Vector.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe Vector to get the string from.
[in]iPosThe position in the Vector to get the string from.
[in,out]pszStringA buffer to where the string should be stored, UTF-8 encoded. The user is responsible for allocation/deallocation.
[in]iLengthThe size of the buffer.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetStringVector()

SQ_ErrorCode SQ_GetStringVector ( SQ_StringVector  pVector,
char ***  pszString 
)

Get the strings from the vector.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe vector to set the string in.
[out]pszStringThe strings in the vector, UTF-8 encoded. This is an array of strings of the same length as StringVector. IMPORTANT: it's up to the user to free the allocated memory by calling free() for each string in the array;
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_InitStringVector()

SQ_ErrorCode SQ_InitStringVector ( SQ_StringVector pVector,
int  iSize 
)

Initialize a string vector with its size.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe vector to be initialized.
[in]iSizeNumber of strings to give the vector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_SetStringInVector()

SQ_ErrorCode SQ_SetStringInVector ( SQ_StringVector  pVector,
int  iPos,
const char *  szString 
)

Sets the string in the given position.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe vector to set the string in.
[in]iPosThe position to set the string in.
[in]szStringThe string to set, UTF-8 encoded.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_SetStringVector()

SQ_ErrorCode SQ_SetStringVector ( SQ_StringVector  pVector,
const char **  pszString 
)

Set the strings in vector.

See also
tagSQ_StringVector
Parameters
[in]pVectorThe vector to set the string in.
[in]pszStringThe strings to set, UTF-8 encoded. Must be of the same length as the vector.
Returns
Returns SQ_E_OK if success or an error code

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