Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > PHP/MySQL/Scripting

  • Print
  • + Share This
Like this article? We recommend

The GenericLink Implementation

Listing 5 is the implementation of the GenericLink class. The constructor is passed five parameters:

  • A pointer to a GenericLinkContext object
  • Two node pointers
  • Two interface pointers

All of these parameters are stored and a free slot number is requested from the GenericLinkContext object.

Listing 5 Implementation of the generic link class.

GenericLink::GenericLink(GenericLinkContext* aLinkContext,
             char* nodeA, char* nodeB,
             char* ifA, char* ifB)
  linkContext = aLinkContext;
  mySlotNumber = linkContext->GetNextFreeSlot();

  NodeA = nodeA;
  NodeB = nodeB;
  InterfaceA = ifA;
  InterfaceB = ifB;


Now let’s look at the implementation of the GenericLinkContext class.

  • + Share This
  • 🔖 Save To Your Account