module Expressir module Model module Declarations # Specified in ISO 10303-11:2004 # - section 9.5.2 Procedure class Procedure < Declaration include Identifier model_attr_accessor :parameters, 'Array' model_attr_accessor :types, 'Array' model_attr_accessor :entities, 'Array' model_attr_accessor :subtype_constraints, 'Array' model_attr_accessor :functions, 'Array' model_attr_accessor :procedures, 'Array' model_attr_accessor :constants, 'Array' model_attr_accessor :variables, 'Array' model_attr_accessor :statements, 'Array' # @param [Hash] options # @option (see Identifier#initialize_identifier) # @option options [Array] :parameters # @option options [Array] :types # @option options [Array] :entities # @option options [Array] :subtype_constraints # @option options [Array] :functions # @option options [Array] :procedures # @option options [Array] :constants # @option options [Array] :variables # @option options [Array] :statements def initialize(options = {}) initialize_identifier(options) @parameters = options[:parameters] || [] @types = options[:types] || [] @entities = options[:entities] || [] @subtype_constraints = options[:subtype_constraints] || [] @functions = options[:functions] || [] @procedures = options[:procedures] || [] @constants = options[:constants] || [] @variables = options[:variables] || [] @statements = options[:statements] || [] super end # @return [Array] def children [ *parameters, *types, *types.flat_map{|x| x.enumeration_items}, *entities, *subtype_constraints, *functions, *procedures, *constants, *variables, *remark_items ] end end end end end