indexing description: "Project retrieve statistics reply message." author: "Dennis Rietmann " date: "$Date$" revision: "$Revision$" class O_PROJECT_RETRIEVE_STATISTICS_REPLY_MESSAGE inherit O_MESSAGE rename make as make_message redefine make_from_generic end O_PROJECT_CONSTANTS undefine out end create make create {O_MESSAGE_FACTORY} make_from_generic feature {NONE} -- Initialization make (a_project_count: like project_count; a_open_source_count: like open_source_count) is -- Create. require a_project_count_ok: a_project_count > -1 a_open_source_count_ok: a_open_source_count > -1 do make_message project_count := a_project_count open_source_count := a_open_source_count ensure project_count_set: project_count = a_project_count open_source_count_set: open_source_count = a_open_source_count end make_from_generic (a_msg: O_GENERIC_MESSAGE) is -- Create from a generic message. local l_args: HASH_TABLE [STRING, STRING] do Precursor (a_msg) l_args := a_msg.arguments project_count := l_args.item (project_count_argument).to_integer open_source_count := l_args.item (open_source_count_argument).to_integer end feature -- Access namespace: STRING is -- Namespace of the message type. once Result := project_namespace end type: STRING is -- Type of the message. once Result := project_retrieve_statistics_reply_type end project_count: INTEGER -- the number of projects open_source_count: INTEGER -- the number of open-source projects arguments: HASH_TABLE [STRING, STRING] is -- Named arguments. do create Result.make (2) Result.force (project_count.out, project_count_argument) Result.force (open_source_count.out, open_source_count_argument) end feature {NONE} -- Implementation project_count_argument: STRING is "project_count" open_source_count_argument: STRING is "open_source_count" invariant project_count_ok: project_count > -1 open_source_count_ok: open_source_count > -1 end