Fixed various compilation issue with new self documentation
Improved the self documentation handler to provide a make_hidden creation procedure
This commit is contained in:
@@ -25,7 +25,7 @@ feature -- Status report
|
||||
debug_output: STRING
|
||||
-- String that should be displayed in debugger to represent `Current'.
|
||||
do
|
||||
Result := Precursor + " {" + {C}.name + "}"
|
||||
Result := Precursor + " {" + ({C}).name + "}"
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
@@ -17,8 +17,11 @@ inherit
|
||||
on_mapped
|
||||
end
|
||||
|
||||
WSF_SELF_DOCUMENTED_HANDLER
|
||||
|
||||
create
|
||||
make
|
||||
make,
|
||||
make_hidden
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
@@ -27,10 +30,28 @@ feature {NONE} -- Initialization
|
||||
router := a_router
|
||||
end
|
||||
|
||||
make_hidden (a_router: WSF_ROUTER)
|
||||
do
|
||||
make (a_router)
|
||||
is_hidden := True
|
||||
end
|
||||
|
||||
router: WSF_ROUTER
|
||||
|
||||
resource: detachable STRING
|
||||
|
||||
is_hidden: BOOLEAN
|
||||
-- Current mapped handler should be hidden from self documentation
|
||||
|
||||
feature -- Documentation
|
||||
|
||||
mapping_documentation (m: WSF_ROUTER_MAPPING): WSF_ROUTER_MAPPING_DOCUMENTATION
|
||||
do
|
||||
create Result.make (m)
|
||||
Result.set_is_hidden (is_hidden)
|
||||
Result.add_description ("Self generated documentation based on the router's setup")
|
||||
end
|
||||
|
||||
feature {WSF_ROUTER} -- Mapping
|
||||
|
||||
on_mapped (a_mapping: WSF_ROUTER_MAPPING; a_rqst_methods: detachable WSF_ROUTER_METHODS)
|
||||
|
||||
@@ -10,6 +10,8 @@ class
|
||||
inherit
|
||||
WSF_ROUTER_MAPPING
|
||||
|
||||
WSF_SELF_DOCUMENTED_ROUTER_MAPPING
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ inherit
|
||||
WSF_ROUTER_CONTEXT_MAPPING [C]
|
||||
|
||||
WSF_SELF_DOCUMENTED_ROUTER_MAPPING
|
||||
undefine
|
||||
debug_output
|
||||
end
|
||||
|
||||
create
|
||||
make,
|
||||
|
||||
@@ -47,7 +47,11 @@ feature -- Execution
|
||||
|
||||
execute_default (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Default procedure
|
||||
deferred
|
||||
local
|
||||
not_found: WSF_NOT_FOUND_RESPONSE
|
||||
do
|
||||
create not_found.make (req)
|
||||
res.send (not_found)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
Reference in New Issue
Block a user