PocketSphinx  0.6
include/fsg_set.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset:4; indent-tabs-mode: nil -*- */
00002 /* ====================================================================
00003  * Copyright (c) 1999-2008 Carnegie Mellon University.  All rights
00004  * reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  *
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer. 
00012  *
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in
00015  *    the documentation and/or other materials provided with the
00016  *    distribution.
00017  *
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
00020  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
00021  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00022  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
00023  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00024  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00025  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00026  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
00027  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00028  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00029  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030  *
00031  * ====================================================================
00032  *
00033  */
00038 #ifndef __FSG_SET_H__
00039 #define __FSG_SET_H__
00040 
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044 #if 0
00045 }
00046 #endif
00047 
00048 /* SphinxBase headers we need. */
00049 #include <sphinxbase/fsg_model.h>
00050 #include <sphinxbase/hash_table.h>
00051 #include <sphinxbase/jsgf.h>
00052 
00053 /* PocketSphinx headers. */
00054 #include <pocketsphinx_export.h>
00055 
00059 typedef struct fsg_search_s fsg_set_t;
00060 
00064 typedef hash_iter_t fsg_set_iter_t;
00065 
00069 POCKETSPHINX_EXPORT
00070 fsg_set_iter_t *fsg_set_iter(fsg_set_t *fsgs);
00071 
00075 POCKETSPHINX_EXPORT
00076 fsg_set_iter_t *fsg_set_iter_next(fsg_set_iter_t *itor);
00077 
00081 POCKETSPHINX_EXPORT
00082 fsg_model_t *fsg_set_iter_fsg(fsg_set_iter_t *itor);
00083 
00087 POCKETSPHINX_EXPORT
00088 void fsg_set_iter_free(fsg_set_iter_t *itor);
00089 
00095 POCKETSPHINX_EXPORT
00096 fsg_model_t *fsg_set_get_fsg(fsg_set_t *fsgs, char const *name);
00097 
00110 POCKETSPHINX_EXPORT
00111 fsg_model_t *fsg_set_add(fsg_set_t *fsgs, char const *name, fsg_model_t *wfsg);
00112 
00116 POCKETSPHINX_EXPORT
00117 fsg_model_t *fsg_set_remove(fsg_set_t *fsgs, fsg_model_t *wfsg);
00118 
00122 POCKETSPHINX_EXPORT
00123 fsg_model_t *fsg_set_remove_byname(fsg_set_t *fsgs, char const *name);
00124 
00130 POCKETSPHINX_EXPORT
00131 fsg_model_t *fsg_set_select(fsg_set_t *fsgs, const char *name);
00132 
00133 #ifdef __cplusplus
00134 } /* extern "C" */
00135 #endif
00136 
00137 #endif /* __FSG_SET_H__ */