Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ObjectContainerBase.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GaudiKernel/GaudiKernel/ObjectContainerBase.h,v 1.1.1.1 2001/04/18 18:14:18 tlindner Exp $
00002 #ifndef GAUDI_OBJECTCONTAINERBASE_H
00003 #define GAUDI_OBJECTCONTAINERBASE_H 1
00004 
00005 // Include files
00006 #include <iostream>
00007 #include "GaudiKernel/Kernel.h"
00008 #include "GaudiKernel/StreamBuffer.h"
00009 #include "GaudiKernel/DataObject.h"
00010 #include "GaudiKernel/StatusCode.h"
00011 
00012 // Forward declarations
00013 class ContainedObject;
00014 
00024 class ObjectContainerBase : public DataObject  {
00025 
00026 protected:
00028   ObjectContainerBase( const char* name = "unknown" )
00029     : DataObject(name) { }
00031   virtual ~ObjectContainerBase() { }
00032 
00033 public:
00034 
00037   virtual StatusCode release(ContainedObject* value) = 0;
00038 
00042   virtual unsigned long release() { return DataObject::release( ); }
00043 
00045   virtual long distance( const ContainedObject* obj ) const = 0;
00046 
00048   virtual ContainedObject* containedObject( long dist ) = 0;
00049   virtual const ContainedObject* containedObject( long dist ) const = 0;
00050 
00052   virtual long numberOfObjects() const = 0;
00053 
00056   virtual void add(ContainedObject* pObject) = 0;
00057 
00059   virtual StreamBuffer& serialize( StreamBuffer& s ) const {
00060     DataObject::serialize(s);
00061     return s;
00062   }
00064   virtual StreamBuffer& serialize( StreamBuffer& s ) {
00065     DataObject::serialize(s);
00066     return s;
00067   }
00068 
00070   friend std::ostream& operator<< ( std::ostream& s, const ObjectContainerBase& obj ) {
00071     return obj.fillStream(s);
00072   }
00074   virtual std::ostream& fillStream( std::ostream& s ) const {
00075     return s;
00076   }
00077 
00078 private:
00079 };
00080 
00081 #endif    // GAUDI_OBJECTCONTAINERBASE_H

Generated at Wed Nov 21 12:22:04 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000