This is Unofficial EPICS BASE Doxygen Site
ntmatrix.h
Go to the documentation of this file.
1 /* ntmatrix.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 NTMATRIX_H
7 #define NTMATRIX_H
8 
9 #ifdef epicsExportSharedSymbols
10 # define ntmatrixEpicsExportSharedSymbols
11 # undef epicsExportSharedSymbols
12 #endif
13 
14 #include <pv/pvDisplay.h>
15 
16 #ifdef ntmatrixEpicsExportSharedSymbols
17 # define epicsExportSharedSymbols
18 # undef ntmatrixEpicsExportSharedSymbols
19 #endif
20 
21 #include <pv/ntfield.h>
22 
23 #include <shareLib.h>
24 
25 
26 namespace epics { namespace nt {
27 
28 class NTMatrix;
29 typedef std::tr1::shared_ptr<NTMatrix> NTMatrixPtr;
30 
31 namespace detail {
32 
41  public std::tr1::enable_shared_from_this<NTMatrixBuilder>
42  {
43  public:
45 
50  shared_pointer addDim();
51 
56  shared_pointer addDescriptor();
57 
62  shared_pointer addAlarm();
63 
68  shared_pointer addTimeStamp();
69 
74  shared_pointer addDisplay();
75 
81  epics::pvData::StructureConstPtr createStructure();
82 
88  epics::pvData::PVStructurePtr createPVStructure();
89 
95  NTMatrixPtr create();
96 
103  shared_pointer add(std::string const & name, epics::pvData::FieldConstPtr const & field);
104 
105  private:
106  NTMatrixBuilder();
107 
108  void reset();
109 
110  bool dim;
111  bool descriptor;
112  bool alarm;
113  bool timeStamp;
114  bool display;
115 
116  // NOTE: this preserves order, however it does not handle duplicates
117  epics::pvData::StringArray extraFieldNames;
119 
120  friend class ::epics::nt::NTMatrix;
121  };
122 
123 }
124 
125 typedef std::tr1::shared_ptr<detail::NTMatrixBuilder> NTMatrixBuilderPtr;
126 
127 
128 
135 {
136 public:
138 
139  static const std::string URI;
140 
152  static shared_pointer wrap(epics::pvData::PVStructurePtr const & pvStructure);
153 
163  static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr const & pvStructure);
164 
176  static bool is_a(epics::pvData::StructureConstPtr const & structure);
177 
189  static bool is_a(epics::pvData::PVStructurePtr const & pvStructure);
190 
200  static bool isCompatible(
202 
212  static bool isCompatible(
213  epics::pvData::PVStructurePtr const &pvStructure);
214 
224  bool isValid();
225 
230  static NTMatrixBuilderPtr createBuilder();
231 
236 
243  bool attachTimeStamp(epics::pvData::PVTimeStamp &pvTimeStamp) const;
244 
251  bool attachAlarm(epics::pvData::PVAlarm &pvAlarm) const;
252 
259  bool attachDisplay(epics::pvData::PVDisplay &pvDisplay) const;
260 
265  epics::pvData::PVStructurePtr getPVStructure() const;
266 
271  epics::pvData::PVStringPtr getDescriptor() const;
272 
277  epics::pvData::PVStructurePtr getTimeStamp() const;
278 
283  epics::pvData::PVStructurePtr getAlarm() const;
284 
289  epics::pvData::PVStructurePtr getDisplay() const;
290 
295  epics::pvData::PVDoubleArrayPtr getValue() const;
296 
301  epics::pvData::PVIntArrayPtr getDim() const;
302 
303 private:
304  NTMatrix(epics::pvData::PVStructurePtr const & pvStructure);
307 
309 };
310 
311 }}
312 #endif /* NTMATRIX_H */
std::tr1::shared_ptr< PVIntArray > PVIntArrayPtr
Definition: pvData.h:1440
Interface for in-line creating of NTMatrix.
Definition: ntmatrix.h:40
Convenience Class for NTMatrix.
Definition: ntmatrix.h:134
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
std::tr1::shared_ptr< const Structure > StructureConstPtr
Definition: pvIntrospect.h:162
Mark external symbols and entry points for shared libraries.
std::tr1::shared_ptr< NTMatrix > NTMatrixPtr
Definition: ntmatrix.h:28
#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
static const std::string URI
Definition: ntmatrix.h:139
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Definition: pvData.h:87
std::tr1::shared_ptr< PVString > PVStringPtr
Definition: pvData.h:540
std::tr1::shared_ptr< detail::NTMatrixBuilder > NTMatrixBuilderPtr
Definition: ntmatrix.h:125
std::vector< std::string > StringArray
Definition: pvType.h:110
Methods for accessing an display structure.
Definition: pvDisplay.h:39
std::tr1::shared_ptr< PVDoubleArray > PVDoubleArrayPtr
Definition: pvData.h:1461