| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# SelectStatement.h

Go to the documentation of this file.

    00001 //==============================================================================
    00002 // $Id: SelectStatement.h,v 1.3 2004/07/06 10:17:40 mato Exp $
    00003 //------------------------------------------------------------------------------
    00004 //
    00005 // Package : Kernel
    00006 //
    00007 // Author  : M.Frank 10/10/00
    00008 //
    00009 //==============================================================================
    00010 #ifndef KERNEL_SELECTSTATEMENT_H
    00011 #define KERNEL_SELECTSTATEMENT_H
    00012
    00013 // STL include files
    00014 #include <string>
    00015
    00016 // Framework include files
    00017 #include "GaudiKernel/ISelectStatement.h"
    00018
    00046 class GAUDI_API SelectStatement: public implements1<ISelectStatement> {
    00047 public:
    00049   explicit SelectStatement(const std::string& s, long typ)
    00050   : m_select(s), m_isActive(false), m_type(typ)
    00051   {
    00052   }
    00054   explicit SelectStatement(const std::string& s)
    00055   : m_select(s),m_isActive(false), m_type(STRING)
    00056   {
    00057   }
    00059   explicit SelectStatement()
    00060   : m_isActive(false), m_type(FUNCTION)
    00061   {
    00062   }
    00064   virtual ~SelectStatement()  {
    00065   }
    00067   long type()   const   {
    00068     return m_type;
    00069   }
    00071   const std::string& criteria()  const    {
    00072     return m_select;
    00073   }
    00075   void setCriteria(const std::string& crit)    {
    00076     m_select = crit;
    00077     (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING;
    00078   }
    00080   void setActive(bool flag = true)   {
    00081     m_isActive = flag;
    00082   }
    00084   bool isActive()   const   {
    00085     return m_isActive;
    00086   }
    00088   virtual bool operator()(void* /* val */ )   {
    00089     return true;
    00090   }
    00091 protected:
    00093   std::string   m_select;
    00095   bool m_isActive;
    00097   long m_type;
    00098 };
    00099 #endif  // KERNEL_SELECTSTATEMENT_H