00001 00002 #ifndef _EPICS_ACCCOMPONENTDATA_H 00003 #define _EPICS_ACCCOMPONENTDATA_H 00004 00005 #include <string> 00006 00007 #include "epics/pvdata/PVLong.h" 00008 #include "epics/pvdata/PVString.h" 00009 #include "epics/pvdata/PVStructure.h" 00010 #include "epics/pvdata/PVArray.h" 00011 00012 namespace EPICS 00013 { 00015 class AccComponentData : public PVStructure 00016 { 00017 public: 00018 00020 AccComponentData(); 00021 00023 AccComponentData(const AccComponentData& td); 00024 00026 AccComponentData& operator=(const AccComponentData& td); 00027 00028 public: 00029 00030 // pv field interface 00031 00032 PVField* clone() const; 00033 00034 public: 00035 00036 // Specialization 00037 00039 inline void putAccName(const std::string& v); 00040 00042 inline void putAccType(const std::string& v); 00043 00045 inline const std::string& getAccName() const; 00046 00047 /* Returns type */ 00048 inline const std::string& getAccType() const; 00049 00050 }; 00051 00053 class AccComponentArray : public PVArray 00054 { 00055 public: 00056 00058 AccComponentArray(unsigned int length = 0); 00059 00061 AccComponentArray(const AccComponentArray& array); 00062 00064 virtual void setLength(unsigned int length); 00065 00066 }; 00067 00068 inline void AccComponentData::putAccName(const std::string& v) { 00069 ((PVString*) getPVField(0))->put(v); 00070 } 00071 00072 inline void AccComponentData::putAccType(const std::string& v) { 00073 ((PVString*) getPVField(1))->put(v); 00074 } 00075 00076 inline const std::string& AccComponentData::getAccName() const { 00077 return ((PVString*) getPVField(0))->get(); 00078 } 00079 00080 inline const std::string& AccComponentData::getAccType() const { 00081 return ((PVString*) getPVField(1))->get(); 00082 } 00083 00084 } 00085 00086 #endif /* _ACCCOMPONENTDATA_H */ 00087