Bi-directional pointers

are there any Ruby code generation 'macros' to declare bi-directional
pointers and automatically maintain their consistency? it would take various
relation combinations (1-1, 1-N, N-M), generate appropriate interfaces, and
implement these using a private protocol for keeping the pointers in sync.

i did mean bidirectional _ruby_ references, not c or c++ pointers :slight_smile:

"itsme213" <itsme213@hotmail.com> wrote in message
news:7Veld.2018$Zr3.247@fe1.texas.rr.com...

are there any Ruby code generation 'macros' to declare bi-directional
pointers and automatically maintain their consistency? it would take

various

relation combinations (1-1, 1-N, N-M), generate appropriate interfaces,

and

···

implement these using a private protocol for keeping the pointers in sync.

Hi,

the keywords "relation" and "association" probably describe better what
you're at. I'm not aware of anything like this, although with Ruby's
dynamic nature it should be fairly easy to cook something up. Did you
check the RAA?

Kind regards

    robert

"itsme213" <itsme213@hotmail.com> schrieb im Newsbeitrag
news:P3vld.9212$pu3.5156@fe2.texas.rr.com...

i did mean bidirectional _ruby_ references, not c or c++ pointers :slight_smile:

"itsme213" <itsme213@hotmail.com> wrote in message
news:7Veld.2018$Zr3.247@fe1.texas.rr.com...
> are there any Ruby code generation 'macros' to declare bi-directional
> pointers and automatically maintain their consistency? it would take
various
> relation combinations (1-1, 1-N, N-M), generate appropriate

interfaces,

and
> implement these using a private protocol for keeping the pointers in

sync.

···