Class: Roby::Distributed::DRobyTaskModel
- Inherits:
-
DRobyModel
- Object
- DRobyModel
- Roby::Distributed::DRobyTaskModel
- Defined in:
- lib/roby/distributed/protocol.rb
Overview
Dumping intermediate for Task classes. This dumps both the ancestor list via DRobyModel and the list of task tags.
Defined Under Namespace
Modules: Dump
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Set of task tags the task model was referring to.
Attributes inherited from DRobyModel
Class Method Summary collapse
-
._load(str) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#==(other) ⇒ Object
True if
otherdescribes the same task model thanself. -
#_dump(lvl) ⇒ Object
:nodoc:.
-
#initialize(tags, ancestors) ⇒ DRobyTaskModel
constructor
Create a DRobyTaskModel with the given tags and ancestor list.
-
#proxy(peer) ⇒ Object
Returns or creates a Task-subclass which matches the task model described by this object.
Methods inherited from DRobyModel
local_model, local_to_remote, remote_to_local, #to_s
Constructor Details
#initialize(tags, ancestors) ⇒ DRobyTaskModel
Create a DRobyTaskModel with the given tags and ancestor list
438 439 440 441 |
# File 'lib/roby/distributed/protocol.rb', line 438 def initialize(, ancestors) super(ancestors) = end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Set of task tags the task model was referring to
436 437 438 |
# File 'lib/roby/distributed/protocol.rb', line 436 def end |
Class Method Details
._load(str) ⇒ Object
:nodoc:
474 475 476 |
# File 'lib/roby/distributed/protocol.rb', line 474 def self._load(str) # :nodoc: DRobyTaskModel.new(*Marshal.load(str)) end |
Instance Method Details
#==(other) ⇒ Object
True if other describes the same task model than self
466 467 468 469 |
# File 'lib/roby/distributed/protocol.rb', line 466 def ==(other) super && == other. end |
#_dump(lvl) ⇒ Object
:nodoc:
471 472 473 |
# File 'lib/roby/distributed/protocol.rb', line 471 def _dump(lvl) # :nodoc: @__droby_marshalled__ ||= Marshal.dump([, ancestors]) end |
#proxy(peer) ⇒ Object
Returns or creates a Task-subclass which matches the task model described by this object
480 481 482 483 484 485 486 487 488 |
# File 'lib/roby/distributed/protocol.rb', line 480 def proxy(peer) model = super .each do |tag| tag = tag.proxy(nil) model.include tag unless model < tag end model end |