//*-- Author : Valeriy Onuchin 11/09/2000 
//
//
////////////////////////////////////////////////////////////////////////////////
//
// rooRelationshipType corresponds to Relationship_Type Class
//
// The abstract class rooRelationshipType represents descriptors for relationship
// types. An instance of any concrete derived class is called a 
// relationship-type descriptor; it provides information about a particular 
// relationship type, called its described type.
//
// Each relationship type has two defining characteristics:
//
//    The directionality of relationships of this type (unidirectional or 
//    bidirectional)
//
//    The destination class for relationships of this type.
//
// Concrete derived classes represent descriptors for unidirectional and 
// bidirectional relationships.
//
// Because this class is abstract, you never instantiate it; instead, you work 
// with instances of its concrete derived classes. You should not derive your 
// own classes from this class.

#include "rooObjy.h"
#include <ooas.h>
#include <oo.h>

ClassImp(rooRelationshipType)

////////////////////////////////////////////////////////////////////////////////
//______________________________________________________________________________
 rooRelationshipType::rooRelationshipType()
{
   // default ctor., for internal use only

   fImp = 0;
}

//______________________________________________________________________________
 rooRelationshipType::~rooRelationshipType()
{
   // for internal use only 
   
   fImp = 0;
}

//______________________________________________________________________________
rooClass & rooRelationshipType::other_class()
{
   // Returns a class descriptor for the destination class of the described 
   // relationship type.

   if(!fImp) return 0;
   d_Class& cl = ((Relationship_Type*)fImp)->other_class();
   if(!cl) return 0;

   if(!fOtherClass) fOtherClass = new rooClass((void*)&cl);      
   else fOtherClass->setImp((void*)&cl);
   return *fOtherClass;
}



ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.