Subversion Repositories public iLand

Rev

Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1185 werner 1
 
2
/**
3
 * This file represents a basic class in JS.
4
 *
5
 * Here's a code sample:
6
 *
7
 *     (function() {
8
 *         // I'm an IIFE!  So let's win everything:
9
 *         window.winEverything();
10
 *     }());
11
 *
12
 * And whenever you want to have whatever `this styling` is, just use those backticks!
13
 *
14
 * @class BasicClass
15
 * @module Classes
16
 */
17
function BasicClass() {
18
}
19
 
20
BasicClass.prototype = {
21
    /**
22
     * A simple property.
23
     *
24
     * @property instanceVar
25
     * @type Number
26
     * @default 1
27
     */
28
    instanceVar: 1,
29
 
30
    /**
31
     * Another simple property.
32
     *
33
     * @property instanceVar2
34
     * @type Number
35
     * @default 2
36
     */
37
    instanceVar2: 2,
38
 
39
    /**
40
     * A simple method that does something and returns nothing.
41
     *
42
     * @method simpleMethod
43
     */
44
    simpleMethod: function () {},
45
 
46
    /**
47
     * A chainable method.
48
     *
49
     * @method chainableMethod
50
     * @chainable
51
     */
52
    chainableMethod: function () {
53
        return this;
54
    },
55
 
56
    /**
57
     * Takes params and returns something.
58
     *
59
     * @method multTwo
60
     * @param n {Number} some number
61
     * @return `n * 2`
62
     */
63
    multTwo: function (n) {
64
        return n * 2;
65
    },
66
 
67
    /**
68
     * A namespaced method.
69
     *
70
     * @method a.method
71
     */
72
    aMethod: function () {},
73
 
74
    /**
75
     * Another namespaced method.
76
     *
77
     * @method z.method
78
     */
79
    zMethod: function () {},
80
 
81
    /**
82
     * Another simple method to take up space.
83
     *
84
     * @method simpleA
85
     */
86
    simpleA: function () {},
87
 
88
    /**
89
     * Another simple method to take up space.
90
     *
91
     * @method simpleB
92
     */
93
    simpleB: function () {},
94
 
95
    /**
96
     * Another simple method to take up space.
97
     *
98
     * @method simpleC
99
     */
100
    simpleC: function () {},
101
 
102
    /**
103
     * Another simple method to take up space.
104
     *
105
     * @method simpleD
106
     */
107
    simpleD: function () {},
108
    /**
109
     * Another simple method to take up space.
110
     *
111
     * @method simpleE
112
     */
113
    simpleE: function () {},
114
    /**
115
     * Another simple method to take up space.
116
     *
117
     * @method simpleF
118
     */
119
    simpleF: function () {},
120
    /**
121
     * Another simple method to take up space.
122
     *
123
     * @method simpleG
124
     */
125
    simpleG: function () {}
126
};
127