/[freeride]/freeride/freebase/databus.rb
ViewVC logotype

Diff of /freeride/freebase/databus.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by ljulliar, Mon Jul 1 15:19:47 2002 UTC revision 1.7 by ljulliar, Fri Jul 5 12:47:30 2002 UTC
# Line 43  module FreeBASE Line 43  module FreeBASE
43      # True to enable validating values in slots, default=true      # True to enable validating values in slots, default=true
44      attr_accessor :validation_enabled      attr_accessor :validation_enabled
45    
46      # True if notify method propogates to parent.notify, default=true      # True if notify method propagates to parent.notify, default=true
47      attr_accessor :propogate_notifications      attr_accessor :propagate_notifications
48            
49      # The root of this DataBus      # The root of this DataBus
50      attr_reader :root      attr_reader :root
# Line 59  module FreeBASE Line 59  module FreeBASE
59        @root = Slot.new("", nil, self)        @root = Slot.new("", nil, self)
60        @idCount = 0        @idCount = 0
61        @validation_enabled = true        @validation_enabled = true
62        @propogate_notifications = true        @propagate_notifications = true
63      end      end
64            
65      ##      ##
# Line 91  module FreeBASE Line 91  module FreeBASE
91        STACK = "stack_slot"        STACK = "stack_slot"
92        PROC  = "proc_slot"        PROC  = "proc_slot"
93                
94        # True if notify method propogates to parent.notify, default=true        # True if notify method propagates to parent.notify, default=true
95        attr_accessor :propogate_notifications        attr_accessor :propagate_notifications
96                
97        attr_reader :path, :parent, :name, :attrs        attr_reader :path, :parent, :name, :attrs
98                
# Line 110  module FreeBASE Line 110  module FreeBASE
110          @databus = databus          @databus = databus
111          @slots = Hash.new          @slots = Hash.new
112          @subscribers = Hash.new          @subscribers = Hash.new
113          @propogate_notifications = true          @propagate_notifications = true
114          notify(:notify_slot_add)          notify(:notify_slot_add)
115        end        end
116                
# Line 393  module FreeBASE Line 393  module FreeBASE
393                
394        ##        ##
395        # Sends out a notification to subscribers of this slot.  If this slot        # Sends out a notification to subscribers of this slot.  If this slot
396        # has a parent, the notification is propogated to the parent's notify method        # has a parent, the notification is propagated to the parent's notify method
397        # until the root slot is reached.        # until the root slot is reached.
398        #        #
399        # event:: [Symbol] The event (:notify_obj_action)        # event:: [Symbol] The event (:notify_obj_action)
# Line 410  module FreeBASE Line 410  module FreeBASE
410              end              end
411            end            end
412          end          end
413          @parent.notify(event, slot) if @propogate_notifications and @databus.propogate_notifications and @parent          @parent.notify(event, slot) if @propagate_notifications and @databus.propagate_notifications and @parent
414        end        end
415                
416        ##        ##
# Line 523  module FreeBASE Line 523  module FreeBASE
523            
524      ##      ##
525      # The Queue class represents a FIFO list for Slots that may need      # The Queue class represents a FIFO list for Slots that may need
526      # to manage such data (such as User Interface event propogation).      # to manage such data (such as User Interface event propagation).
527      #      #
528      class Queue      class Queue
529                

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26