Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

FrameLocator.h

Go to the documentation of this file.
00001 #ifndef Impala_Persistency_FrameLocator_h
00002 #define Impala_Persistency_FrameLocator_h
00003 
00004 #include "Basis/Quid.h"
00005 #include "Persistency/Locator.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Persistency
00010 {
00011 
00012 
00013 class FrameLocator : public Locator
00014 {
00015 public:
00016 
00017     FrameLocator(CString protocolAndHost, CString dataSet, CString container,
00018                  int frameNr, CString suffix)
00019         : Locator(protocolAndHost, dataSet)
00020     {
00021         mContainer = container;
00022         char name[200];
00023         sprintf(name, "frame_%06d", frameNr);
00024         mName = String(name) + suffix;
00025     }
00026 
00027     FrameLocator(const Locator& base, CString container, int frameNr,
00028                  CString suffix)
00029         : Locator(base.GetProtocol(), base.GetHost(), base.GetDataSet())
00030     {
00031         mContainer = container;
00032         char name[200];
00033         sprintf(name, "frame_%06d", frameNr);
00034         mName = String(name) + suffix;
00035     }
00036 
00037     virtual
00038     ~FrameLocator()
00039     {
00040     }
00041 
00042     String
00043     GetContainer() const
00044     {
00045         return mContainer;
00046     }
00047 
00048     void
00049     SetContainer(CString container)
00050     {
00051         mContainer = container;
00052     }
00053 
00054     String
00055     GetName() const
00056     {
00057         return mName;
00058     }
00059 
00060     String
00061     ToString() const
00062     {
00063         return "FrameLocator(" + GetProtocol() + "," + GetHost() + ","
00064             + GetDataSet() + "," + GetContainer() + "," + GetName() + ")";
00065     }
00066 
00067 private:
00068 
00069     String mContainer;
00070     String mName;
00071 
00072     ILOG_VAR_DEC;
00073 };
00074 
00075 ILOG_VAR_INIT(FrameLocator, Impala.Persistency);
00076 
00077 std::ostream&
00078 operator<< (std::ostream& os, const FrameLocator& loc)
00079 {
00080     os << loc.ToString();
00081     return os;
00082 }
00083 
00084 } // namespace Persistency
00085 } // namespace Impala
00086 
00087 #endif

Generated on Fri Mar 19 09:31:43 2010 for ImpalaSrc by  doxygen 1.5.1