Added html encoding facility to WSF_STRING

Added WSF_STRING.is_empty
Improved HTML_ENCODER to be able to decode a STRING_8 or STRING_32 using general_decoded_string (s)
Improved tutorial example
Added precompilation for WSF library
Cosmetic (removed unused locals)
This commit is contained in:
Jocelyn Fiat
2012-05-30 09:36:55 +02:00
parent 8dd0cb29fa
commit 0d5011b03e
11 changed files with 280 additions and 47 deletions

View File

@@ -56,6 +56,12 @@ feature -- Status report
is_string: BOOLEAN = True
-- Is Current as a WSF_STRING representation?
is_empty: BOOLEAN
-- Is empty?
do
Result := string.is_empty
end
feature -- Helper
same_string (a_other: READABLE_STRING_GENERAL): BOOLEAN
@@ -84,6 +90,25 @@ feature -- Conversion
create Result.make_from_string (string)
end
html_encoded_name: READABLE_STRING_8
-- HTML encoded string `name'
do
Result := (create {HTML_ENCODER}).encoded_string (name)
end
html_encoded_string: READABLE_STRING_8
-- HTML encoded string `string'
do
Result := (create {HTML_ENCODER}).encoded_string (string)
end
feature {NONE} -- Conversion
html_decoded_string (s: READABLE_STRING_GENERAL): READABLE_STRING_32
do
Result := (create {HTML_ENCODER}).general_decoded_string (s)
end
feature -- Visitor
process (vis: WSF_VALUE_VISITOR)

View File

@@ -114,7 +114,6 @@ feature {WSF_SERVICE, WSF_RESPONSE} -- Output
send_to (res: WSF_RESPONSE)
local
b: like body
h: like header
s: STRING_8
do