Lattice

Contents

Contact Name

Nick West.

Overview

Lattice supports a bidirectional n:m mapping between two sets. Although the package can be used directly it is more normally used indirectly via the Navigation package.

User Interface

The primary objects are the Lattice and the LatticeBuilder which can be used to build it. Although a Lattice can be assembled by direct calls to its methods, a LatticeBuilder simplifies the process. Given a primary set (P1,P2) and a secondary set (S1,S2,S3) with the mappings:-
  P1 - S1
  P1 - S2
  P2 - S1
  P2 - S3
The following code sets up a Lattice of those mapping:-

  TObject P1, P2;
  TObject S1, S2, S3;

  Lattice lat("P","S",LatticeBase::RLinkMulti);
  LatticeBuilder builder;
  builder.DockLattice( &lat, Lattice::kLeft );

  builder.AddPrimary(1,&P1);
  builder.AddPrimary(2,&P2);

  builder.AddSecondary(1,&S1);
  builder.AddSecondary(1,&S2);
  builder.AddSecondary(2,&S1);
  builder.AddSecondary(2,&S3);
Once built, the Lattice can be interrogated and navigated with methods such as GetFarIDs.

Database Access

None.

Configuring & Running

None.

Further Links


Nick West Last Modified: $Date: 2004/05/27 17:50:37 $