libuproc  1.2.0
idmap.h
Go to the documentation of this file.
1 /* Copyright 2014 Peter Meinicke, Robin Martinjak
2  *
3  * This file is part of libuproc.
4  *
5  * libuproc is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the Free
7  * Software Foundation, either version 3 of the License, or (at your option)
8  * any later version.
9  *
10  * libuproc is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libuproc. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
29 #ifndef UPROC_IDMAP_H
30 #define UPROC_IDMAP_H
31 
32 #include "uproc/common.h"
33 #include "uproc/io.h"
34 
47 typedef struct uproc_idmap_s uproc_idmap;
48 
51 
54 
70 uproc_family uproc_idmap_family(uproc_idmap *map, const char *name);
71 
79 char *uproc_idmap_str(const uproc_idmap *map, uproc_family family);
80 
83 
90 uproc_idmap *uproc_idmap_load(enum uproc_io_type iotype, const char *pathfmt,
91  ...);
92 
98 uproc_idmap *uproc_idmap_loadv(enum uproc_io_type iotype, const char *pathfmt,
99  va_list ap);
100 
102 int uproc_idmap_stores(const uproc_idmap *map, uproc_io_stream *stream);
103 
105 int uproc_idmap_storev(const uproc_idmap *map, enum uproc_io_type iotype,
106  const char *pathfmt, va_list ap);
107 
113 int uproc_idmap_store(const uproc_idmap *map, enum uproc_io_type iotype,
114  const char *pathfmt, ...);
115 
122 #endif
uproc_idmap * uproc_idmap_load(enum uproc_io_type iotype, const char *pathfmt,...)
Load idmap from file.
uproc_idmap * uproc_idmap_loadv(enum uproc_io_type iotype, const char *pathfmt, va_list ap)
Load idmap from file.
Module: General IO.
uproc_family uproc_idmap_family(uproc_idmap *map, const char *name)
Get family number.
uproc_idmap * uproc_idmap_loads(uproc_io_stream *stream)
Load idmap from stream.
int uproc_idmap_store(const uproc_idmap *map, enum uproc_io_type iotype, const char *pathfmt,...)
Store idmap to file.
void uproc_idmap_destroy(uproc_idmap *map)
Destroy idmap object.
uproc_idmap * uproc_idmap_create(void)
Create idmap object.
int uproc_idmap_stores(const uproc_idmap *map, uproc_io_stream *stream)
Store idmap to stream.
int uproc_idmap_storev(const uproc_idmap *map, enum uproc_io_type iotype, const char *pathfmt, va_list ap)
Store idmap to file.
Map between protein family name and its numeric identifier.
Optionally compressed I/O stream.
char * uproc_idmap_str(const uproc_idmap *map, uproc_family family)
Get family string.
Module: Common definitions.
uint_least16_t uproc_family
Identifier of a protein family.
Definition: common.h:93
uproc_io_type
Underlying stream type.
Definition: io.h:59