Add accept method (JSON_VISITOR), remove is_xxx queries, remove to_json feature.

Improve comments
This commit is contained in:
jvelilla
2008-08-25 01:13:35 +00:00
parent f83c5d2643
commit 31750efb8e
7 changed files with 110 additions and 213 deletions

View File

@@ -1,8 +1,8 @@
indexing
description: "JSON Truth values"
author: "Javier Velilla"
date: "$Date$"
revision: "$Revision$"
date: "2008/08/24"
revision: "Revision 0.1"
class
@@ -18,7 +18,7 @@ create
feature -- Initialization
make_boolean (an_item: BOOLEAN) is
--
--Initialize.
do
item := an_item
end
@@ -26,19 +26,24 @@ feature -- Initialization
feature -- Access
item: BOOLEAN
-- Content
to_json: STRING is
--
do
Result := item.out
end
hash_code: INTEGER is
--
--Hash code value
do
Result := item.hash_code
end
feature -- Visitor pattern
accept (a_visitor: JSON_VISITOR) is
-- Accept `a_visitor'.
-- (Call `visit_json_boolean' procedure on `a_visitor'.)
do
a_visitor.visit_json_boolean (Current)
end
end