Abstract
Ada Gem #8 --- A factory function is a technique for constructing an object from one class given only an object in some other class. The technique is used to implement assignment for objects having a class-wide type, such that tag-mismatch exceptions cannot occur.
Index Terms
Gem #8: Factory functions
Recommendations
Gem #37: bounded buffer package in GNAT hierarchy (part 2)
Ada Gem #37 --- Part 1 of this Gem briefly introduced bounded buffers, protected types, and the declaration of the generic package GNAT. Bounded_Buffers, exporting protected type Bounded_Buffer. In Part 2 of the Gem we examine the private part of ...
Gem #85: the distributed systems annex 2 -- distributed objects
Ada Gem #85 --- This is the second in a series of Gems introducing the facilities defined by the optional annex for Distributed Systems (Annex E) of the Ada Reference Manual. In the first installment, we showed how a simple client/server architecture ...
Gem # 3: Limited types in Ada 2005 --- constructor functions
Ada Gem #3 --- Constructor functions may be used to create objects of limited types. The result of such function calls is built "in place" in the actual object being created.






Comments