module Syskit::Models::Base

Generic module included in all classes that are used as models.

The Roby plugin uses, as Roby does, Ruby classes as model objects. To ease code reading, the model-level functionality (i.e. singleton classes) are stored in separate modules whose name finishes with Model

For instance, the singleton methods of Component are defined on ComponentModel, Composition on CompositionModel and so on.

Public Instance Methods

dependency_injection_names() click to toggle source

List of names that are valid for this model in the context of DependencyInjection

# File lib/syskit/models/base.rb, line 17
def dependency_injection_names; [] end
pretty_print(pp) click to toggle source
# File lib/syskit/models/base.rb, line 32
def pretty_print(pp)
    pp.text(name || "")
end
short_name() click to toggle source

The model name that should be used in messages that are displayed to the user. Note that Syskit defines Class#short_name as an alias to name so that short_name can be used everywhere

# File lib/syskit/models/base.rb, line 22
def short_name
    if name then name
    else to_s
    end
end
to_instance_requirements() click to toggle source

Generates the InstanceRequirements object that represents self best

@return [Syskit::InstanceRequirements]

# File lib/syskit/models/base.rb, line 40
def to_instance_requirements
    Syskit::InstanceRequirements.new([self])
end
to_s() click to toggle source
Calls superclass method
# File lib/syskit/models/base.rb, line 28
def to_s
    name || super
end