Files
EWF/library/text/encoder/src/encoder.e
Jocelyn Fiat f74ac66569 First integration of the new GW_ design more centralized on connector, and does not require specific feature on GW_APPLICATION depending on the connector.
So this is really more flexible this way, and much easier to write application supporting CGI, FCGI, Nino and so on .. as demonstrated in hello_world

This is a first version, more will come later, mainly migrating from Eiffel Web Reloaded to this Eiffel Web Framework project.
2011-07-12 11:53:00 +02:00

74 lines
1.5 KiB
Plaintext

note
description: "Summary description for {ENCODER}."
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
deferred class
ENCODER [U -> STRING_GENERAL, E -> STRING_GENERAL] --| U:unencoded type, E:encoded type
feature -- Access
name: STRING
-- Encoding name.
deferred
end
feature -- Status report
has_error: BOOLEAN
-- Error occurred
deferred
end
feature -- Assertion helpers
valid_unencoded_string (s: U): BOOLEAN
-- Is `s' a valid unencoded string ?
do
Result := s /= Void
end
valid_encoded_string (v: E): BOOLEAN
-- Is `v' a valid encoded string ?
do
Result := v /= Void
end
feature -- Encoder
encoded_string (s: U): E
-- Encoded value of `s'.
require
valid_unencoded_string: valid_unencoded_string (s)
deferred
ensure
unchanged: s ~ (old s)
valid_encoded_string: valid_encoded_string (Result)
end
feature -- Decoder
decoded_string (v: E): U
-- Decoded value of `v'.
require
valid_encoded_string: valid_encoded_string (v)
deferred
ensure
unchanged: v ~ (old v)
valid_unencoded_string: valid_unencoded_string (Result)
end
note
copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end