| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# INTuple.h

Go to the documentation of this file.

    00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/INTuple.h,v 1.7 2008/10/27 19:22:20 marcocle Exp $
    00002 #ifndef GAUDIKERNEL_INTUPLE_H
    00003 #define GAUDIKERNEL_INTUPLE_H
    00004
    00005 // STL include files
    00006 #include <string>
    00007 #include <typeinfo>
    00008
    00009 // Framework include files
    00010 #include "GaudiKernel/Kernel.h"
    00011 #include "GaudiKernel/StatusCode.h"
    00012
    00013 // Forward declarations
    00014 class INTuple;
    00015 class INTupleItem;
    00016 class ISelectStatement;
    00017
    00027 class GAUDI_API INTupleItem {
    00028 protected:
    00030   virtual void                setType (long typ)            = 0;
    00031 public:
    00033   virtual ~INTupleItem() { }
    00034
    00036   virtual void                release()                     = 0;
    00038   virtual const std::type_info& typeID()      const         = 0;
    00040   virtual std::string         typeName()      const         = 0;
    00042   virtual const void*         buffer()        const         = 0;
    00044   virtual bool                hasIndex()      const         = 0;
    00046   virtual const std::string&  index()         const         = 0;
    00048   virtual const std::string&  name()          const         = 0;
    00050   virtual long                type()          const         = 0;
    00052   virtual long                length()        const         = 0;
    00054   virtual void                reset()                       = 0;
    00056   virtual long                ndim()          const         = 0;
    00058   virtual long                dim(long i)     const         = 0;
    00060   virtual long                size()          const         = 0;
    00062   virtual long                filled()        const         = 0;
    00064   virtual INTupleItem*        indexItem()                   = 0;
    00066   virtual const INTupleItem*  indexItem()     const         = 0;
    00068   virtual INTuple*            tuple()                       = 0;
    00069 };
    00070
    00080 class GAUDI_API INTuple {
    00081 protected:
    00083   virtual INTupleItem*          i_find(const std::string& name)  const = 0;
    00084 public:
    00085   // Definition of _Item container
    00086   typedef std::vector< INTupleItem* > ItemContainer;
    00088   virtual ItemContainer&        items()   =  0;
    00090   virtual const ItemContainer&  items()    const   = 0;
    00092   virtual void                  setBuffer(char* buff) = 0;
    00094   virtual const char*           buffer()  const = 0;
    00096   virtual char*                 buffer()  = 0;
    00098   virtual const std::string&    title()         const         = 0;
    00100   virtual void                  reset() = 0;
    00102   virtual const INTupleItem*    find(const std::string& name) const = 0;
    00104   virtual       INTupleItem*    find(const std::string& name) = 0;
    00106   virtual StatusCode            add(INTupleItem* item) = 0;
    00108   virtual StatusCode            remove(INTupleItem* item) = 0;
    00110   virtual StatusCode            remove(const std::string& name) = 0;
    00112   virtual StatusCode            attachSelector(ISelectStatement* sel) = 0;
    00114   virtual ISelectStatement*     selector() = 0;
    00116   virtual StatusCode            write() = 0;
    00118   virtual StatusCode            writeRecord() = 0;
    00120   virtual StatusCode            read() = 0;
    00122   virtual StatusCode            readRecord() = 0;
    00124   virtual StatusCode            save() = 0;
    00125   virtual ~INTuple() {}
    00126 };
    00127 #endif