00001 #ifndef ROOTSTREAMABLEADAPTER_H
00002 #define ROOTSTREAMABLEADAPTER_H
00003
00004 #include "Sct/Streamable.h"
00005 #include "TObject.h"
00006
00007 #include <string>
00008
00009 using Sct::Streamable;
00010 using namespace std;
00011
00012 namespace SctData {
00013
00014 class RootStreamableAdapter : public virtual Streamable {
00015 public:
00016 RootStreamableAdapter(TObject&) throw() ;
00017 virtual string getClassName() const throw() ;
00018 TObject* getObject() const throw() ;
00019 private:
00020 TObject* ptr;
00021 };
00022
00023 inline RootStreamableAdapter::RootStreamableAdapter(TObject& t) throw() : ptr(&t) {
00024 }
00025
00026 inline string RootStreamableAdapter::getClassName() const throw() {
00027 return ptr->ClassName();
00028 }
00029
00030 inline TObject* RootStreamableAdapter::getObject() const throw() {
00031 return ptr;
00032 }
00033
00034 }
00035 #endif //#ifndef ROOTSTREAMABLEADAPTER_H