grim/gplate

some more testing migration stuff.

2012-09-04, Gary Kramlich
7f8e0e4f250f
some more testing migration stuff.
Variables aren't done yet
/*
* GPlate - GObject based templating library
* Copyright (C) 2007-2012 Gary Kramlich <grim@reaperworld.com>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#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);
}