jspos
Version:
JavaScript ISO8583 ,JavaScript version of JPOS
120 lines (98 loc) • 3.36 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @author Sean sean.snow@live.com
* @date 2015/12/25
*/
var ISOComponent = function () {
function ISOComponent() {
_classCallCheck(this, ISOComponent);
}
_createClass(ISOComponent, [{
key: "set",
/**
* Set a field within this message
* @param c - a component
*/
value: function set(c) {}
/**
* valid on Leafs only.
* The value returned is used by ISOMsg as a key
* to this field.
*
* @return object representing the field number
*/
}, {
key: "getKey",
value: function getKey() {}
/**
* valid on Leafs only.
* @return object representing the field value
*/
}, {
key: "getValue",
value: function getValue() {}
}, {
key: "setValue",
value: function setValue(value) {}
}, {
key: "unset",
value: function unset(fldno) {}
/**
* get Value as bytes (when possible)
* @return Array byte[] representing this field
*/
}, {
key: "getBytes",
value: function getBytes() {}
}, {
key: "pack",
value: function pack() {}
}, {
key: "unpack",
value: function unpack(b) {}
}, {
key: "setFieldNumber",
value: function setFieldNumber(fieldNumber) {}
}, {
key: "getFieldNumber",
value: function getFieldNumber() {}
/**
* In order to interchange <b>Composites</b> and <b>Leafs</b> we use
* getComposite(). A <b>Composite component</b> returns itself and
* a Leaf returns null. The base class ISOComponent provides
* <b>Leaf</b> functionality.
*
* @return ISOComponent
*/
}, {
key: "getComposite",
value: function getComposite() {
return null;
}
/**
* dummy behaviour - return 0 elements Hashtable
* @return Object children (in this case 0 children)
*/
}, {
key: "getChildren",
value: function getChildren() {
return {};
}
/**
* a Composite must override this function
* @return Number the max field number associated with this message
*/
}, {
key: "getMaxField",
value: function getMaxField() {
return 0;
}
}]);
return ISOComponent;
}();
exports.default = ISOComponent;
;