All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SelectStatement.h
Go to the documentation of this file.
1 //==============================================================================
2 // $Id: SelectStatement.h,v 1.3 2004/07/06 10:17:40 mato Exp $
3 //------------------------------------------------------------------------------
4 //
5 // Package : Kernel
6 //
7 // Author : M.Frank 10/10/00
8 //
9 //==============================================================================
10 #ifndef KERNEL_SELECTSTATEMENT_H
11 #define KERNEL_SELECTSTATEMENT_H
12 
13 // STL include files
14 #include <string>
15 
16 // Framework include files
18 
46 class GAUDI_API SelectStatement: public implements1<ISelectStatement> {
47 public:
49  explicit SelectStatement(const std::string& s, long typ)
50  : m_select(s), m_isActive(false), m_type(typ)
51  {
52  }
54  explicit SelectStatement(const std::string& s)
55  : m_select(s),m_isActive(false), m_type(STRING)
56  {
57  }
59  explicit SelectStatement()
60  : m_isActive(false), m_type(FUNCTION)
61  {
62  }
64  virtual ~SelectStatement() {
65  }
67  long type() const {
68  return m_type;
69  }
71  const std::string& criteria() const {
72  return m_select;
73  }
75  void setCriteria(const std::string& crit) {
76  m_select = crit;
77  (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING;
78  }
80  void setActive(bool flag = true) {
81  m_isActive = flag;
82  }
84  bool isActive() const {
85  return m_isActive;
86  }
88  virtual bool operator()(void* /* val */ ) {
89  return true;
90  }
91 protected:
93  std::string m_select;
95  bool m_isActive;
97  long m_type;
98 };
99 #endif // KERNEL_SELECTSTATEMENT_H
SelectStatement()
Standard Constructor initializing function call.
virtual ~SelectStatement()
Standard Destructor.
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
long type() const
Access the type of the object.
Base class used to implement the interfaces.
Definition: implements.h:133
bool isActive() const
Check if selection is active.
virtual bool operator()(void *)
Stupid default implementation.
bool m_isActive
Activation flag.
void setCriteria(const std::string &crit)
Set the type.
void setActive(bool flag=true)
Change activity flag.
string s
Definition: gaudirun.py:210
const std::string & criteria() const
Access the selection string.
long m_type
Type identifier.
Class of a selection statement.
std::string m_select
Select string.
#define GAUDI_API
Definition: Kernel.h:108
SelectStatement(const std::string &s)
Standard Constructor initializing select string.