Browse files

Added extends doc tag to js.io. (reviewed by @fairfieldt)

  • Loading branch information...
1 parent 1fd5644 commit f64c0ca51687e78cd8703a713b4fdcc3e5d93da2 @lamberta lamberta committed with fairfieldt Apr 23, 2012
View
4 packages/math/arrays.js
@@ -1,5 +1,9 @@
jsio('import .util');
+/**
+ * @namespace
+ */
+
exports.weightedAverage = function (a, w, n) {
n = n || a.length;
var s = 0;
View
4 packages/math/util.js
@@ -1,5 +1,9 @@
jsio('import lib.Enum as Enum');
+/**
+ * @namespace
+ */
+
exports.interpolate = function(a, b, x) { return a * (1 - x) + b * x; }
exports.random = function(a, b, rand) { return a + ((rand || Math.random)() * (b - a) | 0); }
View
3 packages/math2D/Circle.js
@@ -2,6 +2,9 @@
import .Point;
+/**
+ * @extends math2D.Point
+ */
exports = Class(Point, function(supr) {
this.init = function(a, b, c) {
switch(arguments.length) {
View
4 packages/math2D/angle.js
@@ -1,3 +1,7 @@
+/**
+ * @namespace
+ */
+
var PI = Math.PI,
TWOPI = Math.PI * 2;
View
3 packages/math2D/intersect.js
@@ -4,6 +4,9 @@ import .Point;
import .Line;
import .Rect;
+/**
+ * @namespace
+ */
var intersect = exports;
intersect.rectAndPt = function(rect, pt) { return intersect.ptAndRect(pt, rect); }
View
4 packages/math2D/morphology.js
@@ -1,4 +1,6 @@
-
+/**
+ * @namespace
+ */
exports.open = function(img, mask) {
return exports.dilate(exports.erode(img, mask), mask);
View
4 packages/net.js
@@ -3,6 +3,10 @@ jsio('import std.JSON as JSON');
JSON.createGlobal(); // create the global JSON object if it doesn't already exist
+/**
+ * @namespace
+ */
+
exports.listen = function(server, transportName, opts) {
if (!transportName) {
throw logger.error('No transport provided for net.listen');
View
3 packages/net/env/browser/csp.js
@@ -2,6 +2,9 @@ jsio('import net.interfaces');
jsio('from net.csp.client import CometSession');
jsio('import std.utf8 as utf8');
+/**
+ * @extends net.interfaces.Connector
+ */
exports.Connector = Class(net.interfaces.Connector, function() {
this.connect = function() {
this._state = net.interfaces.STATE.CONNECTING;
View
6 packages/net/env/browser/iframe.js
@@ -33,6 +33,9 @@ function findTarget(target) {
}
}
+/**
+ * @extends net.interfaces.Listener
+ */
exports.Listener = Class(net.interfaces.Listener, function(supr) {
var ID = 0;
@@ -288,6 +291,9 @@ exports.Listener = Class(net.interfaces.Listener, function(supr) {
}
});
+/**
+ * @extends net.interfaces.Connector
+ */
exports.Connector = Class(net.interfaces.Connector, function() {
this.connect = function() {
var target;
View
9 packages/net/env/browser/postmessage.js
@@ -1,6 +1,9 @@
jsio('import net.interfaces');
jsio('from util.browser import $');
+/**
+ * @extends net.interfaces.Listener
+ */
exports.Listener = Class(net.interfaces.Listener, function(supr) {
var ID = 0;
@@ -60,6 +63,9 @@ exports.Listener = Class(net.interfaces.Listener, function(supr) {
}
});
+/**
+ * @extends net.interfaces.Connector
+ */
exports.Connector = Class(net.interfaces.Connector, function() {
this.connect = function() {
$.onEvent(window, 'message', bind(this, '_onMessage'));
@@ -83,6 +89,9 @@ exports.Connector = Class(net.interfaces.Connector, function() {
}
});
+/**
+ * @extends net.interfaces.Transport
+ */
exports.Transport = Class(net.interfaces.Transport, function() {
this.init = function(win) {
this._win = win;
View
3 packages/net/env/browser/websocket.js
@@ -2,6 +2,9 @@ jsio('import net.interfaces');
jsio('import std.utf8 as utf8');
jsio('import net.errors as Errors');
+/**
+ * @extends net.interfaces.Connector
+ */
exports.Connector = Class(net.interfaces.Connector, function() {
this.connect = function() {
this._state = net.interfaces.STATE.CONNECTING;
View
3 packages/net/env/node/csp.js
@@ -24,6 +24,9 @@ var Transport = Class(net.interfaces.Transport, function() {
}
});
+/**
+ * @extends net.interfaces.Listener
+ */
exports.Listener = Class(net.interfaces.Listener, function(supr) {
this.listen = function() {
var s = createServer(bind(this, function(socket) {
View
4 packages/net/env/node/stdio.js
@@ -30,7 +30,9 @@ var Transport = Class(net.interfaces.Transport, function(supr) {
}
});
-
+/**
+ * @extends net.interfaces.Connector
+ */
exports.Connector = Class(net.interfaces.Connector, function() {
this.connect = function() {
var stdin = process.openStdin();
View
7 packages/net/env/node/tcp.js
@@ -22,7 +22,9 @@ var Transport = Class(net.interfaces.Transport, function() {
}
});
-
+/**
+ * @extends net.interfaces.Connector
+ */
exports.Connector = Class(net.interfaces.Connector, function() {
this.connect = function() {
@@ -40,6 +42,9 @@ exports.Connector = Class(net.interfaces.Connector, function() {
}
});
+/**
+ * @extends net.interfaces.Listener
+ */
exports.Listener = Class(net.interfaces.Listener, function(supr) {
this.listen = function() {
var s = nodeTcp.createServer(bind(this, function(socket) {
View
3 packages/net/protocols/Cuppa.js
@@ -98,6 +98,9 @@ var ReceivedEvent = Class(function() {
}
});
+/**
+ * @extends net.protocols.rtjp.RTJPProtocol;
+ */
exports = Class(RTJPProtocol, function(supr) {
this.init = function() {
supr(this, 'init', arguments);
View
3 packages/net/protocols/buffered.js
@@ -1,6 +1,9 @@
jsio('from net.interfaces import Protocol');
jsio('from net.buffer import Buffer');
+/**
+ * @extends net.interfaces.Protocol
+ */
exports.BufferedProtocol = Class(Protocol, function(supr) {
this.init = function() {
View
3 packages/net/protocols/delimited.js
@@ -1,5 +1,8 @@
jsio('import net.interfaces');
+/**
+ * @extends net.interfaces.Protocol
+ */
exports.DelimitedProtocol = Class(net.interfaces.Protocol, function(supr) {
this.init = function(delimiter) {
View
3 packages/net/protocols/echo.js
@@ -1,5 +1,8 @@
jsio('import net.interfaces');
+/**
+ * @extends net.interfaces.Protocol
+ */
exports.Protocol = Class(net.interfaces.Protocol, function() {
this.connectionMade = function() {
logger.debug('in connectionMade');
View
3 packages/net/protocols/mspp.js
@@ -87,6 +87,9 @@ state.closed = 0;
state.connecting = 1;
state.consuming = 2;
+/**
+ * @extends net.protocols.buffered.BufferedProtocol
+ */
exports.MSPPProtocol = Class(BufferedProtocol, function(supr) {
this.init = function() {
loggers.protocol.debug('new MSPPProtocol');
View
3 packages/net/protocols/rtjp.js
@@ -1,6 +1,9 @@
jsio('import net.interfaces');
jsio('from net.protocols.delimited import DelimitedProtocol');
+/**
+ * @extends net.protocols.delimited.DelimitedProtocol
+ */
exports.RTJPProtocol = Class(DelimitedProtocol, function(supr) {
this.init = function() {
var delimiter = '\r\n';
View
3 packages/net/protocols/stomp.js
@@ -1,6 +1,9 @@
jsio('from net.protocols.buffered import BufferedProtocol');
jsio('from util.sprintf import sprintf');
+/**
+ * @extends net.protocols.buffered.BufferedProtocol
+ */
exports.StompProtocol = Class(BufferedProtocol, function(supr) {
this.init = function() {

0 comments on commit f64c0ca

Please sign in to comment.