EDoc API
Overview Cluster Class Classes Index          Top Features

edoc.html_output

Class EDOC_HTML_CLASSES_FILE


Direct ancestors

EDOC_HTML_OUTPUT_FILE

Creation

Features

Invariants

indexing

description

Generate an HTML File for a list of all classes in the context.

copyright

Copyright (c) 2005, Julian Tschannen

license

Eiffel Forum License v2 (see forum.txt)

class EDOC_HTML_CLASSES_FILE

inherit

EDOC_HTML_OUTPUT_FILE
KL_TEXT_OUTPUT_FILE
KI_TEXT_OUTPUT_FILE
KI_OUTPUT_FILE
KI_FILE
KI_FILE_SYSTEM_ENTRY
KI_CHARACTER_OUTPUT_STREAM
KI_OUTPUT_STREAM [CHARACTER]
KI_TEXT_OUTPUT_STREAM
KI_CHARACTER_OUTPUT_STREAM
KI_OUTPUT_STREAM [CHARACTER]
KL_OUTPUT_FILE
KI_OUTPUT_FILE
KI_FILE
KI_FILE_SYSTEM_ENTRY
KI_CHARACTER_OUTPUT_STREAM
KI_OUTPUT_STREAM [CHARACTER]
KL_FILE
KI_FILE
KI_FILE_SYSTEM_ENTRY
PLAIN_TEXT_FILE
FILE
UNBOUNDED [CHARACTER]
FINITE
BOX
CONTAINER
SEQUENCE [CHARACTER]
ACTIVE
BAG
COLLECTION
CONTAINER
BILINEAR
LINEAR
TRAVERSABLE
CONTAINER
LINEAR
TRAVERSABLE
CONTAINER
FINITE
BOX
CONTAINER
IO_MEDIUM
STRING_HANDLER

create

make (a_name: like name)

-- Create a new file named a_name.
-- (a_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE_SYSTEM_ENTRY)

require

a_name_not_void: a_name /= Void

ensure

name_set: name = a_name
is_closed: is_closed

ensure then

name_set: name = a_name

feature -- Initialization

reset (a_name: STRING)

-- Reuse current Eiffel object memory to
-- represent a new file system entry.
-- (a_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE_SYSTEM_ENTRY)

require

a_name_not_void: a_name /= Void
is_closed: is_closed

ensure

name_set: name = a_name
is_closed: is_closed

feature -- Access

name: STRING

-- File name;
-- Note: If name is a UC_STRING or descendant, then
-- the bytes of its associated UTF unicode encoding will
-- be used.
-- (From KI_FILE_SYSTEM_ENTRY)

ensure

name_not_void: Result /= Void

time_stamp: INTEGER

-- Time stamp (number of seconds since 1 January 1970
-- at 00:00:00 UTC) of last modification to current file;
-- Return -1 if the time stamp was not available, if the
-- file did not exist for example, or if the time stamp
-- didn't fit into an INTEGER. (Use DT_DATE_TIME.make_from_epoch
-- to convert this time stamp to a human readable format.)
-- (From KI_FILE)

ensure

valid_values: Result = -1 or Result >= 0

file_pointer: POINTER

-- File pointer as required in C
-- (From FILE)

eol: STRING

-- Line separator
-- (From KI_TEXT_OUTPUT_STREAM)

ensure

eol_not_void: Result /= Void
eol_not_empty: Result.count > 0

open_tags: DS_LINKED_STACK[STRING]

-- Open HTML tags
-- (From EDOC_HTML_OUTPUT_FILE)

feature -- Measurement

count: INTEGER

-- Number of bytes in current file;
-- Return -1 if the number of bytes was not available,
-- if the file did not exist for example.
-- (From KI_FILE)

require

is_closed: is_closed

ensure

valid_values: Result = -1 or Result >= 0

old_count: INTEGER

-- Size in bytes (0 if no associated physical file)
-- (From KL_FILE)

feature -- Status report

extendible: BOOLEAN

-- May new items be added?
-- (From KL_OUTPUT_FILE)

old_is_closed: BOOLEAN

-- Is file closed?
-- (From KL_FILE)

old_is_open_write: BOOLEAN

-- Is file open for writing?
-- (From KL_OUTPUT_FILE)

is_closable: BOOLEAN

-- Can current file system entry be closed?
-- (From KI_FILE_SYSTEM_ENTRY)

ensure

definition: Result = is_open

is_open_write: BOOLEAN

-- Is file opened in write mode?
-- (From KI_FILE_SYSTEM_ENTRY)

exists: BOOLEAN

-- Does file physically exist on disk?
-- (Note that with SmartEiffel this routine
-- actually returns is_readable.)
-- (From KI_FILE_SYSTEM_ENTRY)

is_closed: BOOLEAN

-- Is file closed?
-- (From KI_FILE_SYSTEM_ENTRY)

ensure

definition: Result = not is_open

is_readable: BOOLEAN

-- Can file be opened in read mode?
-- (From KI_FILE_SYSTEM_ENTRY)

ensure

exists: Result implies exists

same_physical_file (other_name: STRING): BOOLEAN

-- Are current file and file named other_name
-- the same physical file? Return False if one
-- or both files don't exist. (Return True if
-- it was impossible to determine whether the
-- files were physically the same files.)
-- (other_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)

require

other_name_not_void: other_name /= Void
is_closed: is_closed

feature -- Status setting

old_close

-- Close file.
-- (From KL_FILE)

require

medium_is_open: not old_is_closed

ensure

is_closed: old_is_closed

old_open_read

-- Open file in read-only mode.
-- (From FILE)

require

is_closed: is_closed

ensure

exists: exists
open_read: is_open_read

feature -- Element change

old_put_string (s: STRING)

-- Write s at current position.
-- (From KL_OUTPUT_FILE)

require

extendible: extendible
non_void: s /= void

feature -- Basic operations

generate

-- Generate classes file.

anchor_content (a_name, a_content: STRING)

-- Print an anchor with 'a_name' and 'a_content' to a string.
-- (From EDOC_HTML_OUTPUT_FILE)

anchor_content_to_string (a_name, a_content: STRING): STRING

-- Print an anchor with 'a_name' and 'a_content' to a string.
-- (From EDOC_HTML_OUTPUT_FILE)

content_line (a_line: STRING)

-- Print content line.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_line_not_void: a_line /= Void
open_write: is_open_write

end_tag

-- Print end tag.
-- (From EDOC_HTML_OUTPUT_FILE)

require

open_write: is_open_write

indent

-- Indent.
-- (From EDOC_HTML_OUTPUT_FILE)

require

open_write: is_open_write

link_content (a_link, a_content: STRING)

-- Print a link to 'a_link' with 'a_content'.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_link_not_void: a_link /= Void
a_content_not_void: a_content /= Void

link_content_to_string (a_link, a_content: STRING): STRING

-- Print a link to 'a_link' with 'a_content' to a string.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_link_not_void: a_link /= Void
a_content_not_void: a_content /= Void

ensure

result_not_void: Result /= Void

link_css_content (a_link, a_css_class, a_content: STRING)

-- Print a link to 'a_link' with 'a_css_class' and 'a_content'.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_link_not_void: a_link /= Void
a_css_class_not_void: a_css_class /= Void
a_content_not_void: a_content /= Void

link_css_content_to_string (a_link, a_css_class, a_content: STRING): STRING

-- Print a link to 'a_link' with 'a_css_class' and 'a_content' to a string.
-- (From EDOC_HTML_OUTPUT_FILE)

start_tag (a_tag: STRING)

-- Print start tag a_tag.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
open_write: is_open_write

start_tag_attributes (a_tag: STRING; an_attributes: ARRAY[STRING])

-- Print start tag a_tag with attributes an_attributes.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
an_attributes_count_even: an_attributes /= Void implies an_attributes.count \\ 2 = 0
open_write: is_open_write

start_tag_css (a_tag, a_css_class: STRING)

-- Print start tag a_tag with css attribute a_css_class.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
a_css_class_not_void: a_css_class /= Void
open_write: is_open_write

tag (a_tag: STRING)

-- Print single tag.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
open_write: is_open_write

tag_attributes (a_tag: STRING; an_attributes: ARRAY[STRING])

-- Print single tag with attributes.
-- Ends with newline.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
an_attributes_count_even: an_attributes /= Void implies an_attributes.count \\ 2 = 0
open_write: is_open_write

tag_attributes_content (a_tag: STRING; an_attributes: ARRAY[STRING]; a_content: STRING)

-- Single tag with attributes and content.
-- Ends with newline.
-- (From EDOC_HTML_OUTPUT_FILE)

require

open_write: is_open_write
a_tag_not_void: a_tag /= Void
a_content_not_void: a_content /= Void

tag_attributes_content_to_string (a_tag: STRING; an_attributes: ARRAY[STRING]; a_content: STRING): STRING

-- Single tag with attributes and content.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
an_attributes_count_even: an_attributes /= Void implies an_attributes.count \\ 2 = 0
a_content_not_void: a_content /= Void
open_write: is_open_write

ensure

result_not_void: Result /= Void

tag_content (a_tag, a_content: STRING)

-- Singe tag with content.
-- Ends with newline.
-- (From EDOC_HTML_OUTPUT_FILE)

tag_content_to_string (a_tag, a_content: STRING): STRING

-- String of single tag with content.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_tag_not_void: a_tag /= Void
a_content_not_void: a_content /= Void

ensure

result_not_void: Result /= Void

tag_css_content (a_tag, a_css_class, a_content: STRING)

-- Single tag with a css class and content.
-- Ends with newline.
-- (From EDOC_HTML_OUTPUT_FILE)

tag_css_content_to_string (a_tag, a_css_class, a_content: STRING): STRING

-- Single tag with a css class and content.
-- (From EDOC_HTML_OUTPUT_FILE)

change_name (new_name: STRING)

-- Rename current file as new_name.
-- Do nothing if the file could not be renamed, if
-- it did not exist or if new_name is physically
-- the same file as current file. Overwrite new_name
-- if it already existed. If renaming was successful,
-- then name is set to new_name.
-- (new_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)

require

new_name_not_void: new_name /= Void
is_closed: is_closed

close

-- Close current file if it is closable,
-- let it open otherwise.
-- (From KI_FILE_SYSTEM_ENTRY)

require

is_closable: is_closable

concat (a_filename: STRING)

-- Copy content of file a_filename to the end of current file.
-- Do nothing if file a_filename does not exist. Create
-- current file if it does not exist yet. If file a_filename
-- is physically the same as current file, then a copy of
-- the file is appended to itself. Do nothing if current
-- file could not be open in append mode or if file a_filename
-- could not be opened in read mode.
-- (a_filename should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)

require

a_filename_not_void: a_filename /= Void
is_closed: is_closed

copy_file (new_name: STRING)

-- Copy current file to new_name.
-- Do nothing if the file could not be copied, if it
-- did not exist or if new_name is physically
-- the same file as current file. Overwrite new_name
-- if it already existed.
-- (new_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)

require

new_name_not_void: new_name /= Void
is_closed: is_closed

delete

-- Delete current file.
-- Do nothing if the file could not be
-- deleted or if it did not exist.
-- (From KI_FILE_SYSTEM_ENTRY)

require

is_closed: is_closed

flush

-- Flush buffered data to disk.
-- (From KI_CHARACTER_OUTPUT_STREAM)

require

is_open_write: is_open_write

open_append

-- Open current file in append mode if it
-- can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or the
-- data which will be written to the file will
-- appear after its old content otherwise.
-- (From KI_OUTPUT_FILE)

require

is_closed: is_closed

open_write

-- Open current file in write-only mode if
-- it can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or its
-- old content is removed otherwise.
-- (From KI_FILE_SYSTEM_ENTRY)

require

is_closed: is_closed

recursive_open_append

-- Open current file in append mode if it
-- can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or the
-- data which will be written to the file will
-- appear after its old content otherwise.
-- Try to recursively create its parent directory
-- if it does not exist yet.
-- (From KI_OUTPUT_FILE)

require

is_closed: is_closed

recursive_open_write

-- Open current file in write-only mode if
-- it can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or its
-- old content is removed otherwise. Try to
-- recursively create its parent directory
-- if it does not exist yet.
-- (From KI_OUTPUT_FILE)

require

is_closed: is_closed

feature -- Conveniance printing

print_button (a_title, a_link: STRING)

-- Print button.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_title_not_void: a_title /= Void

print_buttons

-- Print buttons.
-- (From EDOC_HTML_OUTPUT_FILE)

print_class_name (a_class: ET_CLASS)

-- Print class name of 'a_class'.
-- (From EDOC_HTML_OUTPUT_FILE)

print_class_name_to_string (a_class: ET_CLASS): STRING

-- Print class name of 'a_class' to string.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_class_not_void: a_class /= Void

ensure

result_exists: Result /= Void

print_cluster_name (a_cluster: ET_CLUSTER)

-- Print class name of 'a_cluster' to string.
-- (From EDOC_HTML_OUTPUT_FILE)

print_cluster_name_to_string (a_cluster: ET_CLUSTER): STRING

-- Print cluster name of 'a_cluster' to string.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_cluster_not_void: a_cluster /= Void

ensure

result_exists: Result /= Void

print_comment (a_string: STRING; a_class: ET_CLASS; a_features_list: DS_LIST[ET_FEATURE])

-- Print a_string as comment.
-- Set links to features listed in a_features_list.
-- When called from the class printer provide a_class as current class.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_string_not_void: a_string /= Void
a_features_list_not_void: a_features_list /= Void

print_footer_end

-- End the footer.
-- Call print_footer_start before.
-- (From EDOC_HTML_OUTPUT_FILE)

print_footer_start

-- Start with the footer.
-- Call print_footer_end to finish the footer.
-- (From EDOC_HTML_OUTPUT_FILE)

print_header_end

-- End the header.
-- Call print_header_start before.
-- (From EDOC_HTML_OUTPUT_FILE)

print_header_start

-- Start with the header.
-- Call print_header_end to finish the header.
-- (From EDOC_HTML_OUTPUT_FILE)

print_html_head (a_title: STRING; a_css_stylesheet: STRING)

-- Print an html tag with a head section with a_title and a_css_stylesheet.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_title_not_void: a_title /= Void
open_write: is_open_write

print_qualified_class_name (a_class: ET_CLASS)

-- Print qualified class name of 'a_class'.
-- (From EDOC_HTML_OUTPUT_FILE)

print_qualified_class_name_to_string (a_class: ET_CLASS): STRING

-- Print qualified class name of 'a_class' to string.
-- (From EDOC_HTML_OUTPUT_FILE)

print_qualified_cluster_name_single_link (a_cluster: ET_CLUSTER)

-- Print qualified cluster name of 'a_cluster' as a link to 'a_cluster'.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_cluster_not_void: a_cluster /= Void

print_qualified_cluster_name_to_string (a_cluster: ET_CLUSTER; link_a_cluster: BOOLEAN): STRING

-- Print cluster name of 'a_cluster' and all its parents to string.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_cluster_not_void: a_cluster /= Void

ensure

result_exists: Result /= Void

print_subclusters_tree (a_cluster: ET_CLUSTER)

-- Print tree of subclusters of 'a_cluster'.
-- (From EDOC_HTML_OUTPUT_FILE)

require

a_cluster_not_void: a_cluster /= Void

feature -- Output

append (an_input_stream: KI_INPUT_STREAM[CHARACTER])

-- Read items of an_input_stream until the end
-- of input is reached, and write these items to
-- current output stream.
-- (From KI_OUTPUT_STREAM)

require

is_open_write: is_open_write
an_input_stream_not_void: an_input_stream /= Void
an_input_stream_open_read: an_input_stream.is_open_read

ensure

end_of_input: an_input_stream.end_of_input

put_boolean (b: BOOLEAN)

-- Write "True" to output stream if
-- b is true, "False" otherwise.
-- (From KI_CHARACTER_OUTPUT_STREAM)

require

is_open_write: is_open_write

put_integer (i: INTEGER)

-- Write decimal representation
-- of i to output stream.
-- Regexp: 0|(-?[1-9][0-9]*)
-- (From KI_CHARACTER_OUTPUT_STREAM)

require

is_open_write: is_open_write

put_substring (a_string: STRING; s, e: INTEGER)

-- Write substring of a_string between indexes
-- s and e to output stream.
-- (From KI_CHARACTER_OUTPUT_STREAM)

require

is_open_write: is_open_write
a_string_not_void: a_string /= Void
s_large_enough: s >= 1
e_small_enough: e <= a_string.count
valid_interval: s <= e + 1

put_line (a_string: STRING)

-- Write a_string to output stream
-- followed by a line separator.
-- (From KI_TEXT_OUTPUT_STREAM)

require

is_open_write: is_open_write
a_string_not_void: a_string /= Void

put_new_line

-- Write a line separator to output stream.
-- (From KI_TEXT_OUTPUT_STREAM)

require

is_open_write: is_open_write

put_character (c: CHARACTER)

-- Write c to output file.
-- (From KI_OUTPUT_STREAM)

require

is_open_write: is_open_write

put_string (a_string: STRING)

-- Write a_string to output file.
-- Note: If a_string is a UC_STRING or descendant, then
-- write the bytes of its associated UTF unicode encoding.
-- (From KI_CHARACTER_OUTPUT_STREAM)

require

is_open_write: is_open_write
a_string_not_void: a_string /= Void

invariant

-- From EDOC_HTML_OUTPUT_FILE
name_not_void: name /= Void
open_tags_not_void: open_tags /= Void

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

-- From KL_FILE
string_name_is_string: ANY_.same_types (string_name, "")

-- From PLAIN_TEXT_FILE
plain_text: is_plain_text

-- From FILE
valid_mode: Closed_file <= mode and mode <= Append_read_file
name_exists: name /= Void
name_not_empty: not name.is_empty

-- From FINITE
empty_definition: is_empty = (count = 0)
non_negative_count: count >= 0

-- From ACTIVE
writable_constraint: writable implies readable
empty_constraint: is_empty implies (not readable) and (not writable)

-- From BILINEAR
not_both: not (after and before)
before_constraint: before implies off

-- From LINEAR
after_constraint: after implies off

-- From TRAVERSABLE
empty_constraint: is_empty implies off