#!/usr/bin/env python
import coral
L = coral.Language.__getLanguage__("UML", 1, 4)
assert(L)

from coral.lgen.lang2smd import *
from coral.lgen.smd2lang import *
import inspect

def myFunction(self):
    print "hello there!", self

L.getElement("Classifier").__addOperation__(coral.PyOperation(myFunction, "Python", inspect.getsource(myFunction), 0))

M = lang2smd(L)

coral.saveModel("tmp/uml14_with_operation.xml", M)

