/**
 * Filename    : topincs.conf.js
 * Author      : Robert Cerny
 * Created     : 2007-03-18
 * Last Change : 2009-06-09
 */

TOPINCS = {};
CERNY = {};

/**
 * Classical inheritance [DCC].
 * This alogorithm was developed by Douglas Crockford.
 *
 * child - the object which will inherit
 * parent - the object which will pass the heritage
 */
CERNY.inherit = function(child, parent) {
    var d = 0;
    var p = (child.prototype = new parent());
    child.prototype.uber = function uber(name) {
        var func;
        var result;
        var t = d;
        var ancestor = parent.prototype;
        if (t) {
            while (t) {
                ancestor = ancestor.constructor.prototype;
                t -= 1;
            }
            func = ancestor[name];
        } else {
            func = p[name];
            if (func == this[name]) {
                func = ancestor[name];
            }
        }
        d += 1;
        result = func.apply(this, Array.prototype.slice.apply(arguments, [1]));
        d -= 1;
        return result;
    };
};
// CERNY.signature(CERNY.inherit, "undefined", "object", "object");
