SmartFoxServer 2X C++ API
BoolMatch.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of BoolMatch
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __BoolMatch__
12 #define __BoolMatch__
13 
14 #include "IMatcher.h"
15 #include "../../Util/Common.h"
16 
17 #if defined(_MSC_VER)
18 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
19 #endif
20 #include <string> // STL library: string object
21 using namespace std; // STL library: declare the STL namespace
22 
23 namespace Sfs2X {
24 namespace Entities {
25 namespace Match {
26 
31  class DLLImportExport BoolMatch : public IMatcher
32  {
33  public:
34 
35  // -------------------------------------------------------------------
36  // Public methods
37  // -------------------------------------------------------------------
38  BoolMatch(boost::shared_ptr<string> symbol);
39  BoolMatch(string symbol);
40  virtual ~BoolMatch();
41 
42  boost::shared_ptr<string> Symbol();
43  long int Type();
44 
45  // -------------------------------------------------------------------
46  // Public members
47  // -------------------------------------------------------------------
48  static const long int TYPE_ID;
49 
53  static boost::shared_ptr<BoolMatch> EQUALS;
54 
58  static boost::shared_ptr<BoolMatch> NOT_EQUALS;
59 
60  protected:
61 
62  // -------------------------------------------------------------------
63  // Protected methods
64  // -------------------------------------------------------------------
65 
66  // -------------------------------------------------------------------
67  // Protected members
68  // -------------------------------------------------------------------
69 
70  private:
71 
72  // -------------------------------------------------------------------
73  // Private methods
74  // -------------------------------------------------------------------
75 
76  // -------------------------------------------------------------------
77  // Private members
78  // -------------------------------------------------------------------
79  boost::shared_ptr<string> symbol;
80  };
81 
82 } // namespace Match
83 } // namespace Entities
84 } // namespace Sfs2X
85 
86 #endif
Definition: IMatcher.h:31
STL namespace.
This matcher is used in MatchExpressions to check boolean conditions
Definition: BoolMatch.h:31
Definition: SmartFox.cpp:24
static boost::shared_ptr< BoolMatch > NOT_EQUALS
Checks that Bool1 != Bool2
Definition: BoolMatch.h:58
static boost::shared_ptr< BoolMatch > EQUALS
Checks that Bool1 == Bool2
Definition: BoolMatch.h:53