String -> std::string, toString methods removed
This commit is contained in:
@@ -70,7 +70,7 @@ void PVDatabase::unlock() {
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
PVRecordPtr PVDatabase::findRecord(String const& recordName)
|
||||
PVRecordPtr PVDatabase::findRecord(string const& recordName)
|
||||
{
|
||||
lock();
|
||||
try {
|
||||
@@ -104,13 +104,13 @@ PVStringArrayPtr PVDatabase::getRecordNames()
|
||||
PVStringArrayPtr pvStringArray = static_pointer_cast<PVStringArray>
|
||||
(getPVDataCreate()->createPVScalarArray(pvString));
|
||||
size_t len = recordMap.size();
|
||||
shared_vector<String> names(len);
|
||||
shared_vector<string> names(len);
|
||||
PVRecordMap::iterator iter;
|
||||
size_t i = 0;
|
||||
for(iter = recordMap.begin(); iter!=recordMap.end(); ++iter) {
|
||||
names[i++] = (*iter).first;
|
||||
}
|
||||
shared_vector<const String> temp(freeze(names));
|
||||
shared_vector<const string> temp(freeze(names));
|
||||
pvStringArray->replace(temp);
|
||||
unlock();
|
||||
return pvStringArray;
|
||||
@@ -128,7 +128,7 @@ bool PVDatabase::addRecord(PVRecordPtr const & record)
|
||||
unlock();
|
||||
return false;
|
||||
}
|
||||
String recordName = record->getRecordName();
|
||||
string recordName = record->getRecordName();
|
||||
PVRecordMap::iterator iter = recordMap.find(recordName);
|
||||
if(iter!=recordMap.end()) {
|
||||
unlock();
|
||||
@@ -152,7 +152,7 @@ bool PVDatabase::removeRecord(PVRecordPtr const & record)
|
||||
unlock();
|
||||
return false;
|
||||
}
|
||||
String recordName = record->getRecordName();
|
||||
string recordName = record->getRecordName();
|
||||
PVRecordMap::iterator iter = recordMap.find(recordName);
|
||||
if(iter!=recordMap.end()) {
|
||||
PVRecordPtr pvRecord = (*iter).second;
|
||||
|
||||
+14
-12
@@ -35,7 +35,7 @@ namespace epics { namespace pvDatabase {
|
||||
|
||||
class PVRecord;
|
||||
typedef std::tr1::shared_ptr<PVRecord> PVRecordPtr;
|
||||
typedef std::map<epics::pvData::String,PVRecordPtr> PVRecordMap;
|
||||
typedef std::map<std::string,PVRecordPtr> PVRecordMap;
|
||||
|
||||
class PVRecordField;
|
||||
typedef std::tr1::shared_ptr<PVRecordField> PVRecordFieldPtr;
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
* @return A shared pointer to the newly created record.
|
||||
*/
|
||||
static PVRecordPtr create(
|
||||
epics::pvData::String const & recordName,
|
||||
std::string const & recordName,
|
||||
epics::pvData::PVStructurePtr const & pvStructure);
|
||||
/**
|
||||
* The Destructor. Must be virtual.
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
* Get the name of the record.
|
||||
* @return The name.
|
||||
*/
|
||||
epics::pvData::String getRecordName();
|
||||
std::string getRecordName();
|
||||
/**
|
||||
* Get the top level PVStructure.
|
||||
* @return The shared pointer.
|
||||
@@ -187,13 +187,15 @@ public:
|
||||
* Calls the next method with indentLevel = 0.
|
||||
* @param buf String Builder.
|
||||
*/
|
||||
void toString(epics::pvData::StringBuilder buf);
|
||||
// TODO
|
||||
void toString(std::string* buf);
|
||||
/**
|
||||
* Dumps the data from the top level PVStructure.
|
||||
* @param buf String Builder.
|
||||
* @param indentLevel The indentation level.
|
||||
*/
|
||||
void toString(epics::pvData::StringBuilder buf,int indentLevel);
|
||||
// TODO
|
||||
void toString(std::string* buf,int indentLevel);
|
||||
/**
|
||||
* get trace level (0,1,2) means (nothing,lifetime,process)
|
||||
* @return the level
|
||||
@@ -211,7 +213,7 @@ protected:
|
||||
* @param pvStructure The top level PVStructutre
|
||||
*/
|
||||
PVRecord(
|
||||
epics::pvData::String const & recordName,
|
||||
std::string const & recordName,
|
||||
epics::pvData::PVStructurePtr const & pvStructure);
|
||||
/**
|
||||
* Initializes the base class. Must be called by derived classes.
|
||||
@@ -230,7 +232,7 @@ private:
|
||||
PVRecordFieldPtr findPVRecordField(
|
||||
PVRecordStructurePtr const & pvrs,
|
||||
epics::pvData::PVFieldPtr const & pvField);
|
||||
epics::pvData::String recordName;
|
||||
std::string recordName;
|
||||
epics::pvData::PVStructurePtr pvStructure;
|
||||
epics::pvData::ConvertPtr convert;
|
||||
PVRecordStructurePtr pvRecordStructure;
|
||||
@@ -284,12 +286,12 @@ public:
|
||||
* Get the full name of the field, i.e. field,field,..
|
||||
* @return The full name.
|
||||
*/
|
||||
epics::pvData::String getFullFieldName();
|
||||
std::string getFullFieldName();
|
||||
/**
|
||||
* Get the recordName plus the full name of the field, i.e. recordName.field,field,..
|
||||
* @return The name.
|
||||
*/
|
||||
epics::pvData::String getFullName();
|
||||
std::string getFullName();
|
||||
/**
|
||||
* Returns the PVRecord to which this field belongs.
|
||||
* @return The shared pointer,
|
||||
@@ -331,8 +333,8 @@ private:
|
||||
bool isStructure;
|
||||
PVRecordStructurePtr parent;
|
||||
PVRecordPtr pvRecord;
|
||||
epics::pvData::String fullName;
|
||||
epics::pvData::String fullFieldName;
|
||||
std::string fullName;
|
||||
std::string fullFieldName;
|
||||
friend class PVRecordStructure;
|
||||
friend class PVRecord;
|
||||
};
|
||||
@@ -481,7 +483,7 @@ public:
|
||||
* @param recordName The record to find.
|
||||
* @return The shared pointer.
|
||||
*/
|
||||
PVRecordPtr findRecord(epics::pvData::String const& recordName);
|
||||
PVRecordPtr findRecord(std::string const& recordName);
|
||||
/**
|
||||
* Add a record.
|
||||
* @param The record to add.
|
||||
|
||||
+12
-10
@@ -22,7 +22,7 @@ using namespace std;
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
PVRecordPtr PVRecord::create(
|
||||
String const &recordName,
|
||||
string const &recordName,
|
||||
PVStructurePtr const & pvStructure)
|
||||
{
|
||||
PVRecordPtr pvRecord(new PVRecord(recordName,pvStructure));
|
||||
@@ -35,7 +35,7 @@ PVRecordPtr PVRecord::create(
|
||||
|
||||
|
||||
PVRecord::PVRecord(
|
||||
String const & recordName,
|
||||
string const & recordName,
|
||||
PVStructurePtr const & pvStructure)
|
||||
: recordName(recordName),
|
||||
pvStructure(pvStructure),
|
||||
@@ -103,7 +103,7 @@ void PVRecord::destroy()
|
||||
}
|
||||
}
|
||||
|
||||
String PVRecord::getRecordName() {return recordName;}
|
||||
string PVRecord::getRecordName() {return recordName;}
|
||||
|
||||
PVRecordStructurePtr PVRecord::getPVRecordStructure() {return pvRecordStructure;}
|
||||
|
||||
@@ -346,15 +346,17 @@ void PVRecord::endGroupPut()
|
||||
}
|
||||
}
|
||||
|
||||
void PVRecord::toString(StringBuilder buf)
|
||||
void PVRecord::toString(string* buf)
|
||||
{
|
||||
toString(buf,0);
|
||||
}
|
||||
|
||||
void PVRecord::toString(StringBuilder buf,int indentLevel)
|
||||
void PVRecord::toString(string* buf,int indentLevel)
|
||||
{
|
||||
*buf += "\nrecord " + recordName + " ";
|
||||
pvRecordStructure->getPVStructure()->toString(buf, indentLevel);
|
||||
std::ostringstream oss;
|
||||
// TODO indent ignored
|
||||
oss << endl << recordName << ' ' << *pvRecordStructure->getPVStructure();
|
||||
*buf += oss.str();
|
||||
}
|
||||
|
||||
PVRecordField::PVRecordField(
|
||||
@@ -373,7 +375,7 @@ void PVRecordField::init()
|
||||
fullFieldName = pvField->getFieldName();
|
||||
PVRecordStructurePtr pvParent = parent;
|
||||
while(pvParent.get()!= NULL) {
|
||||
String parentName = pvParent->getPVField()->getFieldName();
|
||||
string parentName = pvParent->getPVField()->getFieldName();
|
||||
if(parentName.size()>0) {
|
||||
fullFieldName = pvParent->getPVField()->getFieldName()
|
||||
+ '.' + fullFieldName;
|
||||
@@ -404,9 +406,9 @@ PVRecordStructurePtr PVRecordField::getParent() {return parent;}
|
||||
|
||||
PVFieldPtr PVRecordField::getPVField() {return pvField;}
|
||||
|
||||
String PVRecordField::getFullFieldName() {return fullFieldName; }
|
||||
string PVRecordField::getFullFieldName() {return fullFieldName; }
|
||||
|
||||
String PVRecordField::getFullName() {return fullName; }
|
||||
string PVRecordField::getFullName() {return fullName; }
|
||||
|
||||
PVRecordPtr PVRecordField::getPVRecord() {return pvRecord;}
|
||||
|
||||
|
||||
@@ -20,14 +20,15 @@
|
||||
|
||||
#include <pv/channelProviderLocal.h>
|
||||
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
static ConvertPtr convert = getConvert();
|
||||
static StructureConstPtr nullStructure;
|
||||
@@ -830,9 +831,9 @@ ChannelArrayLocalPtr ChannelArrayLocal::create(
|
||||
return channelArray;
|
||||
}
|
||||
PVFieldPtr pvField = pvFields[0];
|
||||
String fieldName("");
|
||||
string fieldName("");
|
||||
while(true) {
|
||||
String name = pvField->getFieldName();
|
||||
string name = pvField->getFieldName();
|
||||
if(fieldName.size()>0) fieldName += '.';
|
||||
fieldName += name;
|
||||
PVStructurePtr pvs = static_pointer_cast<PVStructure>(pvField);
|
||||
@@ -1150,21 +1151,21 @@ void ChannelLocal::detach(PVRecordPtr const & pvRecord)
|
||||
}
|
||||
|
||||
|
||||
String ChannelLocal::getRequesterName()
|
||||
string ChannelLocal::getRequesterName()
|
||||
{
|
||||
return requester->getRequesterName();
|
||||
}
|
||||
|
||||
void ChannelLocal::message(
|
||||
String const &message,
|
||||
string const &message,
|
||||
MessageType messageType)
|
||||
{
|
||||
requester->message(message,messageType);
|
||||
}
|
||||
|
||||
String ChannelLocal::getRemoteAddress()
|
||||
string ChannelLocal::getRemoteAddress()
|
||||
{
|
||||
return String("local");
|
||||
return string("local");
|
||||
}
|
||||
|
||||
Channel::ConnectionState ChannelLocal::getConnectionState()
|
||||
@@ -1172,7 +1173,7 @@ Channel::ConnectionState ChannelLocal::getConnectionState()
|
||||
return Channel::CONNECTED;
|
||||
}
|
||||
|
||||
String ChannelLocal::getChannelName()
|
||||
string ChannelLocal::getChannelName()
|
||||
{
|
||||
return pvRecord->getRecordName();
|
||||
}
|
||||
@@ -1188,7 +1189,7 @@ bool ChannelLocal::isConnected()
|
||||
}
|
||||
|
||||
void ChannelLocal::getField(GetFieldRequester::shared_pointer const &requester,
|
||||
String const &subField)
|
||||
string const &subField)
|
||||
{
|
||||
if(subField.size()<1) {
|
||||
StructureConstPtr structure =
|
||||
@@ -1203,14 +1204,14 @@ void ChannelLocal::getField(GetFieldRequester::shared_pointer const &requester,
|
||||
return;
|
||||
}
|
||||
Status status(Status::STATUSTYPE_ERROR,
|
||||
String("client asked for illegal field"));
|
||||
"client asked for illegal field");
|
||||
requester->getDone(status,FieldConstPtr());
|
||||
}
|
||||
|
||||
AccessRights ChannelLocal::getAccessRights(
|
||||
PVField::shared_pointer const &pvField)
|
||||
{
|
||||
throw std::logic_error(String("Not Implemented"));
|
||||
throw std::logic_error("Not Implemented");
|
||||
}
|
||||
|
||||
ChannelProcess::shared_pointer ChannelLocal::createChannelProcess(
|
||||
@@ -1270,7 +1271,7 @@ ChannelRPC::shared_pointer ChannelLocal::createChannelRPC(
|
||||
PVStructure::shared_pointer const & pvRequest)
|
||||
{
|
||||
Status status(Status::STATUSTYPE_ERROR,
|
||||
String("ChannelRPC not supported"));
|
||||
"ChannelRPC not supported");
|
||||
channelRPCRequester->channelRPCConnect(status,ChannelRPC::shared_pointer());
|
||||
return ChannelRPC::shared_pointer();
|
||||
}
|
||||
@@ -1302,12 +1303,12 @@ ChannelArray::shared_pointer ChannelLocal::createChannelArray(
|
||||
|
||||
void ChannelLocal::printInfo()
|
||||
{
|
||||
cout << "ChannelLocal provides access to service" << endl;
|
||||
printInfo(std::cout);
|
||||
}
|
||||
|
||||
void ChannelLocal::printInfo(StringBuilder out)
|
||||
void ChannelLocal::printInfo(std::ostream& out)
|
||||
{
|
||||
*out += "ChannelLocal provides access to service";
|
||||
out << "ChannelLocal provides access to service";
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
@@ -17,16 +17,17 @@
|
||||
#include <pv/channelProviderLocal.h>
|
||||
#include <pv/traceRecord.h>
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
static String providerName("local");
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
static string providerName("local");
|
||||
|
||||
|
||||
class LocalChannelProviderFactory;
|
||||
@@ -37,7 +38,7 @@ class LocalChannelProviderFactory : public ChannelProviderFactory
|
||||
|
||||
public:
|
||||
POINTER_DEFINITIONS(LocalChannelProviderFactory);
|
||||
virtual String getFactoryName() { return providerName;}
|
||||
virtual string getFactoryName() { return providerName;}
|
||||
static LocalChannelProviderFactoryPtr create(
|
||||
ChannelProviderLocalPtr const &channelProvider)
|
||||
{
|
||||
@@ -97,13 +98,13 @@ void ChannelProviderLocal::destroy()
|
||||
pvDatabase->destroy();
|
||||
}
|
||||
|
||||
String ChannelProviderLocal::getProviderName()
|
||||
string ChannelProviderLocal::getProviderName()
|
||||
{
|
||||
return providerName;
|
||||
}
|
||||
|
||||
ChannelFind::shared_pointer ChannelProviderLocal::channelFind(
|
||||
String const & channelName,
|
||||
string const & channelName,
|
||||
ChannelFindRequester::shared_pointer const &channelFindRequester)
|
||||
{
|
||||
Lock xx(mutex);
|
||||
@@ -115,7 +116,7 @@ ChannelFind::shared_pointer ChannelProviderLocal::channelFind(
|
||||
true);
|
||||
|
||||
} else {
|
||||
Status notFoundStatus(Status::STATUSTYPE_ERROR,String("pv not found"));
|
||||
Status notFoundStatus(Status::STATUSTYPE_ERROR,"pv not found");
|
||||
channelFindRequester->channelFindResult(
|
||||
notFoundStatus,
|
||||
channelFinder,
|
||||
@@ -138,7 +139,7 @@ ChannelFind::shared_pointer ChannelProviderLocal::channelList(
|
||||
}
|
||||
|
||||
Channel::shared_pointer ChannelProviderLocal::createChannel(
|
||||
String const & channelName,
|
||||
string const & channelName,
|
||||
ChannelRequester::shared_pointer const &channelRequester,
|
||||
short priority)
|
||||
{
|
||||
@@ -146,10 +147,10 @@ Channel::shared_pointer ChannelProviderLocal::createChannel(
|
||||
}
|
||||
|
||||
Channel::shared_pointer ChannelProviderLocal::createChannel(
|
||||
String const & channelName,
|
||||
string const & channelName,
|
||||
ChannelRequester::shared_pointer const &channelRequester,
|
||||
short priority,
|
||||
String const &address)
|
||||
string const &address)
|
||||
{
|
||||
Lock xx(mutex);
|
||||
PVRecordPtr pvRecord = pvDatabase->findRecord(channelName);
|
||||
@@ -162,7 +163,7 @@ Channel::shared_pointer ChannelProviderLocal::createChannel(
|
||||
pvRecord->addPVRecordClient(channel);
|
||||
return channel;
|
||||
}
|
||||
Status notFoundStatus(Status::STATUSTYPE_ERROR,String("pv not found"));
|
||||
Status notFoundStatus(Status::STATUSTYPE_ERROR,"pv not found");
|
||||
channelRequester->channelCreated(
|
||||
notFoundStatus,
|
||||
Channel::shared_pointer());
|
||||
|
||||
@@ -86,21 +86,21 @@ public:
|
||||
POINTER_DEFINITIONS(ChannelProviderLocal);
|
||||
virtual ~ChannelProviderLocal();
|
||||
virtual void destroy();
|
||||
virtual epics::pvData::String getProviderName();
|
||||
virtual std::string getProviderName();
|
||||
virtual epics::pvAccess::ChannelFind::shared_pointer channelFind(
|
||||
epics::pvData::String const &channelName,
|
||||
std::string const &channelName,
|
||||
epics::pvAccess::ChannelFindRequester::shared_pointer const & channelFindRequester);
|
||||
virtual epics::pvAccess::ChannelFind::shared_pointer channelList(
|
||||
epics::pvAccess::ChannelListRequester::shared_pointer const & channelListRequester);
|
||||
virtual epics::pvAccess::Channel::shared_pointer createChannel(
|
||||
epics::pvData::String const &channelName,
|
||||
std::string const &channelName,
|
||||
epics::pvAccess::ChannelRequester::shared_pointer const &channelRequester,
|
||||
short priority);
|
||||
virtual epics::pvAccess::Channel::shared_pointer createChannel(
|
||||
epics::pvData::String const &channelName,
|
||||
std::string const &channelName,
|
||||
epics::pvAccess::ChannelRequester::shared_pointer const &channelRequester,
|
||||
short priority,
|
||||
epics::pvData::String const &address);
|
||||
std::string const &address);
|
||||
private:
|
||||
shared_pointer getPtrSelf()
|
||||
{
|
||||
@@ -129,22 +129,22 @@ public:
|
||||
);
|
||||
virtual ~ChannelLocal();
|
||||
virtual void destroy();
|
||||
virtual epics::pvData::String getRequesterName();
|
||||
virtual std::string getRequesterName();
|
||||
virtual void message(
|
||||
epics::pvData::String const & message,
|
||||
std::string const & message,
|
||||
epics::pvData::MessageType messageType);
|
||||
virtual epics::pvAccess::ChannelProvider::shared_pointer getProvider()
|
||||
{
|
||||
return provider;
|
||||
}
|
||||
virtual epics::pvData::String getRemoteAddress();
|
||||
virtual std::string getRemoteAddress();
|
||||
virtual epics::pvAccess::Channel::ConnectionState getConnectionState();
|
||||
virtual epics::pvData::String getChannelName();
|
||||
virtual std::string getChannelName();
|
||||
virtual epics::pvAccess::ChannelRequester::shared_pointer getChannelRequester();
|
||||
virtual bool isConnected();
|
||||
virtual void getField(
|
||||
epics::pvAccess::GetFieldRequester::shared_pointer const &requester,
|
||||
epics::pvData::String const & subField);
|
||||
std::string const & subField);
|
||||
virtual epics::pvAccess::AccessRights getAccessRights(
|
||||
epics::pvData::PVField::shared_pointer const &pvField);
|
||||
virtual epics::pvAccess::ChannelProcess::shared_pointer createChannelProcess(
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
epics::pvAccess::ChannelArrayRequester::shared_pointer const &requester,
|
||||
epics::pvData::PVStructurePtr const &pvRequest);
|
||||
virtual void printInfo();
|
||||
virtual void printInfo(epics::pvData::StringBuilder out);
|
||||
virtual void printInfo(std::ostream& out);
|
||||
virtual void detach(PVRecordPtr const &pvRecord);
|
||||
protected:
|
||||
shared_pointer getPtrSelf()
|
||||
|
||||
@@ -21,12 +21,14 @@
|
||||
|
||||
#include <pv/channelProviderLocal.h>
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
static MonitorPtr nullMonitor;
|
||||
static MonitorElementPtr NULLMonitorElement;
|
||||
@@ -384,7 +386,7 @@ bool MultipleElementQueue::dataChanged()
|
||||
queue->setUsed(activeElement);
|
||||
activeElement = queue->getFree();
|
||||
if(activeElement==NULL) {
|
||||
throw std::logic_error(String("MultipleElementQueue::dataChanged() logic error"));
|
||||
throw std::logic_error("MultipleElementQueue::dataChanged() logic error");
|
||||
}
|
||||
if(queue->getNumberFree()==0) queueIsFull = true;
|
||||
activeElement->changedBitSet->clear();
|
||||
|
||||
@@ -20,14 +20,15 @@
|
||||
#include <pv/channelProviderLocal.h>
|
||||
#include <pv/pvCopyMonitor.h>
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
using namespace epics::pvData;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
using std::size_t;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
struct PVCopyMonitorFieldNode
|
||||
{
|
||||
@@ -73,12 +74,12 @@ PVCopyMonitor::~PVCopyMonitor()
|
||||
void PVCopyMonitor::init(PVFieldPtr const &pvField)
|
||||
{
|
||||
size_t offset = pvCopy->getCopyOffset(pvField);
|
||||
if(offset==String::npos) return;
|
||||
if(offset==string::npos) return;
|
||||
PVStructurePtr pvOptions = pvCopy->getOptions(offset);
|
||||
if(pvOptions!=NULL) {
|
||||
PVStringPtr pvName = pvOptions->getSubField<PVString>("plugin");
|
||||
if(pvName!=NULL) {
|
||||
String pluginName = pvName->get();
|
||||
string pluginName = pvName->get();
|
||||
MonitorPluginManagerPtr manager = MonitorPluginManager::get();
|
||||
MonitorPluginCreatorPtr pluginCreator = manager->findPlugin(pluginName);
|
||||
if(pluginCreator!=NULL) {
|
||||
|
||||
@@ -20,7 +20,7 @@ using namespace std;
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
RecordListRecordPtr RecordListRecord::create(
|
||||
epics::pvData::String const & recordName)
|
||||
std::string const & recordName)
|
||||
{
|
||||
FieldCreatePtr fieldCreate = getFieldCreate();
|
||||
PVDataCreatePtr pvDataCreate = getPVDataCreate();
|
||||
@@ -52,7 +52,7 @@ RecordListRecordPtr RecordListRecord::create(
|
||||
}
|
||||
|
||||
RecordListRecord::RecordListRecord(
|
||||
epics::pvData::String const & recordName,
|
||||
std::string const & recordName,
|
||||
epics::pvData::PVStructurePtr const & pvStructure)
|
||||
: PVRecord(recordName,pvStructure)
|
||||
{
|
||||
@@ -93,11 +93,11 @@ void RecordListRecord::process()
|
||||
{
|
||||
PVStringArrayPtr pvNames = PVDatabase::getMaster()->getRecordNames();
|
||||
names->replace(pvNames->view());
|
||||
String message("");
|
||||
string message("");
|
||||
if(database->get().compare("master")!=0) {
|
||||
message += " can only access master ";
|
||||
}
|
||||
String regEx = regularExpression->get();
|
||||
string regEx = regularExpression->get();
|
||||
if(regEx.compare("")!=0 && regEx.compare(".*")!=0) {
|
||||
message += " regularExpression not implemented ";
|
||||
}
|
||||
|
||||
@@ -26,13 +26,13 @@ class epicsShareClass RecordListRecord :
|
||||
public:
|
||||
POINTER_DEFINITIONS(RecordListRecord);
|
||||
static RecordListRecordPtr create(
|
||||
epics::pvData::String const & recordName);
|
||||
std::string const & recordName);
|
||||
virtual ~RecordListRecord();
|
||||
virtual void destroy();
|
||||
virtual bool init();
|
||||
virtual void process();
|
||||
private:
|
||||
RecordListRecord(epics::pvData::String const & recordName,
|
||||
RecordListRecord(std::string const & recordName,
|
||||
epics::pvData::PVStructurePtr const & pvStructure);
|
||||
epics::pvData::PVStringPtr database;
|
||||
epics::pvData::PVStringPtr regularExpression;
|
||||
|
||||
@@ -20,7 +20,7 @@ using namespace std;
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
TraceRecordPtr TraceRecord::create(
|
||||
epics::pvData::String const & recordName)
|
||||
std::string const & recordName)
|
||||
{
|
||||
FieldCreatePtr fieldCreate = getFieldCreate();
|
||||
PVDataCreatePtr pvDataCreate = getPVDataCreate();
|
||||
@@ -50,7 +50,7 @@ TraceRecordPtr TraceRecord::create(
|
||||
}
|
||||
|
||||
TraceRecord::TraceRecord(
|
||||
epics::pvData::String const & recordName,
|
||||
std::string const & recordName,
|
||||
epics::pvData::PVStructurePtr const & pvStructure)
|
||||
: PVRecord(recordName,pvStructure),
|
||||
pvDatabase(PVDatabase::getMaster()),
|
||||
@@ -82,7 +82,7 @@ bool TraceRecord::init()
|
||||
|
||||
void TraceRecord::process()
|
||||
{
|
||||
String name = pvRecordName->get();
|
||||
string name = pvRecordName->get();
|
||||
PVRecordPtr pvRecord = pvDatabase->findRecord(name);
|
||||
if(pvRecord==NULL) {
|
||||
pvResult->put(name + " not found");
|
||||
|
||||
@@ -27,14 +27,14 @@ class epicsShareClass TraceRecord :
|
||||
public:
|
||||
POINTER_DEFINITIONS(TraceRecord);
|
||||
static TraceRecordPtr create(
|
||||
epics::pvData::String const & recordName);
|
||||
std::string const & recordName);
|
||||
virtual ~TraceRecord();
|
||||
virtual void destroy();
|
||||
virtual bool init();
|
||||
virtual void process();
|
||||
private:
|
||||
TraceRecord(
|
||||
epics::pvData::String const & recordName,
|
||||
std::string const & recordName,
|
||||
epics::pvData::PVStructurePtr const & pvStructure);
|
||||
PVDatabasePtr pvDatabase;
|
||||
epics::pvData::PVStringPtr pvRecordName;
|
||||
|
||||
Reference in New Issue
Block a user