Class: Syskit::Actions::Profile::ProfileInstanceRequirements
- Inherits:
-
InstanceRequirements
- Object
- InstanceRequirements
- Syskit::Actions::Profile::ProfileInstanceRequirements
- Defined in:
- lib/syskit/actions/profile.rb
Overview
An InstanceRequirements object created from a profile Definition
Direct Known Subclasses
Instance Attribute Summary collapse
-
#profile ⇒ Profile
The profile this definition comes from.
Attributes inherited from InstanceRequirements
#arguments, #base_model, #deployment_group, #deployment_hints, #dynamics, #model, #name, #required_host, #specialization_hints, #template
Instance Method Summary collapse
-
#advanced=(value) ⇒ Object
@method! advanced? @method! advanced=(flag).
-
#advanced? ⇒ Boolean
@method! advanced? @method! advanced=(flag).
-
#initialize(profile, name, advanced: false) ⇒ ProfileInstanceRequirements
constructor
A new instance of ProfileInstanceRequirements.
-
#rebind(profile) ⇒ Object
Return a definition that has a different underlying profile.
- #to_action_model(profile = self.profile, doc = self.doc) ⇒ Object
Methods inherited from InstanceRequirements
#==, #abstract, #abstract?, #add_models, #add_port_period, #as, #as_plan, #as_real_model, #as_real_model!, #bind, #can_use_template=, #can_use_template?, #component_model, #component_model?, #composition_model?, #compute_template, #create_proxy_task, #do_copy, #each_child, #each_fullfilled_model, #each_input_port, #each_output_port, #each_port, #each_required_model, #each_required_service_model, #eql?, #find_all_data_services_from_type, #find_child, #find_data_service, #find_data_service_from_type, #find_input_port, #find_output_port, #find_port, #find_port_dynamics, #find_through_method_missing, from_object, #fullfilled_model, #fullfills?, #has_child?, #has_data_service?, #has_port?, #has_template?, #has_through_method_missing?, #hash, #if_already_present, #initialize_copy, #instanciate, #instanciate_from_template, #invalidate_dependency_injection, #invalidate_template, #map_use_selections!, #merge, #narrow_model, #not_abstract, #on_server, #period, #placeholder_model, #plain?, #port_by_name, #post_instanciation_setup, #prefer_deployed_tasks, #prefer_specializations, #pretty_print, #push_dependency_injection, #push_selections, #reset_deployment_selection, #resolve, #resolved_dependency_injection, #select_service, #selected_for, #self_port_to_component_port, #service, #simplest_model_representation, #specialize, #to_action, #to_component_model, #to_coordination_task, #to_instance_requirements, #to_s, #try_bind, #try_resolve, #unselect_service, #use, #use_conf, #use_configured_deployment, #use_deployment, #use_deployment_group, #with_arguments, #with_conf, #with_no_arguments
Constructor Details
#initialize(profile, name, advanced: false) ⇒ ProfileInstanceRequirements
Returns a new instance of ProfileInstanceRequirements
30 31 32 33 34 35 |
# File 'lib/syskit/actions/profile.rb', line 30 def initialize(profile, name, advanced: false) super() self.profile = profile self.advanced = advanced self.name = name end |
Instance Attribute Details
#profile ⇒ Profile
The profile this definition comes from
21 22 23 |
# File 'lib/syskit/actions/profile.rb', line 21 def profile @profile end |
Instance Method Details
#advanced=(value) ⇒ Object
@method! advanced? @method! advanced=(flag)
Whether this is an advanced definition. This is purely a hint for UIs
28 |
# File 'lib/syskit/actions/profile.rb', line 28 attr_predicate :advanced?, true |
#advanced? ⇒ Boolean
@method! advanced? @method! advanced=(flag)
Whether this is an advanced definition. This is purely a hint for UIs
28 |
# File 'lib/syskit/actions/profile.rb', line 28 attr_predicate :advanced?, true |
#rebind(profile) ⇒ Object
Return a definition that has a different underlying profile
38 39 40 41 42 43 44 45 46 |
# File 'lib/syskit/actions/profile.rb', line 38 def rebind(profile) if rebound = profile.find_definition_by_name(name) rebound else result = dup result.profile = profile result end end |
#to_action_model(profile = self.profile, doc = self.doc) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/syskit/actions/profile.rb', line 48 def to_action_model(profile = self.profile, doc = self.doc) action_model = super(doc) action_model.name = "#{name}_def" action_model.advanced = advanced? action_model end |