From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Please - has anyone got a mixed Ada/C++ sample project they could share? Date: Fri, 24 Feb 2017 22:33:16 +0000 Organization: A noiseless patient Spider Message-ID: References: <22f20afe-3605-467b-8b31-0868fcdb7d54@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="a2b9919c6026194ea836dc34df89e23d"; logging-data="9579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18t6kDSY6/MTm18QEE9hrUi3AKe4OvIERI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:5cXLnRlKapjZDFV+ORXm0LmKfsk= sha1:eY1NvHkt4HqROzl1iWuE1S1I5DM= Xref: news.eternal-september.org comp.lang.ada:33401 Date: 2017-02-24T22:33:16+00:00 List-Id: john@mccabe.org.uk writes: > I'd be particularly interested in one where (if you consider this > diagram - http://java.dzone.com/sites/all/files/observer_pattern.PNG) > the Subject and Observer interfaces are defined as C++ abstract base > classes (i.e. provide only pure virtual functions and no members), the > ConcreteSubject is [probably] in C++, and ConcreteObserver in Ada with > an Ada main procedure. As I understand it, ConcreteSubject.notify() will end up calling ConcreteObserver.update() for registered observers, which will then know to get subjectState from the ConcreteSubject. Perhaps subjectState needs to be publicly visible for this to work? or there are unstated public operations? Is Subject abstract? I'd expect there to be some implementation of those operations somewhere, in Subject would be natural.