Cat::BaseCategory -- the
base category
IntroductionCat::BaseCategory is the ``universal'' category, any
domain in the Dom
package is of this category.
Generating
the categoryCat::BaseCategory()
DetailsCat::BaseCategory is the most general super-category
of all categories defined by the Cat package. Any domain in the
Dom package is of this
category.Cat::BaseCategory are related
to type conversion and equality testing, they are not related to an
algebraic structure.convert(x)x into an element of this domain or
return FAIL if that is not possible.convert_to(dom x, type T)x into an element of type T
or return FAIL if that is not possible. T may
be domain or a type expression.equal(dom x, dom
y)TRUE if it can decide that
x is equal to y in the mathematical sense
imposed by this domain. It must return FALSE if it can
decide that x is not equal to y
mathematically. If the method can not decide the equality it must
return UNKNOWN._equal, i.e. the
= operator. The function _equal may not be overloaded.expr(dom x)x into an expression consisting of
elements of kernel domains. The expression should canonically represent
an element of this domain, if possible.coerce(x)x into an element of this domain. Must
return FAIL if not
successful.x into an
element of this domain by first calling dom::convert(x)
and then, if this fails, x::dom::convert_to(x, dom); it
retuns FAIL if both methods fail.equiv(x, y)FAIL if no decision was possible.x and
y into elements of this domain and then calls
dom::equal with these elements. It returns
FAIL if the conversion fails or the equality test returns
UNKNOWN.new(x)D, an expression of the form
D(x,...) results in a call of the form
D::new(x,...).x by
calling dom::convert(x) and returns the result. It raises
an error if dom::convert returns FAIL.print(dom x)x. It may be used to configure the
printing of domain elements.print for
example!dom::expr.testtype(x, T)testtype. It is used to test if
x is of type T.TRUE if it can decide that
x is of type T, FALSE if it can
decide that x is not of type T and
FAIL if it can not decide the test.x is of this domain, or if T is this
domain, or if T is an element of this domain. Thus the
following three situations can arise:testtype(dom x, type
T)x may be regarded as
an element of the type T, which may either be a domain or
type expression. dom::convert_to(x,T) is called, if this
is successful TRUE is returned and FAIL if
not.testtype(x, dom)x may be regarded as
an element of this domain. dom::convert(x) is called, if
this is successful TRUE is returned and FAIL
if not.testtype(x, dom T)T is regarded as a type expression. The
implementation provided assumes that T represents the type
consisting of the singleton element T and returns the
result of the call dom::equiv(x,T).new_extelement(x...)Ax::systemRep, i.e. for kernel or
facade domains. (Facade domains are domains which do not have elements
of their own domain but operate on elements of kernel domains like
DOM_POLY.)new(D,x...) is evaluated and
D is a domain with method "new_extelement",
then D::new_extelement(D,x...) is evaluated and returned
as result.new would
return a ``container'' element of D rather than a ``raw''
element as intended.D::new(x...). Thus a call of the form
new(D,x...) yields the same result as a call of the form
D(x...).Cat::SetCat."printElem" has been removed.