29 #define epicsExportSharedSymbols 39 namespace epics {
namespace pvDatabase {
42 std::string
const & recordName)
47 addNestedStructure(
"argument")->
50 addNestedStructure(
"result") ->
54 PVStructurePtr pvStructure = pvDataCreate->createPVStructure(topStructure);
57 if(!pvRecord->init()) pvRecord.reset();
61 RemoveRecord::RemoveRecord(
62 std::string
const & recordName,
68 bool RemoveRecord::init()
72 pvRecordName = pvStructure->getSubField<
PVString>(
"argument.recordName");
73 if(!pvRecordName)
return false;
74 pvResult = pvStructure->getSubField<
PVString>(
"result.status");
75 if(!pvResult)
return false;
79 void RemoveRecord::process()
81 string name = pvRecordName->get();
82 PVRecordPtr pvRecord = PVDatabase::getMaster()->findRecord(name);
84 pvResult->put(name +
" not found");
88 pvResult->put(
"success");
std::tr1::shared_ptr< RemoveRecord > RemoveRecordPtr
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
TODO only here because of the Lockable.
std::tr1::shared_ptr< const Structure > StructureConstPtr
Base interface for a PVRecord.
std::tr1::shared_ptr< PVDataCreate > PVDataCreatePtr
PVString is special case, since it implements SerializableArray.
FORCE_INLINE const FieldCreatePtr & getFieldCreate()
std::tr1::shared_ptr< PVRecord > PVRecordPtr
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Remove another record in the same database.
std::tr1::shared_ptr< FieldCreate > FieldCreatePtr
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()