grim/gplate

The start of moving testing from autotools and check to gtester and ctest

refs #11
/*
* Copyright (C) 2007-2008 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <gplate/gplate-config.h>
#include <gplate/gplate-library.h>
#include <gplate/tags/gplate-code-tag.h>
#include <gplate/tags/gplate-comment-tag.h>
#include <gplate/tags/gplate-text-tag.h>
#include <gplate/tags/gplate-variable-tag.h>
#include <gplate/functions/gplate-for-function.h>
#include <gplate/functions/gplate-include-function.h>
#include <gplate/functions/gplate-noop-function.h>
#include <gplate/functions/gplate-print-function.h>
#include <gplate/functions/gplate-text-function.h>
/******************************************************************************
* API
*****************************************************************************/
/**
* gplate_config_load_default:
*
* Loads the default configuration. In other words, the normal tags and
* functions that GPlate uses.
*/
void
gplate_config_load_default(void) {
gplate_library_add_tag(GPLATE_TYPE_CODE_TAG, NULL);
gplate_library_add_tag(GPLATE_TYPE_COMMENT_TAG, NULL);
gplate_library_add_tag(GPLATE_TYPE_TEXT_TAG, NULL);
gplate_library_add_tag(GPLATE_TYPE_VARIABLE_TAG, NULL);
gplate_library_add_function("for", GPLATE_TYPE_FOR_FUNCTION, NULL);
gplate_library_add_function("include", GPLATE_TYPE_INCLUDE_FUNCTION, NULL);
gplate_library_add_function("noop", GPLATE_TYPE_NOOP_FUNCTION, NULL);
gplate_library_add_function("print", GPLATE_TYPE_PRINT_FUNCTION, NULL);
gplate_library_add_function("text", GPLATE_TYPE_TEXT_FUNCTION, NULL);
gplate_library_set_default_function_for_tag("noop",
GPLATE_TYPE_COMMENT_TAG, NULL);
gplate_library_set_default_function_for_tag("text",
GPLATE_TYPE_TEXT_TAG, NULL);
gplate_library_set_default_function_for_tag("print",
GPLATE_TYPE_VARIABLE_TAG, NULL);
gplate_library_bind_function("for", GPLATE_TYPE_CODE_TAG, NULL);
gplate_library_bind_function("include", GPLATE_TYPE_CODE_TAG, NULL);
gplate_library_bind_function("print", GPLATE_TYPE_CODE_TAG, NULL);
gplate_library_bind_function("text", GPLATE_TYPE_CODE_TAG, NULL);
}