OpenMAMA C++ API
MamaFieldCacheField.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_FIELD_CPP_H__
23 #define MAMA_FIELD_CACHE_FIELD_CPP_H__
24 
25 #include <mama/mamacpp.h>
26 #include <mama/fieldcache/fieldcachetypes.h>
27 #include <mama/fieldcache/fieldcachefield.h>
28 #include <cstring>
29 
30 namespace Wombat
31 {
32 
33  class MamaFieldDescriptor;
34 
41 class MAMACPPExpDLL MamaFieldCacheField
42 {
43 public:
54  virtual ~MamaFieldCacheField();
55 
62 
69  MamaFieldCacheField& operator=(const MamaFieldCacheField& rhs);
70 
77  bool operator==(const MamaFieldCacheField& rhs) const;
84  bool operator!=(const MamaFieldCacheField& rhs) const;
85 
91  virtual void create(const MamaFieldDescriptor& descriptor);
99  virtual void create(mama_fid_t fid, mamaFieldType type, const char* name = NULL);
100 
105  virtual void clear();
106 
113  virtual mama_fid_t getFid() const;
114 
121  virtual mamaFieldType getType() const;
122 
128  const char* getName() const;
129 
135  void setDescriptor(const MamaFieldDescriptor* descriptor);
136 
143  const MamaFieldDescriptor* getDescriptor() const;
144 
150  virtual bool isModified() const;
151 
158  virtual void setPublish(bool value = true);
159 
165  virtual bool getPublish() const;
166 
173  virtual void setCheckModified(bool value = true);
174 
180  virtual bool getCheckModified() const;
181 
187  virtual bool isVector() const;
188 
189  mamaFieldCacheField& getCValue();
190  const mamaFieldCacheField& getCValue() const;
191 
192 private:
193  struct MamaFieldCacheFieldImpl;
194  MamaFieldCacheFieldImpl* mPimpl;
195 };
196 
197 
201 class MAMACPPExpDLL MamaFieldCacheFieldBase
202 {
203 protected:
205 
206 public:
208 
209 private: // Cannot copy MamaFieldCacheField objects
211  MamaFieldCacheFieldBase& operator=(const MamaFieldCacheFieldBase& field);
212 };
213 
214 } // namespace Wombat
215 
216 #endif // MAMA_FIELD_CACHE_FIELD_CPP_H__
MamaFieldCacheFieldBase()
Definition: MamaFieldCacheField.h:204
virtual ~MamaFieldCacheFieldBase()
Definition: MamaFieldCacheField.h:207
Definition: MamaConnection.h:29
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
Base type for fields.
Definition: MamaFieldCacheField.h:201