#include <coral/core/Element.h>
#include <coral/coral.h>
#include <coral/core/garbage_collector.h>

#include <iostream>

#include <unistd.h>

#include <sys/time.h>

int main() {
	coral::init_coral_framework();
	coral::autounref<coral::Language> uml14
		= coral::Language::__getLanguage__("UML", 1, 4);

	coral::Atom* m = uml14->getElement("Model")->newAtom();
	coral::Atom* _c = uml14->getElement("Class")->newAtom();
	coral::Element* c = static_cast<coral::Element*>(_c);
	coral::Slot& mf = c->__getSlotByName__("specialization");
	try {
		mf.add(m);
	} catch (...) {
		std::cout << "Alles gut, we catched it" << std::endl;
		return 0;
	}
	return 2;
}
