faixbox_manager.h
Go to the documentation of this file.
/*
* $Id$
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
* Copyright (c) 2010-2011, Kaori Hagihara
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FAIXBOX_MANAGER_H_
# define FAIXBOX_MANAGER_H_
#include "byte_manager.h"
#include "box_manager.h"
typedef struct faixelem4_param {
Byte4_t off;
Byte4_t len;
} faixelem4_param_t;
typedef struct faixelem8_param {
Byte8_t off;
Byte8_t len;
} faixelem8_param_t;
typedef struct subfaixbox4_param {
Byte4_t nmax;
Byte4_t m;
faixelem4_param_t *elem;
Byte4_t *aux;
} subfaixbox4_param_t;
typedef struct subfaixbox8_param {
Byte8_t nmax;
Byte8_t m;
faixelem8_param_t *elem;
Byte4_t *aux;
} subfaixbox8_param_t;
typedef union subfaixbox_param {
subfaixbox4_param_t
*byte4_params;
subfaixbox8_param_t
*byte8_params;
} subfaixbox_param_t;
typedef struct faixbox_param {
Byte_t version;
subfaixbox_param_t subfaixbox;
} faixbox_param_t;
faixbox_param_t * gene_faixbox(box_param_t *box);
void print_faixbox(faixbox_param_t *faix);
void delete_faixbox(faixbox_param_t **faix);
Byte8_t get_nmax(faixbox_param_t *faix);
Byte8_t get_m(faixbox_param_t *faix);
Byte8_t get_elemOff(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
Byte8_t get_elemLen(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
Byte4_t get_elemAux(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
#endif /* !FAIXBOX_MANAGER_H_ */
box_manager.h
box_param_t
struct box_param box_param_t
box parameters
byte_manager.h
Byte8_t
uint64_t Byte8_t
Definition byte_manager.h:40
Byte4_t
uint32_t Byte4_t
Definition byte_manager.h:39
Byte_t
uint8_t Byte_t
Definition byte_manager.h:37
get_elemOff
Byte8_t get_elemOff(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id)
get offset of a element from faix box
Definition faixbox_manager.c:181
delete_faixbox
void delete_faixbox(faixbox_param_t **faix)
delete faix box
Definition faixbox_manager.c:145
get_m
Byte8_t get_m(faixbox_param_t *faix)
get m parameter value from faix box
Definition faixbox_manager.c:172
subfaixbox4_param_t
struct subfaixbox4_param subfaixbox4_param_t
4byte parameters of fragment array index box
print_faixbox
void print_faixbox(faixbox_param_t *faix)
print faix box parameters
Definition faixbox_manager.c:120
faixelem8_param_t
struct faixelem8_param faixelem8_param_t
8byte parameters of a faix element
faixelem4_param_t
struct faixelem4_param faixelem4_param_t
4byte parameters of a faix element
subfaixbox_param_t
union subfaixbox_param subfaixbox_param_t
variable sized parameters in fragment array index box
get_nmax
Byte8_t get_nmax(faixbox_param_t *faix)
get nmax parameter value from faix box
Definition faixbox_manager.c:163
get_elemLen
Byte8_t get_elemLen(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id)
get length of a element from faix box
Definition faixbox_manager.c:192
gene_faixbox
faixbox_param_t * gene_faixbox(box_param_t *box)
generate faix box
Definition faixbox_manager.c:45
faixbox_param_t
struct faixbox_param faixbox_param_t
fragment array index box parameters
subfaixbox8_param_t
struct subfaixbox8_param subfaixbox8_param_t
8byte parameters of fragment array index box
get_elemAux
Byte4_t get_elemAux(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id)
get aux of a element from faix box
Definition faixbox_manager.c:203
faixbox_param
fragment array index box parameters
Definition faixbox_manager.h:77
faixbox_param::version
Byte_t version
Refer to the Table I.3 - Version values.
Definition faixbox_manager.h:78
faixbox_param::subfaixbox
subfaixbox_param_t subfaixbox
rest information in faixbox
Definition faixbox_manager.h:79
faixelem4_param
4byte parameters of a faix element
Definition faixbox_manager.h:38
faixelem4_param::len
Byte4_t len
length
Definition faixbox_manager.h:40
faixelem4_param::off
Byte4_t off
offset
Definition faixbox_manager.h:39
faixelem8_param
8byte parameters of a faix element
Definition faixbox_manager.h:44
faixelem8_param::len
Byte8_t len
length
Definition faixbox_manager.h:46
faixelem8_param::off
Byte8_t off
offset
Definition faixbox_manager.h:45
subfaixbox4_param
4byte parameters of fragment array index box
Definition faixbox_manager.h:50
subfaixbox4_param::aux
Byte4_t * aux
dynamic array pointer of auxiliary
Definition faixbox_manager.h:54
subfaixbox4_param::nmax
Byte4_t nmax
maximum number of valid elements in any row of the array
Definition faixbox_manager.h:51
subfaixbox4_param::m
Byte4_t m
number of raws of the array
Definition faixbox_manager.h:52
subfaixbox4_param::elem
faixelem4_param_t * elem
dynamic array pointer of faix elements
Definition faixbox_manager.h:53
subfaixbox8_param
8byte parameters of fragment array index box
Definition faixbox_manager.h:59
subfaixbox8_param::elem
faixelem8_param_t * elem
dynamic array pointer of faix elements
Definition faixbox_manager.h:62
subfaixbox8_param::aux
Byte4_t * aux
dynamic array pointer of auxiliary
Definition faixbox_manager.h:63
subfaixbox8_param::nmax
Byte8_t nmax
maximum number of valid elements in any row of the array
Definition faixbox_manager.h:60
subfaixbox8_param::m
Byte8_t m
number of raws of the array
Definition faixbox_manager.h:61
subfaixbox_param
variable sized parameters in fragment array index box
Definition faixbox_manager.h:68
subfaixbox_param::byte8_params
subfaixbox8_param_t * byte8_params
parameters with 8byte codes for version 1 or 3
Definition faixbox_manager.h:72
subfaixbox_param::byte4_params
subfaixbox4_param_t * byte4_params
parameters with 4byte codes for version 0 or 2
Definition faixbox_manager.h:70