Class: MINT::AIO

Inherits:
Interactor show all
Defined in:
lib/MINT-core/model/aui/AIO.rb

Direct Known Subclasses

AIIN, AIOUT

Constant Summary

Constants inherited from Interactor

Interactor::PUBLISH_ATTRIBUTES

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Interactor

class_from_channel_name, #create_attribute_channel_name, create_channel_name, #create_channel_w_name, get, get_dm, #init_statemachine, #is_in?, #new_states, notify, #process_event, #process_event!, #process_event_vars, #publish_update, #states, #states=, #sync_event, #sync_states, #to_dot, wait

Methods included from InteractorHelpers

#restart_timeout, #start_timeout, #stop_timeout

Class Method Details

.getModelObject



11
12
13
# File 'lib/MINT-core/model/aui/AIO.rb', line 11

def self.getModel
  "aui"
end

Instance Method Details

#exists_nextObject

callbacks



78
79
80
# File 'lib/MINT-core/model/aui/AIO.rb', line 78

def exists_next
  self.next!=nil
end

#exists_parentObject



86
87
88
# File 'lib/MINT-core/model/aui/AIO.rb', line 86

def exists_parent
  self.parent!=nil
end

#exists_prevObject



82
83
84
# File 'lib/MINT-core/model/aui/AIO.rb', line 82

def exists_prev
  self.previous!=nil
end

#focus_nextObject



107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/MINT-core/model/aui/AIO.rb', line 107

def focus_next
  if (self.next)
    if self.next.process_event("focus")
      return true
    else
      puts "ERRROR #{self.next.name} could not execute focus event"
      return false
    end
  else
    puts "WARNING!! > no next element found!"
    return false
  end
end

#focus_parentObject



99
100
101
102
103
104
105
# File 'lib/MINT-core/model/aui/AIO.rb', line 99

def focus_parent
  if (self.parent)
    self.parent.process_event("focus")
  else
    return false # TODO not working, find abbruchbedingung!!!
  end
end

#focus_previousObject



91
92
93
94
95
96
97
# File 'lib/MINT-core/model/aui/AIO.rb', line 91

def focus_previous
  if (self.previous)
    self.previous.process_event("focus")
  else
    return false # TODO not working, find abbruchbedingung!!!
  end
end

#getSCXMLObject



16
17
18
# File 'lib/MINT-core/model/aui/AIO.rb', line 16

def getSCXML
  "#{File.dirname(__FILE__)}/aio.scxml"
end

#inform_parent_presentingObject

hook to inform parent about presenting state



71
72
73
74
# File 'lib/MINT-core/model/aui/AIO.rb', line 71

def inform_parent_presenting
  self.parent.child_to_presenting(self) if (self.parent)
  true
end

#nextObject



42
43
44
45
46
47
48
49
# File 'lib/MINT-core/model/aui/AIO.rb', line 42

def next
  p = super
  if p
    AIO.get("aui",p)
  else
    nil
  end
end

#next2strObject



51
52
53
# File 'lib/MINT-core/model/aui/AIO.rb', line 51

def next2str
  self.next.name if self.next
end

#parentObject



20
21
22
23
24
25
26
27
28
# File 'lib/MINT-core/model/aui/AIO.rb', line 20

def parent
  p = super
  if p
    r = AIContainer.get("aui",p)
    return r
  else
    nil
  end
end

#parent2strObject



38
39
40
# File 'lib/MINT-core/model/aui/AIO.rb', line 38

def parent2str
  parent.name      if  self.parent
end

#parent=(p) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/MINT-core/model/aui/AIO.rb', line 30

def parent= (p)
  if p.nil? or p.is_a? String
    super(p)
  else
    super(p.name)
  end
end

#previousObject



56
57
58
59
60
61
62
63
# File 'lib/MINT-core/model/aui/AIO.rb', line 56

def previous
  p = super
  if p
    AIO.get("aui",p)
  else
    nil
  end
end

#previous2strObject



65
66
67
# File 'lib/MINT-core/model/aui/AIO.rb', line 65

def previous2str
  previous.name if  self.previous
end