1/** 2 * Created by edseventeen on 11/23/13. 3 */ 4function RedNaoInternalEventManager() 5{ 6 this.Events={}; 7} 8 9RedNaoInternalEventManager.prototype.Subscribe=function(eventName,callBack) 10{ 11 if(typeof this.Events[eventName]=='undefined') 12 this.Events[eventName]=[]; 13 14 this.Events[eventName].push(callBack); 15}; 16 17RedNaoInternalEventManager.prototype.Publish=function(eventName,args) 18{ 19 var eventArray=this.Events[eventName]; 20 if(typeof eventArray=='undefined') 21 return; 22 23 var result; 24 for(var i=0;i<eventArray.length;i++) 25 { 26 try{ 27 if(typeof args=='undefined') 28 result=eventArray[i](); 29 else 30 result=eventArray[i](args); 31 }catch (Exception){ 32 console.log('Error catched',Exception); 33 } 34 } 35 36 return result; 37}; 38 39if(typeof RedNaoEventManager=='undefined') 40{ 41 var RedNaoEventManager=new RedNaoInternalEventManager(); 42}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.