Meki Cherkaoui | f441d3a | 2012-04-22 15:17:52 -0700 | [diff] [blame] | 1 | /* |
| 2 | * @author: ucla-cs |
| 3 | * This class represents Exclude Component OBjects |
| 4 | */ |
| 5 | |
| 6 | var ExcludeComponent = function ExcludeComponent(_Body) { |
| 7 | |
| 8 | //TODO Check BODY is an Array of componenets. |
| 9 | |
| 10 | this.Body = _Body |
| 11 | }; |
| 12 | |
| 13 | ExcludeComponent.prototype.decode = function( decoder) { |
| 14 | body = decoder.readBinaryElement(this.getElementLabel()); |
| 15 | }; |
| 16 | |
| 17 | ExcludeComponent.prototype.encode = function(encoder) { |
| 18 | encoder.writeElement(this.getElementLabel(), body); |
| 19 | }; |
| 20 | |
| 21 | ExcludeComponent.prototype.getElementLabel = function() { return CCNProtocolDTags.Component; }; |
| 22 | |