OpenMAMA C++ API
MamaMsgQual.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MAMA_MSG_QUAL_CPP_H__
23 #define MAMA_MSG_QUAL_CPP_H__
24 
25 #include <mama/msgqualifier.h>
26 
27 
28 namespace Wombat
29 {
30 
38  class MAMACPPExpDLL MamaMsgQual
39  {
40  public:
41  MamaMsgQual ();
42  MamaMsgQual (mama_u16_t value);
43  MamaMsgQual (const MamaMsgQual& copy);
44 
45  ~MamaMsgQual ();
46 
47  MamaMsgQual& operator= (const MamaMsgQual& rhs);
48  bool operator== (const MamaMsgQual& rhs) const;
49  bool operator== (mama_u16_t rhs) const;
50  bool operator!= (const MamaMsgQual& rhs) const
51  {
52  return ! operator== (rhs);
53  }
54  bool operator!= (mama_u16_t rhs) const
55  {
56  return ! operator== (rhs);
57  }
58 
59  void clear ();
60 
61  void setValue (mama_u16_t value);
62  void setIsDefinatelyDuplicate (bool tf);
63  void setIsPossiblyDuplicate (bool tf);
64  void setIsDefinatelyDelayed (bool tf);
65  void setIsPossiblyDelayed (bool tf);
66  void setIsOutOfSequence (bool tf);
67 
68  mama_u16_t getValue () const;
69  bool getIsDefinatelyDuplicate () const;
70  bool getIsPossiblyDuplicate () const;
71  bool getIsDefinatelyDelayed () const;
72  bool getIsPossiblyDelayed () const;
73  bool getIsOutOfSequence () const;
74 
75  void getAsString (char* result,
76  mama_size_t maxLen) const;
83  const char* getAsString () const;
84 
89  static void getAsString (const mama_u16_t& value,
90  char* result,
91  mama_size_t maxLen);
92  private:
93  mamaMsgQual myMsgQual;
94  mutable char* myStrRep;
95  };
96 
97 } // namespace Wombat
98 
99 #endif // MAMA_MSG_QUAL_CPP_H__
Definition: MamaConnection.h:29
The MamaMsgQual class is a wrapper/utility class which provides useful interrogation, comparison and manipulation facilities for the Mama Message Qualifier data field (wMsgQual) which is a "bit-map" used to convey duplicate, delayed and out-of-sequence information about messages.
Definition: MamaMsgQual.h:38