Two constructions of C++ subclasses from functions

  • Authors:
  • James M. Bateman

  • Affiliations:
  • Austin Peay State University, Clarksville, TN

  • Venue:
  • ACM-SE 33 Proceedings of the 33rd annual on Southeast regional conference
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

This work is about value-semantics of subclasses. Functions that are special reversible injections (1-to-1 functions) lead here to two subclass subconstructions in which functions control the values. We show by means of such functions that a subset or superset of the values of a class can become, in effect, its subclass. The constructions are exemplified in but not limited to C++. Taxonomic hierarchies based on is-a links [2] are usually presented as the purpose of subclasses [1]. A view of subclasses related to subtypes was presented in [3]. But one of our constructions is based neither on an is-a link nor on subtypes; it suggests there are alternative bases for hierarchies.