OpenMAMA C++ API
MamaDictionary.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_DICTIONARY_CPP_H__
23 #define MAMA_DICTIONARY_CPP_H__
24 
25 #include <mama/mamacpp.h>
27 
28 namespace Wombat
29 {
30 class DictionaryImpl;
31 
41 class MAMACPPExpDLL MamaDictionary
42 {
43 public:
44  virtual ~MamaDictionary ();
45 
46  MamaDictionary (void);
47 
71  virtual void create (
72  MamaQueue* queue,
73  MamaDictionaryCallback* callback,
74  MamaSource* source,
75  int retries = MAMA_DEFAULT_RETRIES,
76  double timeout = MAMA_DEFAULT_TIMEOUT,
77  void* closure = NULL);
78 
85  virtual const char* getFeedName();
86 
93  virtual const char* getFeedHost();
94 
103  virtual MamaFieldDescriptor* getFieldByFid (mama_fid_t fid);
104 
113  virtual const MamaFieldDescriptor* getFieldByFid (mama_fid_t fid) const;
114 
122  virtual MamaFieldDescriptor* getFieldByIndex (size_t index);
123 
131  virtual const MamaFieldDescriptor* getFieldByIndex (size_t index) const;
132 
142  virtual MamaFieldDescriptor* getFieldByName (const char* name);
143 
153  virtual const MamaFieldDescriptor* getFieldByName (const char* name) const;
154 
159  virtual mama_fid_t getMaxFid (void) const;
160 
166  virtual size_t getSize (void) const;
167 
173  virtual bool hasDuplicates (void) const;
174 
181  virtual MamaDictionaryCallback* getCallback (void) const;
182 
189  virtual void setCallback (MamaDictionaryCallback* callback);
190 
194  virtual mamaDictionary getDictC ();
195 
199  virtual const mamaDictionary getDictC () const;
200 
206  virtual void* getClosure (void) const;
207 
217  virtual MamaMsg* getDictionaryMessage() const;
218 
226  virtual void buildDictionaryFromMessage(MamaMsg& msg);
227 
237  virtual MamaFieldDescriptor* createFieldDescriptor (
238  mama_fid_t fid,
239  const char* name,
240  mamaFieldType type);
241 
256  virtual void setMaxFid (
257  mama_size_t maxFid);
258 
259 
269  virtual void writeToFile (const char* fileName);
270 
280  virtual void populateFromFile (const char* fileName);
281 
282  DictionaryImpl* mPimpl;
283 };
284 
285 } // namespace Wombat
286 #endif // MAMA_DICTIONARY_CPP_H__
The MamaDictionary class maps field identifiers (FIDs) to human readable strings. ...
Definition: MamaDictionary.h:41
A MAMA source maintains information about a data source, including the quality of the data coming fro...
Definition: MamaSource.h:55
MAMA message representation.
Definition: MamaMsg.h:112
Definition: MamaConnection.h:29
The WombatDictionaryCallback receives notification regarding the population of the data dictionary...
Definition: MamaDictionaryCallback.h:39
Queue allows applications to dispatch events in order with multiple threads using a single MamaDispat...
Definition: MamaQueue.h:40
DictionaryImpl * mPimpl
Definition: MamaDictionary.h:282
The MamaFieldDescriptor class describes a field within a MamaDictionary
Definition: MamaFieldDescriptor.h:39