Added initial ATOM and RSS feed parser and generator.
(work in progress)
This commit is contained in:
46
library/text/parser/feed/src/kernel/feed_author.e
Normal file
46
library/text/parser/feed/src/kernel/feed_author.e
Normal file
@@ -0,0 +1,46 @@
|
||||
note
|
||||
description: "Summary description for {FEED_AUTHOR}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
FEED_AUTHOR
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_name: READABLE_STRING_GENERAL)
|
||||
do
|
||||
create name.make_from_string_general (a_name)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
name: IMMUTABLE_STRING_32
|
||||
|
||||
email: detachable READABLE_STRING_8
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_email (a_email: detachable READABLE_STRING_GENERAL)
|
||||
do
|
||||
if a_email = Void then
|
||||
email := Void
|
||||
elseif a_email.is_valid_as_string_8 then
|
||||
email := a_email.as_string_8
|
||||
else
|
||||
email := Void
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Visitor
|
||||
|
||||
accept (vis: FEED_VISITOR)
|
||||
do
|
||||
vis.visit_author (Current)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user