// $Id: IDbiSqlContext.hxx,v 1.1 2011/01/18 05:49:20 finch Exp $ #ifndef DBISQLCONTEXT #define DBISQLCONTEXT //////////////////////////////////////////////////////////////////////// /// /// \class COMET::IDbiSqlContext /// \brief Concept: SQL corresponding to an Extended Context Query. /// /// Purpose: To hide the SQL needed to query the VLD tables. /// //////////////////////////////////////////////////////////////////////// #include "string" #include "IDbiString.hxx" #include "IVldContext.hxx" namespace COMET { class IDbiSqlContext : public IDbiString { public: // Types and enum enum IntervalType { kBefore, kAfter, kMisses, kThroughout, kWithin, kOverlaps, kStarts, kEnds, kUndefined }; // Constructors and destructors. IDbiSqlContext(const std::string& ctxt = ""); IDbiSqlContext(IntervalType interval, COMET::IVldTimeStamp start, COMET::IVldTimeStamp end, COMET::DbiDetector::Detector_t det, COMET::DbiSimFlag::SimFlag_t sim); virtual ~IDbiSqlContext(); // State testing member functions COMET::IVldTimeStamp GetTimeStart() const { return fTimeStart; } COMET::IVldTimeStamp GetTimeEnd() const { return fTimeEnd; } COMET::DbiDetector::Detector_t GetDetector() const { return fDetType; } COMET::DbiSimFlag::SimFlag_t GetSimFlag() const { return fSimType; } // State changing member functions private: // Data members IntervalType fIntervalType; COMET::IVldTimeStamp fTimeStart; COMET::IVldTimeStamp fTimeEnd; COMET::DbiDetector::Detector_t fDetType; COMET::DbiSimFlag::SimFlag_t fSimType; ClassDef(IDbiSqlContext,0) // SQL for Extended Context Query }; }; #endif // DBISQLCONTEXT