Class: Class
- Defined in:
- lib/roby/state/state_model.rb,
lib/roby/distributed_object.rb,
lib/roby/droby/enable.rb
Instance Method Summary collapse
- #droby_dump(dest) ⇒ Object
-
#private_model ⇒ Object
Declares that neither this model nor its subclasses should be sent to remote peers.
-
#private_model? ⇒ Boolean
If true, this model will never get sent to remote peers.
-
#to_state_variable_model(field, name) ⇒ Object
Implementation of a conversion to StateVariableModel.
Instance Method Details
#droby_dump(dest) ⇒ Object
20 21 22 |
# File 'lib/roby/droby/enable.rb', line 20 def droby_dump(dest) raise "can't dump class #{self}" end |
#private_model ⇒ Object
Declares that neither this model nor its subclasses should be sent to remote peers.
I.e., from the point of view of our peers, instances of this model are actually instances of its superclass.
22 23 24 |
# File 'lib/roby/distributed_object.rb', line 22 def private_model @private_model = true end |
#private_model? ⇒ Boolean
If true, this model will never get sent to remote peers.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/roby/distributed_object.rb', line 6 def private_model? if !@private_model.nil? @private_model else klass = superclass if superclass.respond_to?(:private_model?) superclass.private_model? end end end |
#to_state_variable_model(field, name) ⇒ Object
Implementation of a conversion to StateVariableModel
It makes it possible to use a class to initialize a state leaf model with
state.model.path.to.value = MyClass
9 10 11 12 13 |
# File 'lib/roby/state/state_model.rb', line 9 def to_state_variable_model(field, name) model = Roby::StateVariableModel.new(field, name) model.type = self model end |