/branches/version1.x/test/data/memberof.js

http://jsdoc-toolkit.googlecode.com/ · JavaScript · 36 lines · 16 code · 5 blank · 15 comment · 0 complexity · 3255aa675c8094fa1f938780ea44c232 MD5 · raw file

  1. // nested constructors
  2. /** @constructor */
  3. function ShapeFactory() {
  4. /** @constructor */
  5. this.SquareMaker = function(size) {
  6. /** @constructor */
  7. this.Square = function(s) {
  8. /** The size. */
  9. this.size = s;
  10. this.display = function() {
  11. alert("square: "+s);
  12. }
  13. }
  14. }
  15. }
  16. /** @class */
  17. function Circle(){}
  18. /** The radius. */
  19. Circle.prototype.radius = 1;
  20. /**
  21. @member Circle
  22. */
  23. getDiameter = f1;
  24. /**
  25. @memberOf Circle
  26. */
  27. getCircumference = f2;
  28. String.prototype.toWords = function() {
  29. }
  30. // would be called like this:
  31. // var s = new new new ShapeFactory().SquareMaker(4).Square(2);