// @(#)root/tree:$Id$
// Author: Rene Brun   14/04/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TCut
#define ROOT_TCut

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TCut                                                                 //
//                                                                      //
// A specialized string object used in TTree selections.                //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TCut : public TNamed {
private:
   // Prevent meaningless operator (which otherwise can be reached via
   // the conversion to 'const char*'
   Bool_t operator<(const TCut &rhs); // Intentional left unimplemented
   Bool_t operator<=(const TCut &rhs); // Intentional left unimplemented
   Bool_t operator>(const TCut &rhs); // Intentional left unimplemented
   Bool_t operator>=(const TCut &rhs); // Intentional left unimplemented
public:
   TCut();
   TCut(const char *title);
   TCut(const char *name, const char *title);
   TCut(const TCut &cut);
   virtual ~TCut();

   // Assignment
   TCut&    operator=(const char *rhs);
   TCut&    operator=(const TCut &rhs);
   TCut&    operator+=(const char *rhs);
   TCut&    operator+=(const TCut &rhs);
   TCut&    operator*=(const char *rhs);
   TCut&    operator*=(const TCut &rhs);

   // Comparison
   Bool_t   operator==(const char *rhs) const;
   Bool_t   operator==(const TCut &rhs) const;
   Bool_t   operator!=(const char *rhs) const;
   Bool_t   operator!=(const TCut &rhs) const;

   friend TCut operator+(const TCut &lhs, const char *rhs);
   friend TCut operator+(const char *lhs, const TCut &rhs);
   friend TCut operator+(const TCut &lhs, const TCut &rhs);
   friend TCut operator*(const TCut &lhs, const char *rhs);
   friend TCut operator*(const char *lhs, const TCut &rhs);
   friend TCut operator*(const TCut &lhs, const TCut &rhs);
// Preventing warnings with -Weffc++ in GCC since the overloading of the && and || operators was a design choice.
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
   friend TCut operator&&(const TCut &lhs, const char *rhs);
   friend TCut operator&&(const char *lhs, const TCut &rhs);
   friend TCut operator&&(const TCut &lhs, const TCut &rhs);
   friend TCut operator||(const TCut &lhs, const char *rhs);
   friend TCut operator||(const char *lhs, const TCut &rhs);
   friend TCut operator||(const TCut &lhs, const TCut &rhs);
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
#pragma GCC diagnostic pop
#endif
   friend TCut operator!(const TCut &rhs);

   // Type conversion
   operator const char*() const { return GetTitle(); }

   ClassDef(TCut,1)  //A specialized string object used for TTree selections
};

// Declarations.
TCut operator+(const TCut &lhs, const char *rhs);
TCut operator+(const char *lhs, const TCut &rhs);
TCut operator+(const TCut &lhs, const TCut &rhs);
TCut operator*(const TCut &lhs, const char *rhs);
TCut operator*(const char *lhs, const TCut &rhs);
TCut operator*(const TCut &lhs, const TCut &rhs);
// Preventing warnings with -Weffc++ in GCC since the overloading of the && and || operators was a design choice.
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
TCut operator&&(const TCut &lhs, const char *rhs);
TCut operator&&(const char *lhs, const TCut &rhs);
TCut operator&&(const TCut &lhs, const TCut &rhs);
TCut operator||(const TCut &lhs, const char *rhs);
TCut operator||(const char *lhs, const TCut &rhs);
TCut operator||(const TCut &lhs, const TCut &rhs);
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
#pragma GCC diagnostic pop
#endif
TCut operator!(const TCut &rhs);

#endif
 TCut.h:1
 TCut.h:2
 TCut.h:3
 TCut.h:4
 TCut.h:5
 TCut.h:6
 TCut.h:7
 TCut.h:8
 TCut.h:9
 TCut.h:10
 TCut.h:11
 TCut.h:12
 TCut.h:13
 TCut.h:14
 TCut.h:15
 TCut.h:16
 TCut.h:17
 TCut.h:18
 TCut.h:19
 TCut.h:20
 TCut.h:21
 TCut.h:22
 TCut.h:23
 TCut.h:24
 TCut.h:25
 TCut.h:26
 TCut.h:27
 TCut.h:28
 TCut.h:29
 TCut.h:30
 TCut.h:31
 TCut.h:32
 TCut.h:33
 TCut.h:34
 TCut.h:35
 TCut.h:36
 TCut.h:37
 TCut.h:38
 TCut.h:39
 TCut.h:40
 TCut.h:41
 TCut.h:42
 TCut.h:43
 TCut.h:44
 TCut.h:45
 TCut.h:46
 TCut.h:47
 TCut.h:48
 TCut.h:49
 TCut.h:50
 TCut.h:51
 TCut.h:52
 TCut.h:53
 TCut.h:54
 TCut.h:55
 TCut.h:56
 TCut.h:57
 TCut.h:58
 TCut.h:59
 TCut.h:60
 TCut.h:61
 TCut.h:62
 TCut.h:63
 TCut.h:64
 TCut.h:65
 TCut.h:66
 TCut.h:67
 TCut.h:68
 TCut.h:69
 TCut.h:70
 TCut.h:71
 TCut.h:72
 TCut.h:73
 TCut.h:74
 TCut.h:75
 TCut.h:76
 TCut.h:77
 TCut.h:78
 TCut.h:79
 TCut.h:80
 TCut.h:81
 TCut.h:82
 TCut.h:83
 TCut.h:84
 TCut.h:85
 TCut.h:86
 TCut.h:87
 TCut.h:88
 TCut.h:89
 TCut.h:90
 TCut.h:91
 TCut.h:92
 TCut.h:93
 TCut.h:94
 TCut.h:95
 TCut.h:96
 TCut.h:97
 TCut.h:98
 TCut.h:99
 TCut.h:100
 TCut.h:101
 TCut.h:102
 TCut.h:103
 TCut.h:104
 TCut.h:105
 TCut.h:106
 TCut.h:107