//*-- Author : Valeriy Onuchin 11/09/2000 
//
//
////////////////////////////////////////////////////////////////////////////////
//
// rooTopLevelModule class corresponds to Top_Level_Module class
//
// The class rooTopLevelModule represents descriptors for the top-level module 
// in the schema of a federated database. An instance of this class is called 
// a top-level module descriptor.
//
// This class overrides member functions inherited from rooModule, but does not
// introduce any new functionality. Your programs should not need to use this
// class explicitly. That is, program variables for module descriptors can all
// use the declared type rooModule even if the described module is the 
// top-level module.
//    You should never instantiate this class directly; instead, call the
// rooModule::top_level static member function to obtain a descriptor for 
// the top-level module.
//

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

ClassImp(rooTopLevelModule)

////////////////////////////////////////////////////////////////////////////////
//______________________________________________________________________________
 rooTopLevelModule::rooTopLevelModule()
{
   // default ctor. internal use only

   fImp = new Top_Level_Module();
}

//______________________________________________________________________________
 rooTopLevelModule::~rooTopLevelModule()
{
   // dtor. internal use only

   fImp = 0;
}

//______________________________________________________________________________
 rooModuleItr rooTopLevelModule::named_modules_begin()
{
   // Gets an iterator for all named modules in the federated database.
   //
   // Returns:
   //    A module iterator that finds all named (non-top-level) modules in 
   //    the federated database.
   //
   // See also: named_modules_end

   rooModuleItr itr;
   if(!fImp) return itr;

   *((module_iterator*)itr.getImp()) = 
                  ((Top_Level_Module*)fImp)->named_modules_begin();
   return itr;
}

//______________________________________________________________________________
 rooModuleItr rooTopLevelModule::named_modules_end()
{
   // Gets an iterator representing the termination condition for iteration 
   // through the named modules in the federated database.
   //
   // Returns: 
   //    A module iterator that is positioned after the last named module in 
   //    the federated database.
   //
   // You can compare the iterator returned by named_modules_begin with the one
   // returned by this member function to test whether iteration has finished.

   rooModuleItr itr;
   if(!fImp) return itr;
   *((module_iterator*)itr.getImp()) = 
                        ((Top_Level_Module*)fImp)->named_modules_end();
   return itr;
}

//______________________________________________________________________________
 Bool_t rooTopLevelModule::is_top_level() const
{
   // Overrides the inherited member function. Indicates that the described 
   // module is the top-level module. 
   //
   // Returns: kTRUE 

   return fImp ? ((Top_Level_Module*)fImp)->is_top_level() : 0;
}


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.