An object which let you declare class in flavour of class.
To define a class:
Class("obj").Define({
obj : function() {},
name : "name"
});
To define static member of a class:
Class("obj").Static({
BLAH : 1,
BALH : 2
}).Define({ ...
Notice that static members should be defined before using of them.
To extend some super class:
Class("obj").Define({
...
}).Extend("super_obj");
Constructor, which is a member function having the same name with your class,
must be declared.
Class("blahblah").Define({
blahblah : function() {},
name : "name"
});
Class("obj").Define({
obj : function(name) { if(name!=undefined) this.name = name; }, /* Constructor */
name : "object"
});
Class("pen").Extend("obj").Define({ /* Extend obj */
pen : function(color) { this.obj("pen"); this.color = color; },/* Constructor invoke constructor of super class */
color : "black"
});
Class("knockpen").Extend("pen").Static({ /* Static Members */
coreHard : "2H",
coreSoft : "2B"
}).Define({
knockpen : function(core,color) { this.pen(color); this.core = core; },
core : "2B"
});