class HTML inherit ANY undefine out end create make feature make is do create options.make end feature -- Routines out out: STRING is do Result := "") Result.append ("%N") Result.append (head_out) Result.append ("%N") Result.append (body_out) Result.append ("%N") end; body_out: STRING is do Result := "" Result.append ("%N") from options.start until options.after loop Result.append (options.item) Result.append ("%N") options.forth end; Result.append ("%N") end; attributes_out, body_attributes_out: STRING is do Result := "" end head_out: STRING is do Result := "" Result.append ("") if has_value (title_value) then Result.append (title_value) end Result.append ("") Result.append ("%N") end; feature -- Wipe out wipe_out is do options.wipe_out end feature -- Set set_title (s: STRING) is do title_value := clone (s) end feature -- Add new options add_option (an_option: STRING) is require an_option /= Void do options.extend (clone (an_option)) end feature {NONE} has_value(s: STRING): BOOLEAN is -- Has the attribute 's' a value ? do if s = Void or else s.is_equal ("") then Result := False else Result := True end end feature {NONE} title_value: STRING options: LINKED_LIST [STRING] end -- class HTML --|---------------------------------------------------------------- --| EiffelWeb: library of reusable components for ISE Eiffel. --| Copyright (C) 1986-2001 Interactive Software Engineering Inc. --| All rights reserved. Duplication and distribution prohibited. --| May be used only with ISE Eiffel, under terms of user license. --| Contact ISE for any other use. --| --| Interactive Software Engineering Inc. --| ISE Building --| 360 Storke Road, Goleta, CA 93117 USA --| Telephone 805-685-1006, Fax 805-685-6869 --| Electronic mail --| Customer support: http://support.eiffel.com> --| For latest info see award-winning pages: http://www.eiffel.com --|----------------------------------------------------------------