File indexing completed on 2025-01-30 10:07:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIKERNEL_INTUPLE_H
0012 #define GAUDIKERNEL_INTUPLE_H
0013
0014
0015 #include <string>
0016 #include <typeinfo>
0017 #include <vector>
0018
0019
0020 #include "GaudiKernel/Kernel.h"
0021 #include "GaudiKernel/StatusCode.h"
0022
0023
0024 class INTuple;
0025 class INTupleItem;
0026 class ISelectStatement;
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 class GAUDI_API INTupleItem {
0038 protected:
0039
0040 virtual void setType( long typ ) = 0;
0041
0042 public:
0043
0044 virtual ~INTupleItem() = default;
0045
0046
0047 virtual void release() = 0;
0048
0049 virtual const std::type_info& typeID() const = 0;
0050
0051 virtual std::string typeName() const = 0;
0052
0053 virtual const void* buffer() const = 0;
0054
0055 virtual bool hasIndex() const = 0;
0056
0057 virtual const std::string& index() const = 0;
0058
0059 virtual const std::string& name() const = 0;
0060
0061 virtual long type() const = 0;
0062
0063 virtual long length() const = 0;
0064
0065 virtual void reset() = 0;
0066
0067 virtual long ndim() const = 0;
0068
0069 virtual long dim( long i ) const = 0;
0070
0071 virtual long size() const = 0;
0072
0073 virtual long filled() const = 0;
0074
0075 virtual INTupleItem* indexItem() = 0;
0076
0077 virtual const INTupleItem* indexItem() const = 0;
0078
0079 virtual INTuple* tuple() = 0;
0080 };
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 class GAUDI_API INTuple {
0092 protected:
0093
0094 virtual INTupleItem* i_find( const std::string& name ) const = 0;
0095
0096 public:
0097
0098 typedef std::vector<INTupleItem*> ItemContainer;
0099
0100 virtual ItemContainer& items() = 0;
0101
0102 virtual const ItemContainer& items() const = 0;
0103
0104 virtual char* setBuffer( char* buff ) = 0;
0105
0106 virtual const char* buffer() const = 0;
0107
0108 virtual char* buffer() = 0;
0109
0110 virtual const std::string& title() const = 0;
0111
0112 virtual void reset() = 0;
0113
0114 virtual const INTupleItem* find( const std::string& name ) const = 0;
0115
0116 virtual INTupleItem* find( const std::string& name ) = 0;
0117
0118 virtual StatusCode add( INTupleItem* item ) = 0;
0119
0120 virtual StatusCode remove( INTupleItem* item ) = 0;
0121
0122 virtual StatusCode remove( const std::string& name ) = 0;
0123
0124 virtual StatusCode attachSelector( ISelectStatement* sel ) = 0;
0125
0126 virtual ISelectStatement* selector() = 0;
0127
0128 virtual StatusCode write() = 0;
0129
0130 virtual StatusCode writeRecord() = 0;
0131
0132 virtual StatusCode read() = 0;
0133
0134 virtual StatusCode readRecord() = 0;
0135
0136 virtual StatusCode save() = 0;
0137 virtual ~INTuple() = default;
0138 };
0139 #endif