OpenMAMA C++ API
MamaSourceGroupManager.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 MamaSourceGroupManager_CPP_H__
23 #define MamaSourceGroupManager_CPP_H__
24 
25 #include <mama/types.h>
26 #include <mama/config.h>
27 
28 namespace Wombat
29 {
30 
31  class MamaSourceGroup;
32 
37  class MAMACPPExpDLL MamaSourceGroupManager
38  {
39  public:
42 
43  MamaSourceGroup* create (const char* groupName);
44  MamaSourceGroup* findOrCreate (const char* groupName);
45  MamaSourceGroup* find (const char* groupName);
46  const MamaSourceGroup* find (const char* groupName) const;
47  mama_size_t size () const;
48 
49  class MAMACPPExpDLL iterator
50  {
51  private:
52  friend class MamaSourceGroupManager;
53  struct iteratorImpl;
54  iteratorImpl& mImpl;
55  iterator (const iteratorImpl& copy);
56  public:
57  iterator ();
58  iterator (const iterator& copy);
59  ~iterator ();
60 
61  iterator& operator= (const iterator& rhs);
62  const iterator& operator= (const iterator& rhs) const;
63  iterator& operator++ ();
64  const iterator& operator++ () const;
65  bool operator== (const iterator& rhs) const;
66  bool operator!= (const iterator& rhs) const;
67  MamaSourceGroup* operator* ();
68  const MamaSourceGroup* operator* () const;
69  };
70 
71  typedef const iterator const_iterator;
72 
73  iterator begin ();
74  const_iterator begin () const;
75  iterator end ();
76  const_iterator end () const;
77 
78  private:
79  struct MamaSourceGroupManagerImpl;
80  MamaSourceGroupManagerImpl& myImpl;
81 
82  // No copy constructor nor assignment operator.
84  MamaSourceGroupManager& operator= (const MamaSourceGroupManager& rhs);
85  };
86 
87 } // namespace Wombat
88 
89 
90 #endif // MamaSourceGroupManager_CPP_H__
A MAMA source group manager monitors a set of MAMA source groups.
Definition: MamaSourceGroupManager.h:37
A MAMA source group monitors a set of MAMA sources that presumably provide a duplicate set of data...
Definition: MamaSourceGroup.h:42
Definition: MamaConnection.h:29
Definition: MamaSourceGroupManager.h:49
const iterator const_iterator
Definition: MamaSourceGroupManager.h:71