+
Point of view
All features
class FOREIGN_TYPED_OBJECT [E_]
Summary
Direct parents
Inherit list: FOREIGN_OBJECT
Overview
Creation features
{FOREIGN_TYPES}
{ANY}
Features
{ANY}
{FOREIGN_PARAMETERS, FOREIGN_AGENT}
{}
Type querying
{ANY}
{ANY}
item: E_
writable attribute
{ANY}
set_item (an_item: E_)
effective procedure
{ANY}
Sets an item to this FOREIGN_TYPED_OBJECT.
If an_item exists then an_item must match the type.
require ensure
as_pointer: POINTER
effective function
make (a_type: FOREIGN_TYPE, an_item: E_)
effective procedure
{}
Create a FOREIGN_TYPED_OBJECT of a_type from an_item.
If an_item exists then a_type and an_item must match.
require
  • a_type_matches_an_item: an_item /= Void implies a_type.is_equal(type_of(an_item))
ensure
with (an_item: E_)
effective procedure
{}
Creates a FOREIGN_TYPED_OBJECT from an_item.
The actual type of an_item is discovered (computed) at runtime. This requires CPU run-time; this cost may be avoided providing the correct type to make creation feature which requires - as a precondition - it to be the correct type.
NOTE: this is not the preferred method. You should know the type of the objects you create and use the "create" functions of FOREIGN_TYPES.
require
  • an_item /= Void
ensure
type_of (an_item: E_): FOREIGN_TYPE
effective function
{ANY}
The type of an_item.
match_type (a_type: FOREIGN_TYPE): BOOLEAN
effective function
{ANY}
writable attribute
{ANY}