Ejemplo n.º 1
0
//---------------------------------------------------------------------------
int32_t CSVFile::readUCHAR(uint32_t row, uint32_t col, uint8_t& value)
{
	int32_t result = seekRowCol(row, col);
	if(result == NO_ERROR)
	{
		value = textToUCHAR(dataBuffer);
	}
	else
		value = 0.0f;
	return(NO_ERROR);
}
Ejemplo n.º 2
0
//---------------------------------------------------------------------------
int32_t CSVFile::readChar(uint32_t row, uint32_t col, char& value)
{
	int32_t result = seekRowCol(row, col);
	if(result == NO_ERROR)
	{
		value = textToChar(dataBuffer);
	}
	else
		value = 0.0f;
	return(NO_ERROR);
}
Ejemplo n.º 3
0
//---------------------------------------------------------------------------
int32_t CSVFile::readBoolean(uint32_t row, uint32_t col, bool& value)
{
	int32_t result = seekRowCol(row, col);
	if(result == NO_ERROR)
	{
		value = booleanToLong(dataBuffer);
	}
	else
		value = 0;
	return(NO_ERROR);
}
Ejemplo n.º 4
0
//---------------------------------------------------------------------------
long CSVFile::readUChar (DWORD row, DWORD col, unsigned char &value)
{
	long result = seekRowCol(row,col);
	if (result == NO_ERR)
	{
		value = textToUChar(dataBuffer);
	}
	else
		value = 0.0f;
	
	return(NO_ERR);
}
Ejemplo n.º 5
0
//---------------------------------------------------------------------------
long CSVFile::readShort (DWORD row, DWORD col, short &value)
{
	long result = seekRowCol(row,col);
	if (result == NO_ERR)
	{
		value = textToShort(dataBuffer);
	}
	else
		value = 0.0f;
	
	return(NO_ERR);
}
Ejemplo n.º 6
0
//---------------------------------------------------------------------------
long CSVFile::readBoolean (DWORD row, DWORD col, bool &value)
{
	long result = seekRowCol(row,col);
	if (result == NO_ERR)
	{
		value = booleanToLong(dataBuffer);
	}
	else
		value = 0;
	
	return(NO_ERR);
}
Ejemplo n.º 7
0
//---------------------------------------------------------------------------
long CSVFile::readString (DWORD row, DWORD col, char *result, unsigned long bufferSize)
{
	long res = seekRowCol(row,col);
	if (res == NO_ERR)
	{
		long errorCode = copyString(result,dataBuffer,bufferSize);
		if (errorCode != NO_ERR)
			return(errorCode);
	}
	else
		return 1;	
	return(0); // gotta return some kind of error!
}
Ejemplo n.º 8
0
//---------------------------------------------------------------------------
int32_t CSVFile::readString(uint32_t row, uint32_t col, PSTR result, uint32_t bufferSize)
{
	int32_t res = seekRowCol(row, col);
	if(res == NO_ERROR)
	{
		int32_t errorCode = copyString(result, dataBuffer, bufferSize);
		if(errorCode != NO_ERROR)
			return(errorCode);
	}
	else
		return 1;
	return(0); // gotta return some kind of error!
}