This is Unofficial EPICS BASE Doxygen Site
ntndarrayAttribute.h
Go to the documentation of this file.
1 /* ntndarrayAttribute.h */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
6 #ifndef NTNDARRAYATTRIBUTE_H
7 #define NTNDARRAYATTRIBUTE_H
8 
9 #ifdef epicsExportSharedSymbols
10 # define ntndarrayAttributeEpicsExportSharedSymbols
11 # undef epicsExportSharedSymbols
12 #endif
13 
14 #ifdef ntndarrayAttributeEpicsExportSharedSymbols
15 # define epicsExportSharedSymbols
16 # undef ntndarrayAttributeEpicsExportSharedSymbols
17 #endif
18 
19 #include <pv/ntfield.h>
20 
21 #include <shareLib.h>
22 
23 namespace epics { namespace nt {
24 
25 struct Result;
27 typedef std::tr1::shared_ptr<NTNDArrayAttribute> NTNDArrayAttributePtr;
28 
29 namespace detail {
30 
39  public std::tr1::enable_shared_from_this<NTNDArrayAttributeBuilder>
40  {
41  public:
43 
48  shared_pointer addTags();
49 
54  shared_pointer addDescriptor();
55 
60  shared_pointer addAlarm();
61 
66  shared_pointer addTimeStamp();
67 
73  epics::pvData::StructureConstPtr createStructure();
74 
80  epics::pvData::PVStructurePtr createPVStructure();
81 
87  NTNDArrayAttributePtr create();
88 
95  shared_pointer add(std::string const & name, epics::pvData::FieldConstPtr const & field);
96 
97  protected://private:
99 
100  void reset();
101 
102  bool tags;
104  bool alarm;
105  bool timeStamp;
106 
107  // NOTE: this preserves order, however it does not handle duplicates
110 
111  friend class ::epics::nt::NTNDArrayAttribute;
112  };
113 
114 }
115 
116 typedef std::tr1::shared_ptr<detail::NTNDArrayAttributeBuilder> NTNDArrayAttributeBuilderPtr;
117 
118 
119 
126 {
127 public:
129 
130  static const std::string URI;
131 
144  static shared_pointer wrap(epics::pvData::PVStructurePtr const & pvStructure);
145 
156  static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr const & pvStructure);
157 
169  static bool is_a(epics::pvData::StructureConstPtr const & structure);
170 
182  static bool is_a(epics::pvData::PVStructurePtr const & pvStructure);
183 
195  static bool isCompatible(
197 
209  static bool isCompatible(
210  epics::pvData::PVStructurePtr const &pvStructure);
211 
221  bool isValid();
222 
227  static NTNDArrayAttributeBuilderPtr createBuilder();
228 
233 
240  bool attachTimeStamp(epics::pvData::PVTimeStamp &pvTimeStamp) const;
241 
248  bool attachAlarm(epics::pvData::PVAlarm &pvAlarm) const;
249 
254  epics::pvData::PVStructurePtr getPVStructure() const;
255 
260  epics::pvData::PVStringPtr getDescriptor() const;
261 
266  epics::pvData::PVStructurePtr getTimeStamp() const;
267 
272  epics::pvData::PVStructurePtr getAlarm() const;
273 
278  epics::pvData::PVStringPtr getName() const;
279 
284  epics::pvData::PVUnionPtr getValue() const;
285 
290  epics::pvData::PVStringArrayPtr getTags() const;
291 
296  epics::pvData::PVIntPtr getSourceType() const;
297 
302  epics::pvData::PVStringPtr getSource() const;
303 
304 private:
306  static Result& isAttribute(Result& result);
307 
308  epics::pvData::PVStructurePtr pvNTNDArrayAttribute;
310 
312  friend class NTNDArray;
313 };
314 
315 }}
316 #endif /* NTNDARRAYATTRIBUTE_H */
std::tr1::shared_ptr< PVInt > PVIntPtr
Definition: pvData.h:507
pvac::PutEvent result
Definition: clientSync.cpp:117
Validation methods for NT types.
Definition: validator.h:23
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
std::tr1::shared_ptr< const Structure > StructureConstPtr
Definition: pvIntrospect.h:162
std::tr1::shared_ptr< detail::NTNDArrayAttributeBuilder > NTNDArrayAttributeBuilderPtr
Mark external symbols and entry points for shared libraries.
static const std::string URI
std::tr1::shared_ptr< PVStringArray > PVStringArrayPtr
Definition: pvData.h:1464
Interface for in-line creating of NTAttribute extended as required by NTNDArray.
std::tr1::shared_ptr< PVUnion > PVUnionPtr
Definition: pvData.h:107
#define POINTER_DEFINITIONS(clazz)
Definition: sharedPtr.h:198
Methods for accessing a timeStamp structure.
Definition: pvTimeStamp.h:38
#define epicsShareClass
Definition: shareLib.h:206
Methods for accessing an alarm structure.
Definition: pvAlarm.h:37
std::vector< FieldConstPtr > FieldConstPtrArray
Definition: pvIntrospect.h:146
std::tr1::shared_ptr< const Field > FieldConstPtr
Definition: pvIntrospect.h:137
std::tr1::shared_ptr< NTNDArrayAttribute > NTNDArrayAttributePtr
Convenience Class for NTNDArrayAttribute.
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Definition: pvData.h:87
std::tr1::shared_ptr< PVString > PVStringPtr
Definition: pvData.h:540
Convenience Class for NTNDArray.
Definition: ntndarray.h:128
std::vector< std::string > StringArray
Definition: pvType.h:110
epics::pvData::FieldConstPtrArray extraFields