00001 #ifndef Impala_Persistency_KernelMatrixLocator_h
00002 #define Impala_Persistency_KernelMatrixLocator_h
00003
00004 #include "Persistency/Locator.h"
00005 #include "Core/Feature/FeatureDefinition.h"
00006
00007 namespace Impala
00008 {
00009 namespace Persistency
00010 {
00011
00012
00027 class KernelMatrixLocator : public Locator
00028 {
00029 public:
00030
00031 KernelMatrixLocator()
00032 {
00033 }
00034
00035 KernelMatrixLocator(CString protocolAndHost, CString dataSet,
00036 bool isIndex, CString walkType, CString annoSet,
00037 String model, String feature, CString container)
00038 : Locator(protocolAndHost, dataSet)
00039 {
00040 mIsIndex = isIndex;
00041 mWalkType = walkType;
00042 mAnnoSet = annoSet;
00043 mFeatureIndexCat = "";
00044 mModel = model;
00045 mFeature = feature;
00046 mContainer = container;
00047 mStartNode = -1;
00048 mNodeCount = -1;
00049 mDoParts = 1;
00050 mEmployReal32 = false;
00051 mWriteReal32 = false;
00052 mIncrement = 0;
00053 }
00054
00055 KernelMatrixLocator(CString dataSet, bool isIndex, CString walkType,
00056 CString annoSet, String model, String feature,
00057 CString container, CmdOptions& options)
00058 : Locator(dataSet, options)
00059 {
00060 mIsIndex = isIndex;
00061 mWalkType = walkType;
00062 mAnnoSet = annoSet;
00063 mFeatureIndexCat = "";
00064 mModel = model;
00065 mFeature = feature;
00066 mContainer = container;
00067 mStartNode = -1;
00068 mNodeCount = -1;
00069 mDoParts = 1;
00070 mEmployReal32 = false;
00071 mWriteReal32 = false;
00072 mIncrement = 0;
00073 }
00074
00075 KernelMatrixLocator(const Locator& base, bool isIndex, CString walkType,
00076 CString annoSet, String model, String feature,
00077 CString container)
00078 : Locator(base.GetProtocol(), base.GetHost(), base.GetDataSet())
00079 {
00080 mIsIndex = isIndex;
00081 mWalkType = walkType;
00082 mAnnoSet = annoSet;
00083 mFeatureIndexCat = "";
00084 mModel = model;
00085 mFeature = feature;
00086 mContainer = container;
00087 mStartNode = -1;
00088 mNodeCount = -1;
00089 mDoParts = 1;
00090 mEmployReal32 = false;
00091 mWriteReal32 = false;
00092 mIncrement = 0;
00093 }
00094
00095 virtual
00096 ~KernelMatrixLocator()
00097 {
00098 }
00099
00100 bool
00101 GetIsIndex() const
00102 {
00103 return mIsIndex;
00104 }
00105
00106 String
00107 GetTopString() const
00108 {
00109 if (mIsIndex)
00110 return "KernelIndex";
00111 return "KernelData";
00112 }
00113
00114 String
00115 GetWalkType() const
00116 {
00117 return mWalkType;
00118 }
00119
00120 void
00121 SetWalkType(CString walkType)
00122 {
00123 mWalkType = walkType;
00124 }
00125
00126 String
00127 GetAnnoSet() const
00128 {
00129 return mAnnoSet;
00130 }
00131
00132 String
00133 GetFeatureIndexCat() const
00134 {
00135 return mFeatureIndexCat;
00136 }
00137
00138 void
00139 SetFeatureIndexCat(CString featureIndexCat)
00140 {
00141 mFeatureIndexCat = featureIndexCat;
00142 }
00143
00144 String
00145 GetModel() const
00146 {
00147 return mModel;
00148 }
00149
00150 String
00151 GetFeature() const
00152 {
00153 return mFeature;
00154 }
00155
00156 String
00157 GetContainer() const
00158 {
00159 return mContainer;
00160 }
00161
00162 void
00163 SetContainer(CString container)
00164 {
00165 mContainer = container;
00166 }
00167
00168 int
00169 GetStartNode() const
00170 {
00171 return mStartNode;
00172 }
00173
00174 void
00175 SetStartNode(int node)
00176 {
00177 mStartNode = node;
00178 }
00179
00180 int
00181 GetNodeCount() const
00182 {
00183 return mNodeCount;
00184 }
00185
00186 void
00187 SetNodeCount(int count)
00188 {
00189 mNodeCount = count;
00190 }
00191
00192 int
00193 GetDoParts() const
00194 {
00195 return mDoParts;
00196 }
00197
00198 void
00199 SetDoParts(int mode)
00200 {
00201 mDoParts = mode;
00202 }
00203
00204 bool
00205 GetEmployReal32() const
00206 {
00207 return mEmployReal32;
00208 }
00209
00210 void
00211 SetEmployReal32(bool flag)
00212 {
00213 mEmployReal32 = flag;
00214 }
00215
00216 bool
00217 GetWriteReal32() const
00218 {
00219 return mWriteReal32;
00220 }
00221
00222 void
00223 SetWriteReal32(bool flag)
00224 {
00225 mWriteReal32 = flag;
00226 }
00227
00228 int
00229 GetIncrement() const
00230 {
00231 return mIncrement;
00232 }
00233
00234 void
00235 SetIncrement(int val)
00236 {
00237 mIncrement = val;
00238 }
00239
00240 String
00241 ToString() const
00242 {
00243 return "KernelMatrixLocator(" + GetProtocol() + "," + GetHost()
00244 + "," + GetDataSet() + "," + GetTopString() + ","
00245 + GetWalkType() + "," + GetAnnoSet() + "," + GetModel() + ","
00246 + GetFeature() + "," + GetContainer() + ")";
00247 }
00248
00249 private:
00250
00251 bool mIsIndex;
00252 String mWalkType;
00253 String mAnnoSet;
00254 String mFeatureIndexCat;
00255 String mModel;
00256 String mFeature;
00257 String mContainer;
00258 int mStartNode;
00259 int mNodeCount;
00260 int mDoParts;
00261
00262
00263
00264 bool mEmployReal32;
00265 bool mWriteReal32;
00266 int mIncrement;
00267
00268 ILOG_VAR_DEC;
00269 };
00270
00271 ILOG_VAR_INIT(KernelMatrixLocator, Impala.Persistency);
00272
00273 std::ostream&
00274 operator<< (std::ostream& os, const KernelMatrixLocator& loc)
00275 {
00276 os << loc.ToString();
00277 return os;
00278 }
00279
00280 }
00281 }
00282
00283 #endif