00001 #ifndef Impala_Persistency_ImageSetLocator_h
00002 #define Impala_Persistency_ImageSetLocator_h
00003
00004 #include "Persistency/Locator.h"
00005
00006 namespace Impala
00007 {
00008 namespace Persistency
00009 {
00010
00011
00016 class ImageSetLocator : public Locator
00017 {
00018 public:
00019
00020 ImageSetLocator()
00021 {
00022 }
00023
00024 ImageSetLocator(CString protocolAndHost, CString dataSet)
00025 : Locator(protocolAndHost, dataSet)
00026 {
00027 mName = "";
00028 }
00029
00030 ImageSetLocator(CString protocolAndHost, CString videoSet, CString imageSet)
00031 : Locator(protocolAndHost, videoSet)
00032 {
00033 mName = imageSet;
00034 }
00035
00036 ImageSetLocator(CString dataSet, CmdOptions& options)
00037 : Locator(dataSet, options)
00038 {
00039 mName = "";
00040 }
00041
00042 ImageSetLocator(const Locator& base, CString name)
00043 : Locator(base.GetProtocol(), base.GetHost(), base.GetDataSet())
00044 {
00045 mName = name;
00046 }
00047
00048 virtual
00049 ~ImageSetLocator()
00050 {
00051 }
00052
00053 String
00054 GetName() const
00055 {
00056 if (mName.empty())
00057 return GetDataSet();
00058 return mName;
00059 }
00060
00061 String
00062 ToString() const
00063 {
00064 return "ImageSetLocator(" + GetProtocol() + "," + GetHost()
00065 + "," + GetDataSet() + "," + GetName() + ")";
00066 }
00067
00068 private:
00069
00070 String mName;
00071
00072 ILOG_VAR_DEC;
00073 };
00074
00075 ILOG_VAR_INIT(ImageSetLocator, Impala.Persistency);
00076
00077 std::ostream&
00078 operator<< (std::ostream& os, const ImageSetLocator& loc)
00079 {
00080 os << loc.ToString();
00081 return os;
00082 }
00083
00084 }
00085 }
00086
00087 #endif