OpenMAMA C++ API
MamaFieldCacheRecord.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_FIELD_CACHE_RECORD_CPP_H__
23 #define MAMA_FIELD_CACHE_RECORD_CPP_H__
24 
25 #include <mama/mamacpp.h>
26 #include <mama/fieldcache/fieldcachetypes.h>
27 #include <string>
28 
29 namespace Wombat
30 {
31 
32  class MamaFieldCacheField;
33 
38 class MAMACPPExpDLL MamaFieldCacheRecord
39 {
40 public:
51  virtual ~MamaFieldCacheRecord();
52 
56  virtual void create();
57 
63  virtual void clear();
64 
74  virtual MamaFieldCacheField& add(mama_fid_t fid,
75  mamaFieldType type,
76  const char* name = NULL);
77 
85  virtual MamaFieldCacheField& add(const MamaFieldDescriptor& descriptor);
86 
87 
88  virtual const MamaFieldCacheField& operator[](mama_size_t index) const;
89  virtual MamaFieldCacheField& operator[](mama_size_t index);
90 
98  virtual const MamaFieldCacheField& find(mama_fid_t fid,
99  const char* name = NULL) const;
100 
108  virtual MamaFieldCacheField& find(mama_fid_t fid, const char* name = NULL);
114  virtual mama_size_t getSize() const;
115 
116  virtual mamaFieldCacheRecord getCValue();
117  virtual const mamaFieldCacheRecord getCValue() const;
118 
119 private:
121  MamaFieldCacheRecord& operator=(const MamaFieldCacheRecord&);
122 
123 private:
124  struct MamaFieldCacheRecordImpl;
125  MamaFieldCacheRecordImpl* mPimpl;
126 };
127 
128 } // namespace Wombat
129 
130 #endif
Definition: MamaConnection.h:29
The MamaFieldCacheRecord class is a collection of unordered MamaFieldCacheField elements.
Definition: MamaFieldCacheRecord.h:38
The MamaFieldDescriptor class describes a field within a MamaDictionary
Definition: MamaFieldDescriptor.h:39
The MamaFieldCacheField class is used to store the information on the type of a field and its value(s...
Definition: MamaFieldCacheField.h:41