Store in GIT
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
var plane_class_1 = require("./plane.class");
|
||||
var Reader = (function () {
|
||||
function Reader(id, reader_id, plane) {
|
||||
this.id = id;
|
||||
this.reader_id = reader_id;
|
||||
this.plane = plane;
|
||||
}
|
||||
Reader.prototype.equals = function (other) {
|
||||
if (other) {
|
||||
var keySet1 = Object.keys(this);
|
||||
var keySet2 = Object.keys(other);
|
||||
var j = 0;
|
||||
var isTheSame = true;
|
||||
for (j; j < keySet1.length; j++) {
|
||||
if (this[keySet1[j]] !== other[keySet2[j]]) {
|
||||
// Shit is not the same
|
||||
isTheSame = false;
|
||||
}
|
||||
}
|
||||
return isTheSame;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reader.toReader = function (r) {
|
||||
var plane = null;
|
||||
if (r.PLANE != null)
|
||||
plane = plane_class_1.Plane.toPlane(r.PLANE);
|
||||
var reader = new Reader(r.ID, r.READER_ID, plane);
|
||||
//console.log('Parsed reader:', reader);
|
||||
return reader;
|
||||
};
|
||||
return Reader;
|
||||
}());
|
||||
exports.Reader = Reader;
|
||||
//# sourceMappingURL=reader.class.js.map
|
||||
Reference in New Issue
Block a user