+
Point of view
All features
deferred class WRAPPER_CLASS
Summary
A node of an Gcc-Xml file reprenting an entity wrappable by a Liberty class also containing the wrapper features of child and/or related nodes.
Direct parents
Inherit list: WRAPPABLE_NODE
Known children
Inherit list: COMPOSED_NODE, C_ENUM, C_FILE, C_TYPEDEF
Class invariant
Overview
Features
{ANY}
Implementation
{}
Emittability
{ANY}
Comparability
{ANY}
{ANY}
Implementation
{}
Assigned name
{ANY}
Collection-like command
{ANY}
{ANY}
{ANY}
{XML_TREE}
{}
{ANY}
{XML_COMPOSITE_NODE}
{ANY}
Plugin
{ANY}
Syntactic sugar
{ANY}
Type mangling
{}
Auxiliary features
{}
Constants
{}
Descriptions reading
{ANY}
Outputting description
{ANY}
Queries
{ANY}
Descriptions
{}
{ANY}
{}
Auxiliary features
{ANY}
Constants
{}
Maximum:
{}
Minimum:
{}
Bits:
{}
Various exceptions codes:
{ANY}
{ANY}
Status report:
{ANY}
Basic operations:
{ANY}
  • die (code: INTEGER_32)
    Terminate execution with exit status code, without triggering an exception.
  • raise (name: STRING)
    Raise a developer exception of name name.
  • throw (a_exception: EXCEPTION)
Non-Standard Extensions:
{ANY}
{}
{ANY}
  • is_equal (other: WRAPPER_CLASS): BOOLEAN
    Is other attached to an object considered equal to current object?
  • infix "<=" (other: WRAPPER_CLASS): BOOLEAN
    Is Current less than or equal other?
  • infix ">" (other: WRAPPER_CLASS): BOOLEAN
    Is Current strictly greater than other?
  • infix ">=" (other: WRAPPER_CLASS): BOOLEAN
    Is Current greater than or equal than other?
  • in_range (lower: WRAPPER_CLASS, upper: WRAPPER_CLASS): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • compare (other: WRAPPER_CLASS): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • three_way_comparison (other: WRAPPER_CLASS): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • min (other: WRAPPER_CLASS): WRAPPER_CLASS
    Minimum of Current and other.
  • max (other: WRAPPER_CLASS): WRAPPER_CLASS
    Maximum of Current and other.
  • bounded_by (a_min: WRAPPER_CLASS, a_max: WRAPPER_CLASS): WRAPPER_CLASS
    A value that is equal to Current if it is between the limits set by a_min and a_max.
emit_wrapper
deferred procedure
{ANY}
ensure
compute_eiffel_name
effective procedure
{ANY}
ensure
  • cached_eiffel_name /= Void
suffix: STRING
deferred function
{ANY}
writable attribute
{}
is_to_be_emitted: BOOLEAN
deferred function
{ANY}
Shall Current node be wrapped?
emitted: BOOLEAN
writable attribute
{ANY}
Has Current node been already been wrapped?
infix "<" (other: NAMED_NODE): BOOLEAN
effective function
{ANY}
Comparon made on the name used in the wrappers
require
  • other_exists: other /= Void
ensure
  • asymmetric: Result implies not other < Current
is_anonymous: BOOLEAN
effective function
{ANY}
Is Current node anonynmous?
is_named: BOOLEAN
effective function
{ANY}
Does Current actually have a name?
effective function
{ANY}
ensure
c_string_name: STRING
effective function
{ANY}
eiffel_name: STRING
effective function
{ANY}
the name of Current when wrapped in Liberty Eiffel.
is_public: BOOLEAN
effective function
{ANY}
Does Current node have a name and does it start with an alphabetical character?
Names starting with underscores or other strange characters are usually considered private in C/C++ languages.
cached_eiffel_name: STRING
writable attribute
{}
assigned_name: STRING
writable attribute
{ANY}
set_name (a_name: STRING)
effective procedure
{ANY}
Set assigned_name to a_name.
require
  • a_name /= Void
ensure
has_assigned_name: BOOLEAN
effective function
{ANY}
for_each (a_procedure: PROCEDURE[TUPLE 1[GCCXML_NODE]])
effective procedure
{ANY}
Apply 'a_procedure' to all heir nodes of known type.
emit_wrappers
effective procedure
{ANY}
Recursively descend the tree invoking emit_wrapper on WRAPPER_CLASS nodes.
writable attribute
{ANY}
The name of the node
attribute_name (index: INTEGER_32): UNICODE_STRING
effective function
{ANY}
The name of the i'th attribute
require
attribute_value (index: INTEGER_32): UNICODE_STRING
effective function
{ANY}
The value of the i'th attribute
require
attribute_at (a_attribute_name: UNICODE_STRING): UNICODE_STRING
effective function
{ANY}
The value of the attribute given by its name; Void if not set
attributes_count: INTEGER_32
effective function
{ANY}
The number of attributes
child (index: INTEGER_32): XML_NODE
effective function
{ANY}
The i'th child
require
children_count: INTEGER_32
effective function
{ANY}
The number of children
accept (visitor: VISITOR)
effective procedure
{ANY}
Accept to be visited by the visitor.
require
  • visitor /= Void
set_attribute (a_attribute_name: UNICODE_STRING, a_attribute_value: UNICODE_STRING)
effective procedure
require
  • a_attribute_name /= Void
  • a_attribute_value /= Void
ensure
add_child (node: XML_NODE)
effective procedure
require
  • node /= Void
  • node.parent = Void
ensure
children: FAST_ARRAY[XML_NODE]
writable attribute
{}
writable attribute
{}
make (a_name: UNICODE_STRING, a_line: INTEGER_32, a_column: INTEGER_32)
effective procedure
{}
require
  • a_line > 0
  • a_column > 0
line: INTEGER_32
writable attribute
{ANY}
The position of the node in its source file
column: INTEGER_32
writable attribute
{ANY}
The position of the node in its source file
writable attribute
{ANY}
The parent of the node, Void if it is the root
set_parent (a_parent: XML_COMPOSITE_NODE)
effective procedure
require
  • a_parent /= Void
ensure
settings: SETTINGS
once function
{ANY}
The singleton to access all the shared settings
directory: STRING
effective function
{ANY}
Shortcut for settings.directory
include: TEXT_FILE_WRITE
once function
{ANY}
once function
{ANY}
verbose: BOOLEAN
effective function
{ANY}
global: BOOLEAN
effective function
{ANY}
dequalify (an_id: UNICODE_STRING): UNICODE_STRING
effective function
{}
an_id without the type qualifier used by GccXml to mark the identification labels.
"const", "reference" and "volatile" qualifier are represented in a CvQualifiedType node adding 'c', 'r' and 'v' to the identifies. i.e. if "int" has id "_422" a "const int foo" argument type will be of type CvQualifiedType with it "_422c". The same rule is used - as far as I know - also for reference and volatile types. Result is identical to an_id if it does not end with 'c', 'r' and 'v'; otherwise it is a copy of an_id with the last character ('c', 'r' or 'v') removed.
require
  • not_void: an_id /= Void
log (a_string: ABSTRACT_STRING)
effective procedure
{}
buffer: FORMATTER
once function
{}
Buffer to render the text of the feature currently being wrapped (a function call, a structure or an enumeration).
formatter: FORMATTER
once function
{}
Shared formatter used to format various strings.
comment: STRING
is " -- "
constant attribute
{}
variadic_function_note: STRING
is " (variadic call) "
constant attribute
{}
unwrappable_function_note: STRING
is " -- Unwrappable function obsolete "Unwrappable C function" "
constant attribute
{}
expanded_class: STRING
is "expanded class "
constant attribute
{}
deferred_class: STRING
is "deferred class "
constant attribute
{}
inherits_string: STRING
is " insert ANY undefine is_equal, copy end "
constant attribute
{}
queries_header: STRING
is "feature {} -- Low-level queries "
constant attribute
{}
setters_header: STRING
is "feature {} -- Low-level setters "
constant attribute
{}
externals_header: STRING
is "feature {} -- External calls "
constant attribute
{}
typedefs_features_header: STRING
is "feature {WRAPPER_HANDLER} -- C type definitions (typedefs) "
constant attribute
{}
footer: STRING
is "end "
constant attribute
{}
automatically_generated_header: STRING
is "-- This file has been created by wrappers_generator. -- Any change will be lost by the next execution of the tool. "
constant attribute
{}
automatically_generated_c_file: STRING
is "/* ** This file has been created by wrappers_generator. ** Any change will be lost by the next execution of the tool. */ "
constant attribute
{}
automatically_patched_header: STRING
is "-- Th file has been automatically created combining the output file -- of wrappers_generator #(1) -- with the differences patches found into #(2) -- Any change will be lost by the next execution of the tool. "
constant attribute
{}
read_descriptions_from (a_file_name: STRING)
effective procedure
{ANY}
Read description comment for classes and features from the file named a_file_name, filling class_descriptions and feature_descriptions.
Leading and trailing spaces are removed. Lines starting with "--" are ignored as comments. Class descriptions are in the form "CLASS_NAME Description text", feature descriptions are "CLASS_NAME.feature Description text".
require
read_description (a_described: STRING, a_description: COLLECTION[STRING])
effective procedure
{ANY}
When a_described is a valid class name (i.e. "CLASS_NAME_01") a_description is added into class_descriptions; when a_described is a valid class name with a feature name with a dot in the middle (like "ANOTHER_CLASS.my_feature_12_foo"); adds a_description is added into feature_descriptions in the latter.
Leading and trailing spaces are removed from a_described; comments - starting with "--" are skipped; See read_comments for further informations.
emit_description_on (a_description: COLLECTION[STRING], a_formatter: FORMATTER)
effective procedure
{ANY}
Put 'a_description' on 'a_formatter' formatting it as an Eiffel comment with lines shorter that 'description_lenght' characters.
Nothing is done when a_description is Void.
require
  • a_formatter /= Void
feature_description (a_class_name: STRING, a_feature_name: STRING): COLLECTION[STRING]
effective function
{ANY}
The description of a_feature_name in a_class_name.
Void when there is no description.
require
  • a_class_name /= Void
description_lenght: INTEGER_32
is 70
constant attribute
{}
class_descriptions: HASHED_DICTIONARY[COLLECTION[STRING], STRING]
once function
{}
Class description comments.
Key is classname.
once function
{}
Feature descriptions dictionary.
The outer dictionary is indexed by classname, the inner one by feature name. So to get the description of feature foo in class BAR you shall invoke feature_descriptions.at("BAR").at("foo")
same_files (path1: ABSTRACT_STRING, path2: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if the path1 file exists and has the very same content as file path2.
require
  • path1 /= Void
  • path2 /= Void
same_physical_file (path1: ABSTRACT_STRING, path2: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if path1 and path2 physically refer to the same file (e.g. symlinks to a same file will return True here)
require
  • path1 /= Void
  • path2 /= Void
file_exists (path: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
require
  • path /= Void
  • path.count > 0
is_readable (path: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if path file exists and is either a readable file or an accessible directory.
require
  • path /= Void
is_empty (path: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if path file exists, is readable and is an empty file.
require
  • path /= Void
  • not path.is_empty
rename_to (old_path: ABSTRACT_STRING, new_path: ABSTRACT_STRING)
effective procedure
{ANY}
Try to change the name or the location of a file.
require
  • old_path /= Void
  • new_path /= Void
last_rename_succeeded: BOOLEAN
writable attribute
{ANY}
True if the last call to rename_to` was successful.
copy_to (source_path: ABSTRACT_STRING, target_path: ABSTRACT_STRING)
effective procedure
{ANY}
Try to copy the source into the target.
require
  • source_path /= Void
  • target_path /= Void
last_copy_succeeded: BOOLEAN
writable attribute
{ANY}
True if the last call to copy_to` was successful.
delete (path: ABSTRACT_STRING)
effective procedure
{ANY}
Try to delete the given path file.
require
  • path /= Void
last_delete_succeeded: BOOLEAN
writable attribute
{ANY}
True if the last call to delete` was successful.
size_of (path: ABSTRACT_STRING): INTEGER_32
effective function
{ANY}
Total size of file path in number of bytes.
When the corresponding file does not exists, the Result is negative.
require
  • path /= Void
  • path.count > 0
last_change_of (path: ABSTRACT_STRING): TIME
effective function
{ANY}
Of the last modification of path.
require
  • path /= Void
  • path.count > 0
is_file (path: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Is path a regular file?
require
  • path /= Void
  • path.count > 0
is_directory (path: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Is path a directory?
require
  • path /= Void
  • path.count > 0
io_remove (path: POINTER): BOOLEAN
{}
To implement delete.
io_rename (old_path: POINTER, new_path: POINTER): BOOLEAN
{}
io_copy (source: POINTER, target: POINTER): BOOLEAN
{}
io_file_exists (path: POINTER): BOOLEAN
{}
io_same_physical_file (path1: POINTER, path2: POINTER): BOOLEAN
{}
fstat_st_size (path: POINTER): INTEGER_32
{}
fstat_st_mtime (path: POINTER): INTEGER_64
{}
fstat_st_is_file (path: POINTER): BOOLEAN
{}
fstat_st_is_dir (path: POINTER): BOOLEAN
{}
once function
{}
once function
{}
tmp_string: STRING
once function
{}
eiffel_feature (a_name: ABSTRACT_STRING): STRING
effective function
{ANY}
Translate a_name content into a proper feature name for the Gnu-Eiffel language.
 "CamelCase" is translated into "camel_case",
"ENOO" is translated into "enoo". Eventual underscores in front of
a_name are removed: "__foo" becomes "foo"; symbols starting with
underscores folloed by a number are prefixed with "a_"; reserved
language names and names of features of class ANY are escaped.
TODO: handle in a fairly
require
  • name_not_void: a_name /= Void
  • name_not_empty: not a_name.is_empty
eiffel_argument (a_name: ABSTRACT_STRING): STRING
effective function
{ANY}
a_name content translated into a proper argument placeholder for the Gnu-Eiffel language.
 "CamelCase" is translated into
"a_camel_case", "ENOO" is translated into "an_enoo". Eventual
underscores in front of a_name are removed: "__foo" becomes
"a_foo". See also eiffel_feature.
require
  • name_not_void: a_name /= Void
insert_underscores (a_string: STRING)
effective procedure
{ANY}
Insert an underscore ('_') before each uppercase letter following a lowercase one.
require
  • a_string /= Void
  • not a_string.is_empty
camelcase_translator: REGULAR_EXPRESSION
once function
{ANY}
Insert an underscore ('_') between any lowercase letter followed by an uppercase one
multiple_underscores_remover: REGULAR_EXPRESSION
once function
{ANY}
Replace all multiple occurences of underscore "_" with a single one
lt_translator: REGULAR_EXPRESSION
once function
{ANY}
Replace all occurences of "<" (shown as "&lt;") with "_of_"
gt_translator: REGULAR_EXPRESSION
once function
{ANY}
Remove all occurences of ">" (shown as "&gt;")
namespace_separator_translator: REGULAR_EXPRESSION
once function
{ANY}
Replace all occurences of "::" (C++ namespace separator) with "_"
is_public_name (a_name: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Does a_name start with an alphabetical character?
Names starting with underscores or other strange characters are usually considered private in C/C++ languages.
require
  • not_void: a_name /= Void
  • meaningful_length: a_name.count > 1
eiffel_class_name (a_string: ABSTRACT_STRING, a_suffix: ABSTRACT_STRING): STRING
effective function
{ANY}
An Eiffel class name derived from a_string.
Trailing and tail underscores are removed, dashes are turned into underscores, a_suffix is added at the end if not void, all is made uppercase.
require
  • a_string /= Void
ensure
is_valid_class_name (a_name: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Does a_name represents a valid Eiffel class name?
i.e. does it start with an upper-case letter and contain only upper-case letters, underscores and numbers?
require
  • a_name /= Void
adapt (a_name: ABSTRACT_STRING, a_suffix: ABSTRACT_STRING): STRING
effective function
{ANY}
A valid, adapted identifier for an Eiffel feature labelled a_name.
Can be either a_name itself or a new string containing an adapatation. Reserved words and those of features belonging to ANY are "escaped", appending a_suffix.
require
  • name_not_void: a_name /= Void
  • valid_name: a_name.first /= '_'
  • suffix_not_void: a_suffix /= Void
  • suffix_not_empty: not a_suffix.is_empty
ensure
  • Result /= Void
once function
{}
any_features: HASHED_SET[ABSTRACT_STRING]
once function
{}
The names of the features contained in class ANY.
The following "static" definition of the features of ANY somehow unacceptable in a perfect world. Yet computing it each and every time would enlarge the memory usage of the program quite a lot, not counting the runtime requirements. We will do it when we will cache compilation results. The following "static" definition of the features of ANY somehow unacceptable in a perfect world. Yet computing it each and every time would enlarge the memory usage of the program quite a lot, not counting the runtime requirements. We will do it when we will cache compilation results.
Maximum_character_code: INTEGER_16
{}
Largest supported code for CHARACTER values.
ensure
  • meaningful: Result >= 127
Maximum_integer_8: INTEGER_8
is 127
constant attribute
{}
Largest supported value of type INTEGER_8.
Maximum_integer_16: INTEGER_16
is 32767
constant attribute
{}
Largest supported value of type INTEGER_16.
Maximum_integer: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_32: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_64: INTEGER_64
is 9223372036854775807
constant attribute
{}
Largest supported value of type INTEGER_64.
Maximum_real_32: REAL_32
is {REAL_32 3.4028234663852885981170418348451692544e+38}
constant attribute
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL_32.
Maximum_real: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_64: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_80: REAL_EXTENDED
{}
Largest supported value of type REAL_80.
ensure
Minimum_character_code: INTEGER_16
{}
Smallest supported code for CHARACTER values.
ensure
  • meaningful: Result <= 0
Minimum_integer_8: INTEGER_8
is -128
constant attribute
{}
Smallest supported value of type INTEGER_8.
Minimum_integer_16: INTEGER_16
is -32768
constant attribute
{}
Smallest supported value of type INTEGER_16.
Minimum_integer: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_32: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_64: INTEGER_64
is -9223372036854775808
constant attribute
{}
Smallest supported value of type INTEGER_64.
Minimum_real_32: REAL_32
is {REAL_32 -3.40282346638528859811704183484516925440e+38}
constant attribute
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL_32.
Minimum_real: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_64: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_80: REAL_64
{}
Smallest supported value of type REAL_80.
ensure
  • meaningful: Result <= 0.0
Boolean_bits: INTEGER_32
{}
Number of bits in a value of type BOOLEAN.
ensure
  • meaningful: Result >= 1
Character_bits: INTEGER_32
{}
Number of bits in a value of type CHARACTER.
ensure
Integer_bits: INTEGER_32
{}
Number of bits in a value of type INTEGER.
ensure
  • integer_definition: Result = 32
Real_bits: INTEGER_32
is 64
constant attribute
{}
Number of bits in a value of type REAL.
Pointer_bits: INTEGER_32
{}
Number of bits in a value of type POINTER.
Check_instruction: INTEGER_32
is 1
constant attribute
{ANY}
Exception code for violated check.
Class_invariant: INTEGER_32
is 2
constant attribute
{ANY}
Exception code for violated class invariant.
Developer_exception: INTEGER_32
is 3
constant attribute
{ANY}
Exception code for developer exception.
See also: raise, throw
Incorrect_inspect_value: INTEGER_32
is 4
constant attribute
{ANY}
Exception code for inspect statement.
This exception occurs when Void is passed as the expression to inspect ("inspect on STRING only). This exception also occurs when the inspected value selects no branch (when the keyword "else" not used, one "when" branch _must_ be selected). Some value which is not one of the inspect constants, if there is no Else_part
Loop_invariant: INTEGER_32
is 5
constant attribute
{ANY}
Exception code for violated loop invariant
Loop_variant: INTEGER_32
is 6
constant attribute
{ANY}
Exception code for non-decreased loop variant
No_more_memory: INTEGER_32
is 7
constant attribute
{ANY}
Exception code for failed memory allocation
Postcondition: INTEGER_32
is 8
constant attribute
{ANY}
Exception code for violated postcondition.
Precondition: INTEGER_32
is 9
constant attribute
{ANY}
Exception code for violated precondition.
Routine_failure: INTEGER_32
is 10
constant attribute
{ANY}
Exception code for failed routine.
Os_signal: INTEGER_32
is 11
constant attribute
{ANY}
Exception code for a signal received from the OS.
Void_attached_to_expanded: INTEGER_32
is 12
constant attribute
{ANY}
Exception code for attachment of Void value to expanded entity.
Void_call_target: INTEGER_32
is 13
constant attribute
{ANY}
Exception code for feature applied to Void reference
System_level_type_error: INTEGER_32
is 14
constant attribute
{ANY}
Exception code for the system-level type error (this kind of error mostly arise with covariant redefinition).
exception_name: STRING
effective function
{ANY}
name_of_exception (a_exception: INTEGER_32): STRING
effective function
{ANY}
developer_exception: EXCEPTION
effective function
{ANY}
The last developer-thrown exception.
require
developer_exception_name: STRING
effective function
{ANY}
Name of last developer-raised exception.
require
is_developer_exception: BOOLEAN
effective function
{ANY}
Is the last exception originally due to a developer exception?
is_developer_named_exception: BOOLEAN
effective function
{ANY}
Is the last exception originally due to a developer exception?
is_developer_exception_of_name (name: STRING): BOOLEAN
effective function
{ANY}
Is the last exception originally due to a developer exception of name name?
assertion_violation: BOOLEAN
effective function
{ANY}
Is last exception originally due to a violated assertion or non-decreasing variant?
exception: INTEGER_32
{ANY}
Code of last exception that occurred.
is_signal: BOOLEAN
effective function
{ANY}
Is last exception originally due to an external event (operating system signal) ?
die (code: INTEGER_32)
effective procedure
{ANY}
Terminate execution with exit status code, without triggering an exception.
raise (name: STRING)
effective procedure
{ANY}
Raise a developer exception of name name.
require
  • name /= Void
throw (a_exception: EXCEPTION)
effective procedure
{ANY}
require
  • a_exception /= Void
signal_number: INTEGER_32
{ANY}
Signal Number received from OS.
 Zero if exception is not an OS signal.
named_exception: NAMED_EXCEPTION
once function
{}
developer_exception_memory: REFERENCE[EXCEPTION]
once function
{}
raise_exception (code: INTEGER_32)
{}
is_equal (other: WRAPPER_CLASS): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
require
  • other /= Void
ensure
  • trichotomy: Result = not Current < other and not other < Current
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
infix "<=" (other: WRAPPER_CLASS): BOOLEAN
effective function
{ANY}
Is Current less than or equal other?
See also >=, <, >, min, max.
require
  • other_exists: other /= Void
ensure
  • definition: Result = Current < other or is_equal(other)
infix ">" (other: WRAPPER_CLASS): BOOLEAN
effective function
{ANY}
Is Current strictly greater than other?
See also <, >=, <=, min, max.
require
  • other_exists: other /= Void
ensure
  • definition: Result = other < Current
infix ">=" (other: WRAPPER_CLASS): BOOLEAN
effective function
{ANY}
Is Current greater than or equal than other?
See also <=, >, <, min, max.
require
  • other_exists: other /= Void
ensure
  • definition: Result = other <= Current
in_range (lower: WRAPPER_CLASS, upper: WRAPPER_CLASS): BOOLEAN
effective function
{ANY}
Return True if Current is in range [lower..upper]
See also min, max, compare.
ensure
  • Result = Current >= lower and Current <= upper
compare (other: WRAPPER_CLASS): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
See also min, max, in_range.
require
  • other_exists: other /= Void
ensure
  • equal_zero: Result = 0 = is_equal(other)
  • smaller_negative: Result = -1 = Current < other
  • greater_positive: Result = 1 = Current > other
three_way_comparison (other: WRAPPER_CLASS): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
See also min, max, in_range.
require
  • other_exists: other /= Void
ensure
  • equal_zero: Result = 0 = is_equal(other)
  • smaller_negative: Result = -1 = Current < other
  • greater_positive: Result = 1 = Current > other
min (other: WRAPPER_CLASS): WRAPPER_CLASS
effective function
{ANY}
Minimum of Current and other.
See also max, in_range.
require
  • other /= Void
ensure
  • Result <= Current and then Result <= other
  • compare(Result) = 0 or else other.compare(Result) = 0
max (other: WRAPPER_CLASS): WRAPPER_CLASS
effective function
{ANY}
Maximum of Current and other.
See also min, in_range.
require
  • other /= Void
ensure
  • Result >= Current and then Result >= other
  • compare(Result) = 0 or else other.compare(Result) = 0
bounded_by (a_min: WRAPPER_CLASS, a_max: WRAPPER_CLASS): WRAPPER_CLASS
effective function
{ANY}
A value that is equal to Current if it is between the limits set by a_min and a_max.
Otherwise it's a_min if Current is smaller or a_max if Current is greater It's a shortcut for Current.min(a_max).max(a_min) also known as "clamp" in the widespread C library Glib
ensure
  • correctness: Result.in_range(a_min, a_max)