/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 // $Id: DbiSqlContext.h,v 1.4 2005/08/26 19:19:39 rhatcher Exp $ 00002 00003 #ifndef DBISQLCONTEXT 00004 #define DBISQLCONTEXT 00005 00007 // DbiSqlContext // 00008 // // 00009 // Package: Dbi (Database Interface). // 00010 // // 00011 // N. West 05/2003 // 00012 // // 00013 // Concept: SQL corresponding to an Extended Context Query. // 00014 // // 00015 // Purpose: To hide the SQL needed to query the VLD tables. // 00016 // // 00018 00019 #include "string" 00020 00021 #include "DatabaseInterface/DbiString.h" 00022 #include "Context/Context.h" 00023 00024 00025 class DbiSqlContext : public DbiString 00026 { 00027 00028 public: 00029 00030 00031 // Types and enum 00032 00033 enum IntervalType { kBefore, kAfter, kMisses, 00034 kThroughout, kWithin, kOverlaps, 00035 kStarts, kEnds, 00036 kUndefined }; 00037 00038 // Constructors and destructors. 00039 DbiSqlContext(const std::string& ctxt = ""); 00040 DbiSqlContext(IntervalType interval, 00041 TimeStamp start, 00042 TimeStamp end, 00043 Site::Site_t det, 00044 SimFlag::SimFlag_t sim); 00045 00046 virtual ~DbiSqlContext(); 00047 00048 // State testing member functions 00049 00050 IntervalType GetIntervalType() const { return fIntervalType ; } 00051 TimeStamp GetTimeStart() const { return fTimeStart; } 00052 TimeStamp GetTimeEnd() const { return fTimeEnd; } 00053 Site::Site_t GetSite() const { return fDetType; } 00054 SimFlag::SimFlag_t GetSimFlag() const { return fSimType; } 00055 00056 00057 // State changing member functions 00058 00059 private: 00060 00061 // Data members 00062 00063 IntervalType fIntervalType; 00064 TimeStamp fTimeStart; 00065 TimeStamp fTimeEnd; 00066 Site::Site_t fDetType; 00067 SimFlag::SimFlag_t fSimType; 00068 00069 00070 // Removed: ClassDef(DbiSqlContext,0) // SQL for Extended Context Query 00071 00072 }; 00073 00074 00075 #endif // DBISQLCONTEXT 00076