Ghostvars cross-linking code-generation possibilities: - RJL051121 RJLRef: $PH/COOL-BDE/bdegencpp/gencpp_ghostvars.051121.txt I am resurrecting the ghostvars project, motivated by RAlmonte's 05f523 reference to the OpenSource project libpropc++ at http://ex-code.com/propcpp/: The libpropc++ library supports cross-notification [and cross-update?] between two [or more?] sources of object data changes (see appended extract). [Update 060212: the uSoft SWFactories text (06s524) says transformations that can map one level of abstraction to another are a 'critical innovation' for SW industrialization.] ----------------------------------- libpropc++ claims inspired me to create a related set of notes in $PH/COOL-BDE/bdegencpp/aareadme, (linked from $PH/05f523/week12/aareadme_bdegencpp). That aareadme discusses a concept for auto-generating code for cross-linking and updating 'ghost' variables in class data members. [Ref: $PH/ghostvarsRev3] I conjecture that this code can be auto-generated by gencpp, after adding 1-to-1 associative entities and new cross-mapping access macros to pr_accessors.c and recompiling pr_util, without changing any code in the two classes it couples. Code changes would be confined to the XXSetField access methods and compiled conditionally like logging is. [Any volunteers for a new MS thesis on auto-generating code for ghostvar maintenance? (Prachee Sharma did one circa 2000).] aareadme_bdegencpp also proposes adding four other new groups of table types to bde's schema.sch file, oriented toward a LCP-style MVController. These would be invisible at first without requiring bde code changes (First goal is to get bde to compile with gencpp.) =========================================== Extract from libpropc++ homepage http://ex-code.com/propcpp/: > This is libpropc++ 1.0 library - the ANSI C++ template library > to create "properties" of objects: > > Property &Widget::set_color, &Widget::get_color> color; > which can be manipulated like this: > > widget.color = "red"; > Properties can be bound with other properties to automatically synchronize their values (so that when one property changes, the other changes accordingly). libpropc++ supports many different kinds of binding properties including one-directional and two-directional bindings, bindings properties of different value types and binding with a value transformation (by a function or an other kind of functor). ------------------------------------- > See this article for detailed discussions about binding properties in general. > Binding properties particularly simplifies development of GUI applications: > checkbox.checked.bind(frame.visible); > mutual_bind(menu_item.selected, appPrefs.configItem); > libpropc++ also has built-in signalling (Observer Pattern from object oriented methodology) implementation or (alternatively) can use libsigc++ for signalling. Signal programming is the programming paradigm of an object notifying other objects when some event (for example change of a value of a property) happens. > > libpropc++ API is documented using Doxygen. > > libpropc++ is written using highest programming technologies and standards ===========================