12 #define epicsExportSharedSymbols 21 namespace epics {
namespace pvData {
23 string PVDisplay::noDisplayFound(
"No display structure found");
24 string PVDisplay::notAttached(
"Not attached to an display structure");
28 if(pvField->getField()->getType()!=
structure)
return false;
30 pvDescription = pvStructure->getSubField<
PVString>(
"description");
31 if(pvDescription.get()==
NULL)
return false;
32 pvFormat = pvStructure->getSubField<
PVString>(
"format");
33 if(pvFormat.get()==
NULL) {
37 pvUnits = pvStructure->getSubField<
PVString>(
"units");
38 if(pvUnits.get()==
NULL) {
42 pvLow = pvStructure->getSubField<
PVDouble>(string(
"limitLow"));
43 if(pvLow.get()==
NULL) {
47 pvHigh = pvStructure->getSubField<
PVDouble>(string(
"limitHigh"));
48 if(pvHigh.get()==
NULL) {
57 pvDescription.reset();
65 if(pvDescription.get())
return false;
71 if(pvDescription.get()==
NULL) {
72 throw std::logic_error(notAttached);
77 display.
setLow(pvLow->get());
83 if(pvDescription.get()==
NULL) {
84 throw std::logic_error(notAttached);
86 if(pvDescription->isImmutable() || pvFormat->isImmutable())
return false;
87 if(pvUnits->isImmutable() || pvLow->isImmutable() || pvHigh->isImmutable())
93 bool returnValue =
false;
111 pvLow->put(display.
getLow());
116 pvHigh->put(display.
getHigh());
void setHigh(double value)
bool attach(PVFieldPtr const &pvField)
bool set(Display const &display)
Methods for a display structure.
void setDescription(std::string const &value)
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
void get(Display &display) const
std::string getDescription() const
TODO only here because of the Lockable.
void setLow(double value)
void setFormat(std::string const &value)
PVString is special case, since it implements SerializableArray.
std::string getUnits() const
Data interface for a structure,.
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Class that holds the data for each possible scalar type.
std::tr1::shared_ptr< PVField > PVFieldPtr
void setUnits(std::string const &value)
std::string getFormat() const