Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/store/iobj_const_visitor is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_store_iobj_const_visitor
0005 #define tools_store_iobj_const_visitor
0006 
0007 #include "../typedefs"
0008 
0009 #include <string>
0010 #include <vector>
0011 
0012 namespace tools {
0013 
0014 class iobj_const_visitor;
0015 
0016 class istorable {
0017 public:
0018   virtual ~istorable() {}
0019 public:
0020   virtual void* cast(const std::string&) const = 0;
0021 public:
0022   virtual const std::string& store_cls() const = 0;
0023   virtual bool visit(iobj_const_visitor&) const = 0;
0024 //  virtual bool read(iobj_visitor&) = 0;
0025 };
0026 
0027 class iobj_const_visitor {
0028 public:
0029   virtual ~iobj_const_visitor() {}
0030 public:
0031   typedef bool(*local_func)(const istorable&,iobj_const_visitor&);
0032 public:
0033   virtual bool begin(const istorable&,const std::string&,local_func) = 0;
0034   virtual bool end(const istorable&) = 0;
0035 
0036   virtual bool visit(const std::string&,bool) = 0;
0037   virtual bool visit(const std::string&,char) = 0;
0038 //virtual bool visit(const std::string&,unsigned char) = 0;
0039   virtual bool visit(const std::string&,short) = 0;
0040 //virtual bool visit(const std::string&,unsigned short) = 0;
0041 
0042   virtual bool visit(const std::string&,int) = 0;
0043   virtual bool visit(const std::string&,unsigned int) = 0;
0044 
0045   virtual bool visit(const std::string&,int64) = 0;
0046   virtual bool visit(const std::string&,uint64) = 0;
0047 
0048   virtual bool visit(const std::string&,float) = 0;
0049   virtual bool visit(const std::string&,double) = 0;
0050 
0051   virtual bool visit(const std::string&,const std::string&) = 0;
0052 //virtual bool visit(const std::string&,const char*) = 0;
0053   virtual bool visit(const std::string&,const std::vector<bool>&) = 0;
0054   virtual bool visit(const std::string&,const std::vector<char>&) = 0;
0055   virtual bool visit(const std::string&,const std::vector<short>&) = 0;
0056   virtual bool visit(const std::string&,const std::vector<int>&) = 0;
0057   virtual bool visit(const std::string&,const std::vector<int64>&) = 0;
0058   virtual bool visit(const std::string&,const std::vector<float>&) = 0;
0059   virtual bool visit(const std::string&,const std::vector<double>&) = 0;
0060 //virtual bool visit(const std::string&,const std::vector<unsigned char>&) = 0;
0061   virtual bool visit(const std::string&,const std::vector<std::string>&) = 0;
0062   virtual bool visit(const std::string&,const std::vector< std::vector<double> >&) = 0;
0063 
0064 //virtual bool visit_double(const std::string&,const IArray&) = 0;
0065   virtual bool visit(const std::string&,const istorable&) = 0;
0066 };
0067 
0068 }
0069 
0070 
0071 #endif