/* Copyright 2005-2006 Garrett Rooney. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file etl_data.h * @brief Functions for manipulating ETL Data Definition Language files */ #ifndef ETL_DATA_H #define ETL_DATA_H #include "etl_resolver.h" #include "etl_error.h" #include "etl_stream.h" #include "etl_hash.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * Parse @a in, a brigade containing ETL Data Definition Language, * returning a hash holding the resulting variables in @a *data, * allocated from @a pool. * * @a resolver is used to find any included files. */ etl_error_t * etl_ddl_parse(etl_hash_t **data, etl_resolver_t *resolver, etl_stream_t *in); /** * Parse a file @a filename that holds ETL Data Definition Language, * returning a hash holding the resulting variables in @a *data, * allocated from @a pool. * * @a resolver is used to find any included files. */ etl_error_t * etl_ddl_parse_file(etl_hash_t **data, etl_resolver_t *resolver, const char *filename); /** * Destroy @a data, which is a hash that holds values of type * @a etl_variable_t. */ void etl_ddl_destroy(etl_hash_t *data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ETL_DATA_H */