first header files for OBIColumns.
This commit is contained in:
47
src/obicolumn.h
Normal file
47
src/obicolumn.h
Normal file
@ -0,0 +1,47 @@
|
||||
/****************************************************************************
|
||||
* OBIColumn header file *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file obicolumn.h
|
||||
* @author Celine Mercier
|
||||
* @date 12 May 2015
|
||||
* @brief Header file for the shared elements of all the OBIColumn structures.
|
||||
*/
|
||||
|
||||
#ifndef OBICOLUMN_H_
|
||||
#define OBICOLUMN_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief enum OBIDataType for the data type of the OBIColumns.
|
||||
*/
|
||||
|
||||
typedef enum OBIDataType {
|
||||
OBI_VOID = 0, /**< data type not specified */
|
||||
OBI_INT32, /**< type int32_t */
|
||||
OBI_INT64, /**< type int64_t */
|
||||
OBI_UINT32, /**< type uint32_t */
|
||||
OBI_UNIT64, /**< type uint64_t */
|
||||
OBI_STRING /**< type char* */
|
||||
} OBIDataType_t, *OBIDataType_p;
|
||||
|
||||
|
||||
/**
|
||||
* @brief OBIColumnHeader structure.
|
||||
*/
|
||||
|
||||
typedef struct OBIColumnHeader {
|
||||
bool endyan_byte_order; /**< endyan byte order */
|
||||
int header_size_value; /**< size of the header: a multiple of PAGESIZE */
|
||||
int line_count; /**< number of lines of data */
|
||||
OBIDataType_t data_type; /**< type of the data */
|
||||
char* creation_date; /**< date of creation of the file */
|
||||
int version; /**< version of the OBIColumn */
|
||||
char* comments; /**< comments */>
|
||||
} OBIIntColumn_t, *OBIIntColumn_p;
|
||||
|
||||
|
||||
#endif /* OBICOLUMN_H_ */
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* OBIIntColumn prototype file *
|
||||
* OBIIntColumn header file *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
@ -13,35 +13,69 @@
|
||||
#define OBIINTCOLUMN_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "obicolumn.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief enum for the OBIDataType.
|
||||
* @brief OBIIntColumn stucture.
|
||||
*/
|
||||
|
||||
typedef enum OBIDataType {
|
||||
OBI_VOID = 0, /**< data type not specified */
|
||||
OBI_INT32, /**< type int32_t */
|
||||
OBI_INT64, /**< type int64_t */
|
||||
OBI_UINT32, /**< type uint32_t */
|
||||
OBI_UNIT64, /**< type uint64_t */
|
||||
OBI_STRING /**< type str */
|
||||
} OBIDataType_t, *OBIDataType_p;
|
||||
typedef struct OBIIntcolumn {
|
||||
|
||||
} OBIIntColumn_t, *OBIIntColumn_p;
|
||||
|
||||
/**
|
||||
* @brief Bried description of the function.
|
||||
* @brief Reads a memory block from an OBIIntColumn file.
|
||||
*
|
||||
* Longer description of the function. This part may refer to the parameters
|
||||
* of the function, like @p parameter.
|
||||
* @param parameter Description of the first parameter of the function.
|
||||
* @return Describe what the function returns.
|
||||
* @see http://website/
|
||||
* @note Something to note.
|
||||
* @warning Warning.
|
||||
* @param OBIIntColumn The OBIColumn that should be read.
|
||||
* @return A pointer on the first element of the block.
|
||||
*/
|
||||
|
||||
void test(int parameter);
|
||||
int* readMemoryBlock(int* OBIIntcolumn, int startingPosition, int memoryBlockSize);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Writes a memory block line by line at the end of a file.
|
||||
*/
|
||||
|
||||
void writeMemoryBlock(int* OBIIntcolumn, int memoryBlockSize, char* fileName);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Returns one line of an OBIColumn.
|
||||
*/
|
||||
|
||||
int readLine(int line);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Creates a new file for a new version of the OBIColumn.
|
||||
*/
|
||||
|
||||
void newColumn(OBIIntcolumn* column);
|
||||
|
||||
|
||||
/**
|
||||
* @brief malloc for OBIIntColumn.
|
||||
*/
|
||||
|
||||
int* OBIIntMalloc();
|
||||
|
||||
|
||||
/**
|
||||
* @brief realloc for OBIIntColumn.
|
||||
*/
|
||||
|
||||
int* OBIIntRealloc();
|
||||
|
||||
|
||||
/**
|
||||
* @brief free for OBIIntColumn.
|
||||
*/
|
||||
|
||||
void OBIIntFree();
|
||||
|
||||
|
||||
#endif /* OBIINTCOLUMN_H_ */
|
||||
|
Reference in New Issue
Block a user