OpenMAMA
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  protected:
52  friend class MamaSourceGroupManager;
53  struct iteratorImpl;
54  iteratorImpl& mImpl;
55 
56  public:
57  iterator ();
58  iterator (const iterator& copy);
59  iterator (const iteratorImpl& copy);
60  ~iterator ();
61 
62  iterator& operator= (const iterator& rhs);
63  const iterator& operator= (const iterator& rhs) const;
64  iterator& operator++ ();
65  const iterator& operator++ () const;
66  bool operator== (const iterator& rhs) const;
67  bool operator!= (const iterator& rhs) const;
68  MamaSourceGroup* operator* ();
69  const MamaSourceGroup* operator* () const;
70  };
71 
72  typedef const iterator const_iterator;
73 
74  iterator begin ();
75  const_iterator begin () const;
76  iterator end ();
77  const_iterator end () const;
78 
79  private:
80  struct MamaSourceGroupManagerImpl;
81  MamaSourceGroupManagerImpl& myImpl;
82 
83  // No copy constructor nor assignment operator.
85  MamaSourceGroupManager& operator= (const MamaSourceGroupManager& rhs);
86  };
87 
88 } // namespace Wombat
89 
90 
91 #endif // MamaSourceGroupManager_CPP_H__
Wombat::MamaSourceGroup
A MAMA source group monitors a set of MAMA sources that presumably provide a duplicate set of data.
Definition: MamaSourceGroup.h:42
Wombat::MamaSourceGroupManager::iterator
Definition: MamaSourceGroupManager.h:49
Wombat::MamaSourceGroupManager::const_iterator
const typedef iterator const_iterator
Definition: MamaSourceGroupManager.h:72
Wombat::MamaSourceGroupManager::iterator::mImpl
iteratorImpl & mImpl
Definition: MamaSourceGroupManager.h:53
Wombat::MamaSourceGroupManager
A MAMA source group manager monitors a set of MAMA source groups.
Definition: MamaSourceGroupManager.h:37
Wombat
Definition: MamaBasicSubscription.h:27


© 2012 Linux Foundation