about
12/05/2022
CompoundObjects Repo
CompoundObjects code

CompoundObjects  Repository

Carefully examines initialization processing for Compound Objects

Quick Status Code functions correctly no known defects Demonstration code yes Documentation yes Test cases none planned Static library none planned Build requires C++17 option Planned design changes None
Fig 1. Class and Object Relationships

1.0 Concept

Compound Objects are composite structures built by combining classes with the four class relationships:
  • Inheritance: an "is-a" relationship
  • Composition: ownership by inclusion of one class instance by another
  • Aggregation: ownership by including of a reference of one class instance by another
  • Using: non-ownership relationship where one class uses an instance of another it did not create
Example: TextFinder
Fig 1. TextFinder Class Diagram

2.0 Build

CompoundObjects code was built with Visual Studio Community Edition - 2019 and tested on Windows 10.

3.0 Resources

CodeSnap-CompoundObjects.cpp
DesignNote-CppClassRelationships.html
Discusses some details of how the four class relationships work in C++.
  Next Prev Pages Sections About Keys