/* standardPVField.h */ /** * Copyright - See the COPYRIGHT that is included with this distribution. * EPICS pvData is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ /** * @author mrk */ #ifndef STANDARDPVFIELD_H #define STANDARDPVFIELD_H #include #include #include #include #include #include namespace epics { namespace pvData { class StandardPVField; typedef std::tr1::shared_ptr StandardPVFieldPtr; /** * StandardPVField is a class or creating standard data fields. * Like class StandardField it has two forms of the methods which create a fields: * one without properties and one with properties. * The properties are some combination of alarm, timeStamp, control, display, and valueAlarm. * Just like StandardField there are methods to create the standard properties. * * StandardPVField is a singleton class. The class is accessed via the statement: {@code StandardPVField *standardPVField = getStandardPVField(); * } */ class epicsShareClass StandardPVField : private NoDefaultMethods { public: /** * getStandardPVField returns the singleton. * @return Shared pointer to StandardPVField. */ static StandardPVFieldPtr getStandardPVField(); ~StandardPVField(); /** * Create a structure that has a scalar value field. * @param type The type. * @param properties A comma separated list of properties. * This is some combination of "alarm,timeStamp,display,control,valueAlarm". * @return The const shared pointer to the structure. */ PVStructurePtr scalar(ScalarType type,std::string const & properties); /** * Create a structure that has a scalar array value field. * @param type The type. * @param properties A comma separated list of properties. * This is some combination of "alarm,timeStamp,display,control,valueAlarm". * @return The const shared pointer to the structure. */ PVStructurePtr scalarArray(ScalarType elementType, std::string const & properties); /** * Create a structure that has a structure array value field. * @param type The type. * @param properties A comma separated list of properties. * This is some combination of "alarm,timeStamp,display,control,valueAlarm". * @return The const shared pointer to the structure. */ PVStructurePtr structureArray(StructureConstPtr const &structure,std::string const & properties); /** * Create a structure that has a union array value field. * @param type The type. * @param properties A comma separated list of properties. * This is some combination of "alarm,timeStamp,display,control,valueAlarm". * @return The const shared pointer to the structure. */ PVStructurePtr unionArray(UnionConstPtr const &punion,std::string const & properties); /** * Create a structure that has an enumerated structure value field. * The id for the structure is "enum_t". * @param choices This is a StringArray of choices. * @return The const shared pointer to the structure. */ PVStructurePtr enumerated(StringArray const &choices); /** * Create a structure that has an enumerated structure value field. * The id for the structure is "epics:nt/NTEnum:1.0". * @param choices This is a StringArray of choices. * @param properties A comma separated list of properties. * @return The const shared pointer to the structure. */ PVStructurePtr enumerated(StringArray const &choices, std::string const & properties); private: StandardPVField(); StandardFieldPtr standardField; FieldCreatePtr fieldCreate; PVDataCreatePtr pvDataCreate; std::string notImplemented; }; epicsShareExtern StandardPVFieldPtr getStandardPVField(); }} #endif /* STANDARDPVFIELD_H */