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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mart van de Wege Newsgroups: comp.lang.ada Subject: Simple Components: adding an existing object to a graph Date: Sun, 26 Jan 2020 11:23:05 +0100 Message-ID: <87wo9eikja.fsf@gaheris.vdwege.eu> Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net kvt75W5P7ToKw5BM6h2I7QtBnvlZisKId8NIlYMm4UFoMdgPqg X-Orig-Path: gaheris.vdwege.eu!not-for-mail Cancel-Lock: sha1:rKwTVsuGn3VocJtn2TQGN8KJcps= sha1:KHKhtvkCLKSSNuaoaYpQpyBSmOY= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Xref: reader01.eternal-september.org comp.lang.ada:57948 Date: 2020-01-26T11:23:05+01:00 List-Id: This one's for Dimitry, probably: I want to create a genealogy of persons using his generic directed weighted graph package. I've seen how I can do that like this (example code, assuming an instantiated Graph): type Person is record Name: Unbounded_String, Age: Natural end record; and then adding it to the graph with: Ancestor : Node := new Person; However, assume I already have plenty of code to create and manipulate Person objects, how do I assign an *existing* object of type Person to a graph? Trying to do it the obvious way by assigning an access to Person to a Node object gets me an error message that Node is not a general access type. Regards, Mart van de Wege -- "We will need a longer wall when the revolution comes." --- AJS, quoting an uncertain source.