Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OBITools3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools3
Commits
bce360bb
Commit
bce360bb
authored
Apr 21, 2016
by
Celine Mercier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation for obiblob indexer API
parent
2a68cb26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
5 deletions
+84
-5
src/obiblob_indexer.c
src/obiblob_indexer.c
+0
-4
src/obiblob_indexer.h
src/obiblob_indexer.h
+84
-1
No files found.
src/obiblob_indexer.c
View file @
bce360bb
...
...
@@ -15,10 +15,6 @@
#include "obiblob_indexer.h"
#include "obidms.h"
#include "obiavl.h"
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
inline
int
obi_indexer_exists
(
OBIDMS_p
dms
,
const
char
*
name
);
...
...
src/obiblob_indexer.h
View file @
bce360bb
...
...
@@ -33,43 +33,126 @@ typedef OBIDMS_avl_group_p Obi_indexer_p; /**< Typedef to refer to the pointer
*/
// TODO doc
/**
* @brief Checks if an indexer already exists or not.
*
* @param dms The OBIDMS to which the indexer belongs.
* @param name The name of the indexer.
*
* @returns A value indicating whether the indexer exists or not.
* @retval 1 if the indexer exists.
* @retval 0 if the indexer does not exist.
* @retval -1 if an error occurred.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
int
obi_indexer_exists
(
OBIDMS_p
dms
,
const
char
*
name
)
{
return
obi_avl_exists
(
dms
,
name
);
}
/**
* @brief Opens an indexer and creates it if it does not already exist.
*
* @param dms The OBIDMS to which the indexer belongs.
* @param name The name of the indexer.
*
* @returns A pointer to the indexer structure.
* @retval NULL if an error occurred.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
Obi_indexer_p
obi_indexer
(
OBIDMS_p
dms
,
const
char
*
name
)
{
return
obi_avl_group
(
dms
,
name
);
}
/**
* @brief Creates an indexer.
*
* @param dms The OBIDMS to which the indexer belongs.
* @param name The name of the indexer.
*
* @returns A pointer to the AVL tree group structure.
* @retval NULL if an error occurred.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
Obi_indexer_p
obi_create_indexer
(
OBIDMS_p
dms
,
const
char
*
name
)
{
return
obi_create_avl_group
(
dms
,
name
);
}
/**
* @brief Opens an indexer.
*
* @param dms The OBIDMS to which the indexer belongs.
* @param name The name of the indexer.
*
* @returns A pointer to the indexer structure.
* @retval NULL if an error occurred.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
Obi_indexer_p
obi_open_indexer
(
OBIDMS_p
dms
,
const
char
*
name
)
{
return
obi_open_avl_group
(
dms
,
name
);
}
/**
* @brief Closes an indexer.
*
* @param indexer A pointer to the indexer structure to close and free.
*
* @retval 0 if the operation was successfully completed.
* @retval -1 if an error occurred.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
int
obi_close_indexer
(
Obi_indexer_p
indexer
)
{
return
obi_close_avl_group
(
indexer
);
}
/**
* @brief Indexes a blob in an indexer and returns the index referring to the blob.
*
* @param indexer A pointer to the indexer.
* @param value The blob to index.
*
* @returns The index of the blob newly added in the indexer.
* @retval -1 if an error occurred.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
index_t
obi_indexer_add
(
Obi_indexer_p
indexer
,
Obi_blob_p
value
)
{
return
obi_avl_group_add
(
indexer
,
value
);
}
/**
* @brief Recovers a blob from an indexer.
*
* @param indexer A pointer to the indexer.
* @param index The index of the blob in the indexer.
*
* @returns A pointer to the blob recovered.
*
* @since April 2016
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
inline
Obi_blob_p
obi_indexer_get
(
Obi_indexer_p
indexer
,
index_t
idx
)
{
return
obi_avl_group_get
(
indexer
,
idx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment