2016-04-12 14:53:33 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Blob indexer header file *
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file obiblob_indexer.h
|
|
|
|
* @author Celine Mercier
|
|
|
|
* @date April 12th 2016
|
|
|
|
* @brief Header file for the functions handling the indexing of values.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef OBIBLOB_INDEXER_H_
|
|
|
|
#define OBIBLOB_INDEXER_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "obidms.h"
|
|
|
|
#include "obiavl.h"
|
|
|
|
#include "obitypes.h"
|
|
|
|
#include "obiblob.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define INDEXER_MAX_NAME AVL_MAX_NAME /**< Macro to refer to the maximum size of the name of an indexer structure.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2016-04-15 10:49:12 +02:00
|
|
|
typedef struct OBIDMS_avl_group Obi_indexer; /**< Typedef to refer to the used indexer structure.
|
|
|
|
*/
|
|
|
|
typedef OBIDMS_avl_group_p Obi_indexer_p; /**< Typedef to refer to the pointer of the used indexer structure.
|
2016-04-12 14:53:33 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// TODO doc
|
|
|
|
inline int obi_indexer_exists(OBIDMS_p dms, const char* name)
|
|
|
|
{
|
|
|
|
return obi_avl_exists(dms, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Obi_indexer_p obi_indexer(OBIDMS_p dms, const char* name)
|
|
|
|
{
|
|
|
|
return obi_avl_group(dms, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Obi_indexer_p obi_create_indexer(OBIDMS_p dms, const char* name)
|
|
|
|
{
|
|
|
|
return obi_create_avl_group(dms, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Obi_indexer_p obi_open_indexer(OBIDMS_p dms, const char* name)
|
|
|
|
{
|
|
|
|
return obi_open_avl_group(dms, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline int obi_close_indexer(Obi_indexer_p indexer)
|
|
|
|
{
|
|
|
|
return obi_close_avl_group(indexer);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline index_t obi_indexer_add(Obi_indexer_p indexer, Obi_blob_p value)
|
|
|
|
{
|
|
|
|
return obi_avl_group_add(indexer, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Obi_blob_p obi_indexer_get(Obi_indexer_p indexer, index_t idx)
|
|
|
|
{
|
|
|
|
return obi_avl_group_get(indexer, idx);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* OBIBLOB_INDEXER_H_ */
|
|
|
|
|