indexing description: "[ An EM_GOOF_LOADER_NODE_PROCESSOR to load EM_GOOF_GRAVITY from xml file. ]" date: "$Date$" revision: "$Revision$" class EM_GOOF_LOADER_FORCE_GRAVITY_NODE_PROCESSOR inherit EM_GOOF_LOADER_NODE_PROCESSOR undefine make end create make feature -- Initialization make is -- Make 'Current' do Precursor Current.register_allowed_subnode ("force", name) end feature -- Access Name: STRING is -- Name of element to process do Result := "gravity" end Mandatory_attributes: ARRAY [STRING] is -- Table of mandatory attributes once Result := << "strength" >> Result.compare_objects end feature -- Basic operations process is -- Process node. local force: EM_GOOF_GRAVITY do if not has_attribute ("strength") then set_error (Mandatory_attribute_missing, << "strength" >>) elseif not attribute("strength").is_double then set_error (Non_numeric_argument, << "strength" >>) else create force.make(attribute("strength").to_double) level.add_force(force) end end file: STRING -- String in which the filename is stored end