|
// SVF.h, here the
structures and functions are declared
// which are needed for
writing and reading .svf files
// see also
SVF.c
typedef struct {
char Selected,
Hidden,
RightYaxis;
float *X,
*Y,
*Z;
int NrOfElements;
char DataPath[MAX_PATHNAME_LEN],
DSName[MAX_PATHNAME_LEN],
*GraphTitle,
*XName,
*YName,
*ZName,
*DSInfo;
unsigned char *DataBlock;
unsigned int NrOfBytes;
} SVF_DATASET_PARAMS;
/* Write a SVF file with only one data set in it */
int WriteSVFFileSingle(char *PathName, char AskForOverwrite,
char XReverse, char YReverse, char YRReverse,
size_t NrOfBytes, BYTE *DataBlock,
char *DSName, char *GraphTitle,
char *XName, char *YName, char *ZName, char *DSInfo,
int NrOfElements, float *XData, float *YData, float *ZData);
/* Write a SVF file with multiple data sets in it. Use the SVF_DATASET_PARAMS structure for this */
int WriteSVFFile(char *PathName, char KeepOriginalDataPath, char AskForOverwrite,
size_t NrOfBytesToSkip, void *Data,
char XReverse, char YReverse, char YRReverse, int NrOfDataSets,
SVF_DATASET_PARAMS *DS);
/* Reads a SVF file and returns a data set structure */
SVF_DATASET_PARAMS *ReadSVFFile(int MaxNrOfDataSets, int MaxNrOfElements,
char *PathName, char *XReverse, char *YReverse, char *YRReverse,
size_t *NrOfBytesForGeneralDataBlock, BYTE **GeneralDataBlock,
int *NrOfDataSets);
/* Frees the data set structure after usage */
void FreeSVFDS(SVF_DATASET_PARAMS *DS, int NrOfDataSets);
#define NO_KEEP_PATHS 0
#define KEEP_PATHS 1
#define NO_ASK_OVERWRITE 0
#define ASK_OVERWRITE 1
#define NO_DELETE_SOURCE 0
#define DELETE_SOURCE 1
|