#ifndef H_CORAL_UTIL_MMCREATOR_SIMPLE_LANG_CREATOR
#define H_CORAL_UTIL_MMCREATOR_SIMPLE_LANG_CREATOR
// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

/*
 * Simple way to describe the metamodel structure
 */

#include <coral/core/ElementDefinition.h>
#include <coral/core/PrimitiveProperties.h>

namespace coral { namespace util { namespace mmcreator {

	/*
	 * These take care of all AbstractElementDefinitions
	 */
	struct Enumeration {
		/** Where to save new enumeration */
		coral::EnumerationDefinition** ptr;
		const char* name;
		const char** enumerations;
	};
	struct Datatype {
		/** Where to save new datatype */
		coral::DatatypeDefinition** ptr;
		const char* name;
	};


	struct Element {
		/** Where to save new element */
		ElementDefinition** ptr;
		const char* name;
	};

	/*
	 * This defines the superclass <-> subclass structure
	 */
	struct SubAndSuper {
		const char* sub;
		const char* super;
	};
	
	/*
	 * This defines a feature. It will automatically be
	 * created/added to all subclasses, too. So remember to
	 * create ther sub/superclass structure first.
	 */
	struct Feature {
		const char* from_element;
		const char* key;
		const char* element_kind;
		const char* other_key;
		int mult_lower;
		int mult_upper;
		int kind;
	};
	
	/* Simple call this with appropriate C arrays. End a list
	   with a NULL ptr. */
	void
		create_elems(Language* metamodel,
			     const Enumeration** list_of_enums,
			     const Datatype* list_of_dtypes,
			     const Element* list_of_elems,
			     const SubAndSuper* list_of_structure,
			     const Feature* list_of_slots
			);
	
} } }

#endif
