Module: Roby::Distributed::DRobyModel::Dump
- Defined in:
- lib/roby/distributed/protocol.rb
Overview
Generic implementation of #droby_dump for all classes which should be marshalled as DRobyModel.
Instance Method Summary collapse
-
#droby_dump(dest) ⇒ Object
Creates a DRobyModel object which can be used to reference
selfin the communication protocol.
Instance Method Details
#droby_dump(dest) ⇒ Object
Creates a DRobyModel object which can be used to reference self in the communication protocol. It properly takes into account the anonymous models we have created to map remote unknown models.
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/roby/distributed/protocol.rb', line 355 def droby_dump(dest) unless @__droby_marshalled__ formatted = ancestors.map do |klass| if klass.instance_of?(Class) && !klass.is_singleton? if result = DRobyModel.local_to_remote[klass] result else [klass.name, klass.remote_id] end end end formatted.compact! @__droby_marshalled__ = DRobyModel.new(formatted) end @__droby_marshalled__ end |