| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- "use strict";
- var ListOfMatchExpression = require('./ListOfMatchExpression');
- // Autogenerated by cport.py on 2013-09-17 14:37
- var NorMatchExpression = module.exports = function NorMatchExpression(){
- base.call(this);
- this._matchType = 'NOR';
- }, klass = NorMatchExpression, base = ListOfMatchExpression, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
- /**
- *
- * Writes a debug string for this object
- * @method debugString
- * @param level
- *
- */
- proto.debugString = function debugString(level) {
- // File: expression_tree.cpp lines: 138-141
- return this._debugAddSpace( level ) + "$nor\n" + this._debugList( level );
- };
- /**
- *
- * matches checks the input doc against the internal element path to see if it is a match
- * @method matches
- * @param doc
- * @param details
- *
- */
- proto.matches = function matches(doc,detail) {
- // File: expression_tree.cpp lines: 120-126
- for (var i = 0; i < this.numChildren(); i++) {
- if( this.getChild(i).matches( doc, null )) {
- return false;
- }
- }
- return true;
- };
- /**
- *
- * Check if the input element matches
- * @method matchesSingleElement
- * @param e
- *
- */
- proto.matchesSingleElement = function matchesSingleElement(e) {
- // File: expression_tree.cpp lines: 129-135
- for (var i = 0; i < this.numChildren(); i++) {
- if( this.getChild(i).matchesSingleElement( e )) {
- return false;
- }
- }
- return true;
- };
- /**
- *
- * clone this instance to a new one
- * @method shallowClone
- *
- */
- proto.shallowClone = function shallowClone(){
- // File: expression_tree.h lines: 105-110
- // virtual MatchExpression* shallowClone() const {
- // NorMatchExpression* self = new NorMatchExpression();
- // for (size_t i = 0; i < numChildren(); ++i) {
- // self->add(getChild(i)->shallowClone());
- // }
- // return self;
- // }
- var e = new NorMatchExpression();
- for (var i = 0; i < this.numChildren(); i++) {
- e.add(this.getChild(i).shallowClone());
- }
- if (this.getTag()) {
- e.setTag(this.getTag().clone());
- }
- return e;
- };
|