diff --git a/utest/objectmodel.test.cpp b/utest/objectmodel.test.cpp index 5eb266d..8ceb86b 100644 --- a/utest/objectmodel.test.cpp +++ b/utest/objectmodel.test.cpp @@ -23,6 +23,50 @@ * 2. representation struct names follow pattern DRepr, e.g. DPolar, DRect. * Don't require "intended primary interface" in the name, * since we're seeking ability to attach the same data to different interfaces + * + * Example Class Diagram + * + * AComplex + * ^ + * | + * /------------------------+--------------------\ + * | | | + * IComplex_DRectCoords IComplex_DPolarCoords IComplex_Any + * = IComplex_Specific = IComplex_Specific + * + * ^ + * | + * OUniqueBox + * + * ^ + * | + * RComplex + * = RoutingFor + * ^ + * | + * ubox + * + * AComplex: abstract interface + * DPolarCoords: passive representation + * IComplex_DPolarCoords: implement AComplex interface for representation DPolarCoords + * + * OUniqueBox: + * a self-sufficient object, associating + * interface AComplex with representation DPolarCoords + * + * RComplex: convenience interface for OUniqueBox + * + * ubox: + * self-sufficent object with convenient interface + * + * Application code will deal with ubox + * + * + * + * + * + * **/ #include @@ -193,10 +237,15 @@ namespace xo { using RoutingType = RComplex; }; + /** boxed object, held by unique pointer + * + * Example: + * ubox z1 = ..; + * z1.xcoord(); + **/ template - struct ubox : public RoutingFor::typename RoutingType { } - } - + struct ubox : public RoutingFor::typename RoutingType { + } } } }