1 |
|
2 | //
|
3 | // IperElement
|
4 | // ===========
|
5 | //
|
6 |
|
7 | var _ = require('underscore')
|
8 |
|
9 | // Constructor
|
10 |
|
11 | function IperElement(graph) {
|
12 |
|
13 | // graph
|
14 | function getGraph() { return graph }
|
15 |
|
16 | Object.defineProperty(this, 'graph', {get: getGraph})
|
17 |
|
18 | // id
|
19 | var id = _.uniqueId()
|
20 |
|
21 | function getId() { return id }
|
22 |
|
23 | Object.defineProperty(this, 'id', {get: getId})
|
24 | }
|
25 |
|
26 | module.exports = IperElement
|
27 |
|