String -> std::string, toString methods removed
This commit is contained in:
@@ -113,8 +113,8 @@ then passes it to pvCopy.
|
||||
class CreateRequest {
|
||||
...
|
||||
static CreateRequestPtr create();
|
||||
virtual PVStructurePtr createRequest(String const &request);
|
||||
String getMessage();
|
||||
virtual PVStructurePtr createRequest(std::string const &request);
|
||||
std::string getMessage();
|
||||
};
|
||||
</pre>
|
||||
<p>An example of how it is used is:</p>
|
||||
@@ -122,7 +122,7 @@ class CreateRequest {
|
||||
CreateRequestPtr createRequest = CreateRequest::create();
|
||||
PVStructurePtr pvRequest = createRequest->createRequest(request);
|
||||
if(pvRequest==NULL) {
|
||||
String error = createRequest->getMessage();
|
||||
std::string error = createRequest->getMessage();
|
||||
// take some action
|
||||
} else {
|
||||
//success do something
|
||||
@@ -143,7 +143,7 @@ class class epicsShareClass PVCopy
|
||||
static PVCopyPtr create(
|
||||
PVStructurePtr const &pvMaster,
|
||||
PVStructurePtr const &pvRequest,
|
||||
String const & structureName);
|
||||
std::string const & structureName);
|
||||
PVStructurePtr getPVMaster();
|
||||
void traverseMaster(PVCopyTraverseMasterCallbackPtr const & callback);
|
||||
StructureConstPtr getStructure();
|
||||
@@ -216,7 +216,7 @@ where
|
||||
<dt>getCopyOffset</dt>
|
||||
<dd>Given a field in pvMaster.
|
||||
return the offset in copy for the same field.
|
||||
A value of String::npos means that the copy does not have this field.
|
||||
A value of std::string::npos means that the copy does not have this field.
|
||||
Two overloaded methods are provided. The first is called if
|
||||
the field of master is not a structure. The second is for
|
||||
subfields of a structure.
|
||||
@@ -387,7 +387,7 @@ It has the methods:</p>
|
||||
<pre>
|
||||
class MonitorPlugin
|
||||
{
|
||||
virtual String const & getName() = 0;
|
||||
virtual std::string const & getName() = 0;
|
||||
virtual bool causeMonitor(
|
||||
PVFieldPtr const &pvField,
|
||||
PVStructurePtr const &pvTop,
|
||||
@@ -406,16 +406,16 @@ class MonitorPluginCreator
|
||||
FieldConstPtr const &field,
|
||||
StructureConstPtr const &top,
|
||||
PVStructurePtr const &pvFieldOptions) = 0;
|
||||
virtual String const & getName() = 0;
|
||||
virtual std::string const & getName() = 0;
|
||||
}
|
||||
|
||||
class MonitorPluginManager
|
||||
{
|
||||
static MonitorPluginManagerPtr get();
|
||||
bool addPlugin(
|
||||
String const &pluginName,
|
||||
std::string const &pluginName,
|
||||
MonitorPluginCreatorPtr const &creator);
|
||||
MonitorPluginCreatorPtr findPlugin(String const &pluginName);
|
||||
MonitorPluginCreatorPtr findPlugin(std::string const &pluginName);
|
||||
void showNames();
|
||||
};
|
||||
|
||||
@@ -587,7 +587,7 @@ will be passed to the client.
|
||||
Assume that the client has already connected to the channel.
|
||||
The client can then issue the commands:</p>
|
||||
<pre>
|
||||
String request("field(alarm[plugin=onChange]");
|
||||
std::string request("field(alarm[plugin=onChange]");
|
||||
request += ",timeStamp[plugin=onChange,raiseMonitor=false]";
|
||||
request += ",power.value[plugin=onChange";
|
||||
request += ",voltage.value[plugin=onChange";
|
||||
@@ -623,13 +623,13 @@ public:
|
||||
PVStringPtr pvString =
|
||||
pvFieldOptions->getSubField<PVString>("raiseMonitor");
|
||||
if(pvString!=NULL) {
|
||||
String value = pvString->get();
|
||||
std::string value = pvString->get();
|
||||
if(value.compare("false")==0) raiseMonitor = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual String &getName(){return pluginName;}
|
||||
virtual std::string &getName(){return pluginName;}
|
||||
virtual bool causeMonitor(
|
||||
PVFieldPtr const &pvNew,
|
||||
PVStructurePtr const &pvTop,
|
||||
@@ -647,7 +647,7 @@ private:
|
||||
class OnChangePluginCreator : public MonitorPluginCreator
|
||||
{
|
||||
public:
|
||||
virtual String &getName(){return pluginName;}
|
||||
virtual std::string &getName(){return pluginName;}
|
||||
virtual MonitorPluginPtr create(
|
||||
FieldConstPtr const &field,
|
||||
StructureConstPtr const &top,
|
||||
|
||||
+29
-29
@@ -170,7 +170,7 @@ the dumpValue method is replaced by the stream operator<<.
|
||||
</p>
|
||||
<h4>Java</h4>
|
||||
<pre>interface PVField extends Requester, Serializable {
|
||||
String getFieldName();
|
||||
std::string getFieldName();
|
||||
void setRequester(Requester requester);
|
||||
int getFieldOffset();
|
||||
int getNextFieldOffset();
|
||||
@@ -180,12 +180,12 @@ the dumpValue method is replaced by the stream operator<<.
|
||||
void setImmutable();
|
||||
Field getField();
|
||||
PVStructure getParent();
|
||||
void renameField(String newName);
|
||||
void renameField(std::string newName);
|
||||
void postPut(); // calls PVRecordField.postPut if this is a field of a record
|
||||
void setPostHandler(PostHandler postHandler);
|
||||
void toString(StringBuilder buf);
|
||||
void toString(StringBuilder buf,int indentLevel);
|
||||
String toString();
|
||||
std::string toString();
|
||||
}</pre>
|
||||
<h4>pvDataCPP</h4>
|
||||
<pre>class PVField
|
||||
@@ -195,8 +195,8 @@ the dumpValue method is replaced by the stream operator<<.
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
virtual void message(String message,MessageType messageType);
|
||||
String getFieldName() const ;
|
||||
virtual void message(std::string message,MessageType messageType);
|
||||
std::string getFieldName() const ;
|
||||
virtual void setRequester(RequesterPtr const &prequester);
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
const FieldConstPtr & getField() const ;
|
||||
PVStructure * getParent() const
|
||||
void replacePVField(const PVFieldPtr& newPVField);
|
||||
void renameField(String const &newName);
|
||||
void renameField(std::string const &newName);
|
||||
void postPut() ;
|
||||
void setPostHandler(PostHandlerPtr const &postHandler);
|
||||
virtual bool equals(PVField &pv);
|
||||
@@ -227,8 +227,8 @@ std::ostream& operator<<(std::ostream& o, const PVFieldPtr & f
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
virtual void message(String message,MessageType messageType);
|
||||
String getFieldName() const ;
|
||||
virtual void message(std::string message,MessageType messageType);
|
||||
std::string getFieldName() const ;
|
||||
virtual void setRequester(RequesterPtr const &prequester);
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
const FieldConstPtr & getField() const ;
|
||||
PVStructure * getParent() const
|
||||
void replacePVField(const PVFieldPtr& newPVField);
|
||||
void renameField(String const &newName);
|
||||
void renameField(std::string const &newName);
|
||||
void postPut() ;
|
||||
void setPostHandler(PostHandlerPtr const &postHandler);
|
||||
virtual bool equals(PVField &pv);
|
||||
@@ -247,7 +247,7 @@ public:
|
||||
virtual void toString(StringBuilder buf,int indentLevel);
|
||||
std::ostream& dumpValue(std::ostream& o) const;
|
||||
// not in pvDataCPP
|
||||
String getFullName() const;
|
||||
std::string getFullName() const;
|
||||
...
|
||||
}
|
||||
|
||||
@@ -262,8 +262,8 @@ class PVField
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
virtual void message(String message,MessageType messageType);
|
||||
const String& getFieldName() const;
|
||||
virtual void message(std::string message,MessageType messageType);
|
||||
const std::string& getFieldName() const;
|
||||
virtual void setRequester(RequesterPtr const &prequester);
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
const FieldConstPtr & getField() const;
|
||||
PVStructure * getParent() const;
|
||||
void replacePVField(const PVFieldPtr& newPVField);
|
||||
void renameField(String const & newName);
|
||||
void renameField(std::string const & newName);
|
||||
void postPut();
|
||||
void setPostHandler(PostHandlerPtr const &postHandler);
|
||||
virtual bool equals(PVField &pv);
|
||||
@@ -328,8 +328,8 @@ interface PVDouble extends PVScalar {
|
||||
void put(double value);
|
||||
}
|
||||
interface PVString extends PVScalar, SerializableArray {
|
||||
String get();
|
||||
void put(String value);
|
||||
std::string get();
|
||||
void put(std::string value);
|
||||
}
|
||||
</pre>
|
||||
<h4>pvDataCPP</h4>
|
||||
@@ -369,7 +369,7 @@ typedef std::tr1::shared_ptr<PVDouble> PVDoublePtr;
|
||||
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -427,7 +427,7 @@ typedef std::tr1::shared_ptr<PVDouble> PVDoublePtr;
|
||||
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -472,7 +472,7 @@ typedef std::tr1::shared_ptr<PVByte> PVBytePtr;
|
||||
typedef std::tr1::shared_ptr<PVDouble> PVDoublePtr;
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -641,8 +641,8 @@ typedef PVArrayData<uint8> BooleanArrayData;
|
||||
typedef PVValueArray<uint8> PVBooleanArray;
|
||||
typedef std::tr1::shared_ptr<PVBooleanArray> PVBooleanArrayPtr;
|
||||
...
|
||||
typedef PVArrayData<String> StringArrayData;
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVArrayData<std::string> StringArrayData;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
typedef std::tr1::shared_ptr<PVStringArray> PVStringArrayPtr;i
|
||||
</pre>
|
||||
|
||||
@@ -786,8 +786,8 @@ typedef PVArrayData<uint8> BooleanArrayData;
|
||||
typedef PVValueArray<uint8> PVBooleanArray;
|
||||
typedef std::tr1::shared_ptr<PVBooleanArray> PVBooleanArrayPtr;
|
||||
...
|
||||
typedef PVArrayData<String> StringArrayData;
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVArrayData<std::string> StringArrayData;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
typedef std::tr1::shared_ptr<PVStringArray> PVStringArrayPtr;i
|
||||
</pre>
|
||||
<h4>proposed</h4>
|
||||
@@ -843,7 +843,7 @@ public:
|
||||
typedef PVValueArray<uint8> PVBooleanArray;
|
||||
typedef std::tr1::shared_ptr<PVBooleanArray> PVBooleanArrayPtr;
|
||||
...
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
typedef std::tr1::shared_ptr<PVStringArray> PVStringArrayPtr;
|
||||
</pre>
|
||||
|
||||
@@ -865,8 +865,8 @@ class PVField
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
virtual void message(String message,MessageType messageType);
|
||||
const String& getFieldName() const;
|
||||
virtual void message(std::string message,MessageType messageType);
|
||||
const std::string& getFieldName() const;
|
||||
virtual void setRequester(RequesterPtr const &prequester);
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
const FieldConstPtr & getField() const;
|
||||
PVStructure * getParent() const;
|
||||
void replacePVField(const PVFieldPtr& newPVField);
|
||||
void renameField(String const & newName);
|
||||
void renameField(std::string const & newName);
|
||||
void postPut();
|
||||
void setPostHandler(PostHandlerPtr const &postHandler);
|
||||
virtual bool equals(PVField &pv);
|
||||
@@ -1006,7 +1006,7 @@ typedef std::tr1::shared_ptr<PVFloat> PVFloatPtr;
|
||||
typedef std::tr1::shared_ptr<PVDouble> PVDoublePtr;
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -1144,7 +1144,7 @@ typedef std::tr1::shared_ptr<PVFloatArray> PVFloatArrayPtr;
|
||||
typedef PVValueArray<double> PVDoubleArray;
|
||||
typedef std::tr1::shared_ptr<PVDoubleArray> PVDoubleArrayPtr;
|
||||
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
typedef std::tr1::shared_ptr<PVStringArray> PVStringArrayPtr;
|
||||
</pre>
|
||||
|
||||
@@ -1231,7 +1231,7 @@ For others the brief summary is followed by tutorial information.
|
||||
<pre>
|
||||
typedef shared_vector<int32> Int32Array;
|
||||
...
|
||||
static void dumpArray(String const &message,Int32Array const& int32Array);
|
||||
static void dumpArray(std::string const &message,Int32Array const& int32Array);
|
||||
</pre>
|
||||
<p>The following:
|
||||
<pre>
|
||||
|
||||
+102
-102
@@ -145,7 +145,7 @@ After it is unzipped just edit configure/RELEASE.local and then execute make.
|
||||
</p>
|
||||
<p>The examples assume that the following statements have been issued:</p>
|
||||
<pre>
|
||||
String builder;
|
||||
std::string builder;
|
||||
FieldCreatePtr fieldCreate = getFieldCreate();
|
||||
PVDataCreatePtr pvDataCreate = getPVDataCreate();
|
||||
StandardFieldPtr standardField = getStandardField();
|
||||
@@ -876,21 +876,21 @@ typedef uint16_t uint16;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint64_t uint64;
|
||||
// float and double are types
|
||||
typedef std::string String;
|
||||
typedef std::string std::string;
|
||||
|
||||
typedef std::vector<String> StringArray;
|
||||
typedef std::vector<std::string> StringArray;
|
||||
typedef std::tr1::shared_ptr<StringArray> StringArrayPtr;
|
||||
inline String * get(StringArray &value);
|
||||
inline String const * get(StringArray const &value);
|
||||
inline String * get(StringArrayPtr &value);
|
||||
inline String const * get(StringArrayPtr const &value);
|
||||
inline std::string * get(StringArray &value);
|
||||
inline std::string const * get(StringArray const &value);
|
||||
inline std::string * get(StringArrayPtr &value);
|
||||
inline std::string const * get(StringArrayPtr const &value);
|
||||
}
|
||||
inline StringArray & getVector(StringArrayPtr &value);
|
||||
inline StringArray const & getVector(StringArrayPtr const &value);
|
||||
typedef std::vector<String>::iterator StringArray_iterator;
|
||||
typedef std::vector<String>::const_iterator StringArray_const_iterator;
|
||||
typedef std::vector<std::string>::iterator StringArray_iterator;
|
||||
typedef std::vector<std::string>::const_iterator StringArray_const_iterator;
|
||||
|
||||
typedef String * StringBuilder;
|
||||
typedef std::string * StringBuilder;
|
||||
</pre>
|
||||
|
||||
<p>where</p>
|
||||
@@ -905,7 +905,7 @@ typedef String * StringBuilder;
|
||||
have worked on all C++ implementations tested at present. If they break
|
||||
in a future implementation they should be changes via "#ifdef"
|
||||
preprocessor statements.</dd>
|
||||
<dt>String</dt>
|
||||
<dt>std::string</dt>
|
||||
<dd>pvData requires that a string be an immutable string that is transfered
|
||||
over the network as a UTF8 encoded string. Since std::string implements
|
||||
copy on write semantics, it can be used for support for immutable
|
||||
@@ -914,8 +914,8 @@ typedef String * StringBuilder;
|
||||
is the same convention the Java implementation uses.
|
||||
Note that string is treated like a primitive type.</dd>
|
||||
<dt>StringArray definitions</dt>
|
||||
<dd>typedefs are provided for an array of Strings,
|
||||
which is a std::vector<String>.
|
||||
<dd>typedefs are provided for an array of std::strings,
|
||||
which is a std::vector<std::string>.
|
||||
This is used by introspection.
|
||||
</dd>
|
||||
<dt>StringBuilder</dt>
|
||||
@@ -993,7 +993,7 @@ public:
|
||||
bool isUInteger(ScalarType type);
|
||||
bool isNumeric(ScalarType type);
|
||||
bool isPrimitive(ScalarType type);
|
||||
ScalarType getScalarType(String const &value);
|
||||
ScalarType getScalarType(std::string const &value);
|
||||
const char* name(ScalarType);
|
||||
void toString(StringBuilder buf,ScalarType scalarType);
|
||||
size_t elementSize(ScalarType id);
|
||||
@@ -1072,7 +1072,7 @@ public:
|
||||
<dt>name</dt>
|
||||
<dd>Returns the name of the scalarType.</dd>
|
||||
<dt>getScalarType</dt>
|
||||
<dd>Given a string of the form String("boolean"),...,String("string")
|
||||
<dd>Given a string of the form std::string("boolean"),...,std::string("string")
|
||||
return the scalarType.</dd>
|
||||
<dt>toString</dt>
|
||||
<dd>Convert the scalar type to a string.</dd>
|
||||
@@ -1158,7 +1158,7 @@ public:
|
||||
POINTER_DEFINITIONS(Field);
|
||||
virtual ~Field();
|
||||
Type getType() const{return m_type;}
|
||||
virtual String getID() const = 0;
|
||||
virtual std::string getID() const = 0;
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
...
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
ScalarType getScalarType() const {return scalarType;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableContol *control);
|
||||
...
|
||||
@@ -1190,7 +1190,7 @@ public:
|
||||
ScalarType getElementType() const {return elementType;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
...
|
||||
@@ -1204,7 +1204,7 @@ public:
|
||||
|
||||
StructureConstPtr getStructure() const {return pstructure;}
|
||||
virtual void toString(StringBuilder buf,int indentLevel=0) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
...
|
||||
@@ -1217,14 +1217,14 @@ public:
|
||||
typedef const Structure& const_reference;
|
||||
|
||||
std::size_t getNumberFields() const {return numberFields;}
|
||||
FieldConstPtr getField(String const & fieldName) const;
|
||||
FieldConstPtr getField(std::string const & fieldName) const;
|
||||
FieldConstPtr getField(std::size_t index) const;
|
||||
std::size_t getFieldIndex(String const &fieldName) const;
|
||||
std::size_t getFieldIndex(std::string const &fieldName) const;
|
||||
FieldConstPtrArray const & getFields() const {return fields;}
|
||||
StringArray const & getFieldNames() const;
|
||||
String getFieldName(std::size_t fieldIndex) const;
|
||||
std::string getFieldName(std::size_t fieldIndex) const;
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
...
|
||||
@@ -1233,23 +1233,23 @@ public:
|
||||
class epicsShareClass Union : public Field {
|
||||
public:
|
||||
POINTER_DEFINITIONS(Union);
|
||||
static epics::pvData::String DEFAULT_ID;
|
||||
static epics::pvData::String ANY_ID;
|
||||
static std::string DEFAULT_ID;
|
||||
static std::string ANY_ID;
|
||||
virtual ~Union();
|
||||
typedef Union& reference;
|
||||
typedef const Union& const_reference;
|
||||
|
||||
std::size_t getNumberFields() const;
|
||||
FieldConstPtr getField(String const &fieldName) const;
|
||||
FieldConstPtr getField(std::string const &fieldName) const;
|
||||
FieldConstPtr getField(std::size_t index);
|
||||
std::size_t getFieldIndex(String const &fieldName) const;
|
||||
std::size_t getFieldIndex(std::string const &fieldName) const;
|
||||
FieldConstPtrArray const & getFields() const;
|
||||
StringArray const & getFieldNames() const;
|
||||
String getFieldName(std::size_t fieldIndex) const;
|
||||
std::string getFieldName(std::size_t fieldIndex) const;
|
||||
bool isVariant() const;
|
||||
virtual void toString(StringBuilder buf) const;
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(
|
||||
ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(
|
||||
@@ -1265,7 +1265,7 @@ public:
|
||||
UnionConstPtr getUnion() const {return punion;}
|
||||
virtual void toString(StringBuilder buf,int indentLevel=0) const;
|
||||
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
@@ -1395,14 +1395,14 @@ public:
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
StructureConstPtr createStructure (
|
||||
String const & id,
|
||||
std::string const & id,
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
UnionConstPtr createUnion (
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
UnionConstPtr createUnion (
|
||||
String const & id,
|
||||
std::string const & id,
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
UnionConstPtr createVariantUnion() const;
|
||||
@@ -1410,7 +1410,7 @@ public:
|
||||
UnionArrayConstPtr createUnionArray(UnionConstPtr const & punion) const;
|
||||
StructureConstPtr appendField(
|
||||
StructureConstPtr const & structure,
|
||||
String const & fieldName, FieldConstPtr const & field) const;
|
||||
std::string const & fieldName, FieldConstPtr const & field) const;
|
||||
StructureConstPtr appendFields(
|
||||
StructureConstPtr const & structure,
|
||||
StringArray const & fieldNames,
|
||||
@@ -1480,7 +1480,7 @@ StructureConstPtr structure =
|
||||
add("index", pvDouble)->
|
||||
addArray("choices", pvString)->
|
||||
createStructure();
|
||||
String builder;
|
||||
std::string builder;
|
||||
structure->toString(&builder);
|
||||
cout << builder << endl;
|
||||
</pre>
|
||||
@@ -1698,18 +1698,18 @@ class StandardField {
|
||||
public:
|
||||
static StandardFieldPtr getStandardField();
|
||||
~StandardField();
|
||||
StructureConstPtr scalar(ScalarType type,String const &properties);
|
||||
StructureConstPtr scalar(ScalarType type,std::string const &properties);
|
||||
StructureConstPtr regUnion(
|
||||
UnionConstPtr const & punion,
|
||||
String const & properties);
|
||||
StructureConstPtr variantUnion(String const & properties);
|
||||
std::string const & properties);
|
||||
StructureConstPtr variantUnion(std::string const & properties);
|
||||
StructureConstPtr scalarArray(
|
||||
ScalarType elementType, String const &properties);
|
||||
ScalarType elementType, std::string const &properties);
|
||||
StructureConstPtr structureArray(
|
||||
StructureConstPtr const & structure,String const &properties);
|
||||
StructureConstPtr unionArray(UnionConstPtr const & punion,String const & properties);
|
||||
StructureConstPtr const & structure,std::string const &properties);
|
||||
StructureConstPtr unionArray(UnionConstPtr const & punion,std::string const & properties);
|
||||
StructureConstPtr enumerated();
|
||||
StructureConstPtr enumerated(String const &properties);
|
||||
StructureConstPtr enumerated(std::string const &properties);
|
||||
StructureConstPtr alarm();
|
||||
StructureConstPtr timeStamp();
|
||||
StructureConstPtr display();
|
||||
@@ -1879,7 +1879,7 @@ typedef PVValueArray<uint32> PVUIntArray;
|
||||
typedef PVValueArray<uint64> PVULongArray;
|
||||
typedef PVValueArray<float> PVFloatArray;
|
||||
typedef PVValueArray<double> PVDoubleArray;
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
|
||||
typedef std::tr1::shared_ptr<PVBooleanArray> PVBooleanArrayPtr;
|
||||
typedef std::tr1::shared_ptr<PVByteArray> PVByteArrayPtr;
|
||||
@@ -1916,8 +1916,8 @@ class PVField
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
String getFieldName() const ;
|
||||
String getFullName() const;
|
||||
std::string getFieldName() const ;
|
||||
std::string getFullName() const;
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
std::size_t getNumberFields() const;
|
||||
@@ -2085,7 +2085,7 @@ typedef std::tr1::shared_ptr<PVDouble> PVDoublePtr;
|
||||
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -2177,18 +2177,18 @@ public:
|
||||
return std::tr1::dynamic_pointer_cast<PVT>(select(index));
|
||||
}
|
||||
|
||||
PVFieldPtr select(String const & fieldName);
|
||||
PVFieldPtr select(std::string const & fieldName);
|
||||
|
||||
template<typename PVT>
|
||||
std::tr1::shared_ptr<PVT> select(String const & fieldName) {
|
||||
std::tr1::shared_ptr<PVT> select(std::string const & fieldName) {
|
||||
return std::tr1::dynamic_pointer_cast<PVT>(select(fieldName));
|
||||
}
|
||||
|
||||
int32 getSelectedIndex() const;
|
||||
String getSelectedFieldName() const;
|
||||
std::string getSelectedFieldName() const;
|
||||
void set(PVFieldPtr const & value);
|
||||
void set(int32 index, PVFieldPtr const & value);
|
||||
void set(String const & fieldName, PVFieldPtr const & value);
|
||||
void set(std::string const & fieldName, PVFieldPtr const & value);
|
||||
virtual void serialize(
|
||||
ByteBuffer *pbuffer,SerializableControl *pflusher) const ;
|
||||
PVUnion(UnionConstPtr const & punion);
|
||||
@@ -2328,10 +2328,10 @@ public:
|
||||
virtual void setImmutable();
|
||||
StructureConstPtr getStructure() const;
|
||||
const PVFieldPtrArray & getPVFields() const;
|
||||
PVFieldPtr getSubField(String const &fieldName) const;
|
||||
PVFieldPtr getSubField(std::string const &fieldName) const;
|
||||
|
||||
template<typename PVT>
|
||||
std::tr1::shared_ptr<PVT> getSubField(String const &fieldName) const
|
||||
std::tr1::shared_ptr<PVT> getSubField(std::string const &fieldName) const
|
||||
|
||||
PVFieldPtr getSubField(std::size_t fieldOffset) const;
|
||||
|
||||
@@ -2358,7 +2358,7 @@ public:
|
||||
<dt>getPVFields</dt>
|
||||
<dd>Returns the array of subfields. The set of subfields must all have
|
||||
different field names.</dd>
|
||||
<dt>getSubField(String fieldName)</dt>
|
||||
<dt>getSubField(std::string fieldName)</dt>
|
||||
<dd>
|
||||
Get a subField of a field.d
|
||||
A non-null result is
|
||||
@@ -2694,12 +2694,12 @@ class StandardPVField : private NoDefaultMethods {
|
||||
public:
|
||||
static StandardPVFieldPtr getStandardPVField();
|
||||
~StandardPVField();
|
||||
PVStructurePtr scalar(ScalarType type,String const &properties);
|
||||
PVStructurePtr scalarArray(ScalarType elementType, String const &properties);
|
||||
PVStructurePtr structureArray(StructureConstPtr const &structure,String const &properties);
|
||||
PVStructurePtr unionArray(UnionConstPtr const &punion,String const &properties);
|
||||
PVStructurePtr scalar(ScalarType type,std::string const &properties);
|
||||
PVStructurePtr scalarArray(ScalarType elementType, std::string const &properties);
|
||||
PVStructurePtr structureArray(StructureConstPtr const &structure,std::string const &properties);
|
||||
PVStructurePtr unionArray(UnionConstPtr const &punion,std::string const &properties);
|
||||
PVStructurePtr enumerated(StringArray const &choices);
|
||||
PVStructurePtr enumerated(StringArray const &choices, String const &properties);
|
||||
PVStructurePtr enumerated(StringArray const &choices, std::string const &properties);
|
||||
...
|
||||
}
|
||||
|
||||
@@ -2786,8 +2786,8 @@ public:
|
||||
PVStructurePtr const &pv,
|
||||
StringArray const & from,
|
||||
std::size_t fromStartIndex = 0);
|
||||
void fromString(PVScalarPtr const & pv, String const & from);
|
||||
std::size_t fromString(PVScalarArrayPtr const & pv, String const &from);
|
||||
void fromString(PVScalarPtr const & pv, std::string const & from);
|
||||
std::size_t fromString(PVScalarArrayPtr const & pv, std::string const &from);
|
||||
std::size_t fromStringArray(
|
||||
PVScalarArrayPtr const & pv,
|
||||
std::size_t offset, std::size_t length,
|
||||
@@ -2832,7 +2832,7 @@ public:
|
||||
uint64 toULong(PVScalarPtr const & pv);
|
||||
float toFloat(PVScalarPtr const & pv);
|
||||
double toDouble(PVScalarPtr const & pv);
|
||||
String toString(PVScalarPtr const & pv);
|
||||
std::string toString(PVScalarPtr const & pv);
|
||||
void fromByte(PVScalarPtr const & pv,int8 from);
|
||||
void fromShort(PVScalarPtr const & pv,int16 from);
|
||||
void fromInt(PVScalarPtr const & pv, int32 from);
|
||||
@@ -3068,7 +3068,7 @@ stack. For example the following is permitted:</p>
|
||||
result = pvAlarm.attach(pvField);
|
||||
assert(result);
|
||||
Alarm al;
|
||||
al.setMessage(String("testMessage"));
|
||||
al.setMessage(std::string("testMessage"));
|
||||
al.setSeverity(majorAlarm);
|
||||
result = pvAlarm.set(al);
|
||||
assert(result);
|
||||
@@ -3306,8 +3306,8 @@ class Alarm {
|
||||
public:
|
||||
Alarm();
|
||||
//default constructors and destructor are OK
|
||||
String getMessage();
|
||||
void setMessage(String const &value);
|
||||
std::string getMessage();
|
||||
void setMessage(std::string const &value);
|
||||
AlarmSeverity getSeverity() const;
|
||||
void setSeverity(AlarmSeverity value);
|
||||
AlarmStatus getStatus() const;
|
||||
@@ -3505,12 +3505,12 @@ public:
|
||||
double getHigh() const;
|
||||
void setLow(double value);
|
||||
void setHigh(double value);
|
||||
String getDescription() const;
|
||||
void setDescription(String const &value);
|
||||
String getFormat() const;
|
||||
void setFormat(String const &value);
|
||||
String getUnits() const;
|
||||
void setUnits(String const &value);
|
||||
std::string getDescription() const;
|
||||
void setDescription(std::string const &value);
|
||||
std::string getFormat() const;
|
||||
void setFormat(std::string const &value);
|
||||
std::string getUnits() const;
|
||||
void setUnits(std::string const &value);
|
||||
};</pre>
|
||||
|
||||
<p>where</p>
|
||||
@@ -3599,7 +3599,7 @@ public:
|
||||
// a set returns false if field is immutable
|
||||
bool setIndex(int32 index);
|
||||
int32 getIndex();
|
||||
String getChoice();
|
||||
std::string getChoice();
|
||||
bool choicesMutable();
|
||||
StringArrayPtr const & getChoices();
|
||||
int32 getNumberChoices();
|
||||
@@ -3624,7 +3624,7 @@ public:
|
||||
<dt>getIndex</dt>
|
||||
<dd>Get the index field in the pvData structure. </dd>
|
||||
<dt>getChoice</dt>
|
||||
<dd>Get the String value corresponding to the current index field in the
|
||||
<dd>Get the std::string value corresponding to the current index field in the
|
||||
pvData structure. An exception is thrown if not attached to a pvData
|
||||
structure. </dd>
|
||||
<dt>choicesMutable</dt>
|
||||
@@ -3990,7 +3990,7 @@ private:
|
||||
class Executor : public Runnable{
|
||||
public:
|
||||
POINTER_DEFINITIONS(Executor);
|
||||
Executor(String threadName,ThreadPriority priority);
|
||||
Executor(std::string threadName,ThreadPriority priority);
|
||||
~Executor();
|
||||
void execute(CommandPtr const &node);
|
||||
virtual void run();
|
||||
@@ -4123,7 +4123,7 @@ typedef std::tr1::shared_ptr<MessageQueue> MessageQueuePtr;
|
||||
|
||||
class MessageNode {
|
||||
public:
|
||||
String getMessage() const;
|
||||
std::string getMessage() const;
|
||||
MessageType getMessageType() const;
|
||||
void setMessageNull();
|
||||
};
|
||||
@@ -4138,7 +4138,7 @@ public:
|
||||
// must call release before next get
|
||||
void release();
|
||||
// return (false,true) if message (was not, was) put into queue
|
||||
bool put(String message,MessageType messageType,bool replaceLast);
|
||||
bool put(std::string message,MessageType messageType,bool replaceLast);
|
||||
bool isEmpty() ;
|
||||
bool isFull() ;
|
||||
int getClearOverrun();
|
||||
@@ -4299,14 +4299,14 @@ enum MessageType {
|
||||
infoMessage,warningMessage,errorMessage,fatalErrorMessage
|
||||
};
|
||||
|
||||
extern String getMessageTypeName(MessageType messageType);
|
||||
extern std::string getMessageTypeName(MessageType messageType);
|
||||
extern const size_t messageTypeCount;
|
||||
class Requester {
|
||||
public:
|
||||
POINTER_DEFINITIONS(Requester);
|
||||
virtual ~Requester(){}
|
||||
virtual String getRequesterName() = 0;
|
||||
virtual void message(String const & message,MessageType messageType) = 0;
|
||||
virtual std::string getRequesterName() = 0;
|
||||
virtual void message(std::string const & message,MessageType messageType) = 0;
|
||||
};</pre>
|
||||
|
||||
<p>where</p>
|
||||
@@ -4316,7 +4316,7 @@ public:
|
||||
<dd>Type of message.</dd>
|
||||
<dt>messageTypeName</dt>
|
||||
<dd>An array of strings of the message type names, i.e.
|
||||
String("info"),String("warning"),String("error"),String("fatalError").</dd>
|
||||
std::string("info"),std::string("warning"),std::string("error"),std::string("fatalError").</dd>
|
||||
<dt>getRequesterName</dt>
|
||||
<dd>Returns the requester name.</dd>
|
||||
<dt>message</dt>
|
||||
@@ -4390,12 +4390,12 @@ public:
|
||||
SerializableControl* flusher);
|
||||
static int readSize(ByteBuffer* buffer,
|
||||
DeserializableControl* control);
|
||||
static void serializeString(const String& value,
|
||||
static void serializeString(const std::string& value,
|
||||
ByteBuffer* buffer,SerializableControl* flusher);
|
||||
static void serializeSubstring(const String& value, int offset,
|
||||
static void serializeSubstring(const std::string& value, int offset,
|
||||
int count, ByteBuffer* buffer,
|
||||
SerializableControl* flusher);
|
||||
static String deserializeString(ByteBuffer* buffer,
|
||||
static std::string deserializeString(ByteBuffer* buffer,
|
||||
DeserializableControl* control);
|
||||
...
|
||||
};</pre>
|
||||
@@ -4407,7 +4407,7 @@ public:
|
||||
<dt>readSize</dt>
|
||||
<dd>Deserialize the size.</dd>
|
||||
<dt>serializeString</dt>
|
||||
<dd>Serialize a String.</dd>
|
||||
<dd>Serialize a std::string.</dd>
|
||||
<dt>serializeSubstring</dt>
|
||||
<dd>Serialize a substring.</dd>
|
||||
<dt>deserializeString</dt>
|
||||
@@ -4634,15 +4634,15 @@ Also he should check for correct descriptions.
|
||||
static const char* StatusTypeName[];
|
||||
static Status OK;
|
||||
Status();
|
||||
Status(StatusType type, epics::pvData::String const & message);
|
||||
Status(StatusType type, epics::pvData::String const & message, epics::pvData::String stackDump);
|
||||
Status(StatusType type, std::string const & message);
|
||||
Status(StatusType type, std::string const & message, std::string stackDump);
|
||||
~Status()
|
||||
StatusType getType() const;
|
||||
String getMessage() const;
|
||||
String getStackDump() const;
|
||||
std::string getMessage() const;
|
||||
std::string getStackDump() const;
|
||||
bool isOK() const;
|
||||
bool isSuccess() const;
|
||||
String toString() const;
|
||||
std::string toString() const;
|
||||
void toString(StringBuilder buffer, int indentLevel = 0) const;
|
||||
void serialize(ByteBuffer *buffer, SerializableControl *flusher) const;
|
||||
void serialize(ByteBuffer *buffer, SerializableControl *flusher) const;
|
||||
@@ -4703,7 +4703,7 @@ class Thread;
|
||||
class Thread : public epicsThread, private NoDefaultMethods {
|
||||
public:
|
||||
Thread(
|
||||
String name,
|
||||
std::string name,
|
||||
ThreadPriority priority,
|
||||
Runnable *runnableReady,
|
||||
epicsThreadStackSizeClass stkcls=epicsThreadStackSmall);
|
||||
@@ -4802,7 +4802,7 @@ public:
|
||||
class Timer : private Runnable {
|
||||
public:
|
||||
POINTER_DEFINITIONS(Timer);
|
||||
Timer(String threadName, ThreadPriority priority);
|
||||
Timer(std::string threadName, ThreadPriority priority);
|
||||
virtual ~Timer();
|
||||
virtual void run();
|
||||
void scheduleAfterDelay(
|
||||
@@ -4971,8 +4971,8 @@ then passes it to pvCopy.
|
||||
class CreateRequest {
|
||||
...
|
||||
static CreateRequestPtr create();
|
||||
virtual PVStructurePtr createRequest(String const &request);
|
||||
String getMessage();
|
||||
virtual PVStructurePtr createRequest(std::string const &request);
|
||||
std::string getMessage();
|
||||
};
|
||||
</pre>
|
||||
<p>An example of how it is used is:</p>
|
||||
@@ -4980,7 +4980,7 @@ class CreateRequest {
|
||||
CreateRequestPtr createRequest = CreateRequest::create();
|
||||
PVStructurePtr pvRequest = createRequest->createRequest(request);
|
||||
if(pvRequest==NULL) {
|
||||
String error = createRequest->getMessage();
|
||||
std::string error = createRequest->getMessage();
|
||||
// take some action
|
||||
} else {
|
||||
//success do something
|
||||
@@ -5001,7 +5001,7 @@ class class epicsShareClass PVCopy
|
||||
static PVCopyPtr create(
|
||||
PVStructurePtr const &pvMaster,
|
||||
PVStructurePtr const &pvRequest,
|
||||
String const & structureName);
|
||||
std::string const & structureName);
|
||||
PVStructurePtr getPVMaster();
|
||||
void traverseMaster(PVCopyTraverseMasterCallbackPtr const & callback);
|
||||
StructureConstPtr getStructure();
|
||||
@@ -5074,7 +5074,7 @@ where
|
||||
<dt>getCopyOffset</dt>
|
||||
<dd>Given a field in pvMaster.
|
||||
return the offset in copy for the same field.
|
||||
A value of String::npos means that the copy does not have this field.
|
||||
A value of std::string::npos means that the copy does not have this field.
|
||||
Two overloaded methods are provided. The first is called if
|
||||
the field of master is not a structure. The second is for
|
||||
subfields of a structure.
|
||||
@@ -5245,7 +5245,7 @@ It has the methods:</p>
|
||||
<pre>
|
||||
class MonitorPlugin
|
||||
{
|
||||
virtual String const & getName() = 0;
|
||||
virtual std::string const & getName() = 0;
|
||||
virtual bool causeMonitor(
|
||||
PVFieldPtr const &pvField,
|
||||
PVStructurePtr const &pvTop,
|
||||
@@ -5264,16 +5264,16 @@ class MonitorPluginCreator
|
||||
FieldConstPtr const &field,
|
||||
StructureConstPtr const &top,
|
||||
PVStructurePtr const &pvFieldOptions) = 0;
|
||||
virtual String const & getName() = 0;
|
||||
virtual std::string const & getName() = 0;
|
||||
}
|
||||
|
||||
class MonitorPluginManager
|
||||
{
|
||||
static MonitorPluginManagerPtr get();
|
||||
bool addPlugin(
|
||||
String const &pluginName,
|
||||
std::string const &pluginName,
|
||||
MonitorPluginCreatorPtr const &creator);
|
||||
MonitorPluginCreatorPtr findPlugin(String const &pluginName);
|
||||
MonitorPluginCreatorPtr findPlugin(std::string const &pluginName);
|
||||
void showNames();
|
||||
};
|
||||
|
||||
@@ -5445,7 +5445,7 @@ will be passed to the client.
|
||||
Assume that the client has already connected to the channel.
|
||||
The client can then issue the commands:</p>
|
||||
<pre>
|
||||
String request("field(alarm[plugin=onChange]");
|
||||
std::string request("field(alarm[plugin=onChange]");
|
||||
request += ",timeStamp[plugin=onChange,raiseMonitor=false]";
|
||||
request += ",power.value[plugin=onChange";
|
||||
request += ",voltage.value[plugin=onChange";
|
||||
@@ -5481,13 +5481,13 @@ public:
|
||||
PVStringPtr pvString =
|
||||
pvFieldOptions->getSubField<PVString>("raiseMonitor");
|
||||
if(pvString!=NULL) {
|
||||
String value = pvString->get();
|
||||
std::string value = pvString->get();
|
||||
if(value.compare("false")==0) raiseMonitor = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual String &getName(){return pluginName;}
|
||||
virtual std::string &getName(){return pluginName;}
|
||||
virtual bool causeMonitor(
|
||||
PVFieldPtr const &pvNew,
|
||||
PVStructurePtr const &pvTop,
|
||||
@@ -5505,7 +5505,7 @@ private:
|
||||
class OnChangePluginCreator : public MonitorPluginCreator
|
||||
{
|
||||
public:
|
||||
virtual String &getName(){return pluginName;}
|
||||
virtual std::string &getName(){return pluginName;}
|
||||
virtual MonitorPluginPtr create(
|
||||
FieldConstPtr const &field,
|
||||
StructureConstPtr const &top,
|
||||
|
||||
@@ -145,7 +145,7 @@ After it is unzipped just edit configure/RELEASE.local and then execute make.
|
||||
</p>
|
||||
<p>The examples assume that the following statements have been issued:</p>
|
||||
<pre>
|
||||
String builder;
|
||||
std::string builder;
|
||||
FieldCreatePtr fieldCreate = getFieldCreate();
|
||||
PVDataCreatePtr pvDataCreate = getPVDataCreate();
|
||||
StandardFieldPtr standardField = getStandardField();
|
||||
@@ -876,21 +876,21 @@ typedef uint16_t uint16;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint64_t uint64;
|
||||
// float and double are types
|
||||
typedef std::string String;
|
||||
typedef std::string std::string;
|
||||
|
||||
typedef std::vector<String> StringArray;
|
||||
typedef std::vector<std::string> StringArray;
|
||||
typedef std::tr1::shared_ptr<StringArray> StringArrayPtr;
|
||||
inline String * get(StringArray &value);
|
||||
inline String const * get(StringArray const &value);
|
||||
inline String * get(StringArrayPtr &value);
|
||||
inline String const * get(StringArrayPtr const &value);
|
||||
inline std::string * get(StringArray &value);
|
||||
inline std::string const * get(StringArray const &value);
|
||||
inline std::string * get(StringArrayPtr &value);
|
||||
inline std::string const * get(StringArrayPtr const &value);
|
||||
}
|
||||
inline StringArray & getVector(StringArrayPtr &value);
|
||||
inline StringArray const & getVector(StringArrayPtr const &value);
|
||||
typedef std::vector<String>::iterator StringArray_iterator;
|
||||
typedef std::vector<String>::const_iterator StringArray_const_iterator;
|
||||
typedef std::vector<std::string>::iterator StringArray_iterator;
|
||||
typedef std::vector<std::string>::const_iterator StringArray_const_iterator;
|
||||
|
||||
typedef String * StringBuilder;
|
||||
typedef std::string * StringBuilder;
|
||||
</pre>
|
||||
|
||||
<p>where</p>
|
||||
@@ -905,7 +905,7 @@ typedef String * StringBuilder;
|
||||
have worked on all C++ implementations tested at present. If they break
|
||||
in a future implementation they should be changes via "#ifdef"
|
||||
preprocessor statements.</dd>
|
||||
<dt>String</dt>
|
||||
<dt>std::string</dt>
|
||||
<dd>pvData requires that a string be an immutable string that is transfered
|
||||
over the network as a UTF8 encoded string. Since std::string implements
|
||||
copy on write semantics, it can be used for support for immutable
|
||||
@@ -914,8 +914,8 @@ typedef String * StringBuilder;
|
||||
is the same convention the Java implementation uses.
|
||||
Note that string is treated like a primitive type.</dd>
|
||||
<dt>StringArray definitions</dt>
|
||||
<dd>typedefs are provided for an array of Strings,
|
||||
which is a std::vector<String>.
|
||||
<dd>typedefs are provided for an array of std::strings,
|
||||
which is a std::vector<std::string>.
|
||||
This is used by introspection.
|
||||
</dd>
|
||||
<dt>StringBuilder</dt>
|
||||
@@ -993,7 +993,7 @@ public:
|
||||
bool isUInteger(ScalarType type);
|
||||
bool isNumeric(ScalarType type);
|
||||
bool isPrimitive(ScalarType type);
|
||||
ScalarType getScalarType(String const &value);
|
||||
ScalarType getScalarType(std::string const &value);
|
||||
const char* name(ScalarType);
|
||||
void toString(StringBuilder buf,ScalarType scalarType);
|
||||
size_t elementSize(ScalarType id);
|
||||
@@ -1072,7 +1072,7 @@ public:
|
||||
<dt>name</dt>
|
||||
<dd>Returns the name of the scalarType.</dd>
|
||||
<dt>getScalarType</dt>
|
||||
<dd>Given a string of the form String("boolean"),...,String("string")
|
||||
<dd>Given a string of the form std::string("boolean"),...,std::string("string")
|
||||
return the scalarType.</dd>
|
||||
<dt>toString</dt>
|
||||
<dd>Convert the scalar type to a string.</dd>
|
||||
@@ -1158,7 +1158,7 @@ public:
|
||||
POINTER_DEFINITIONS(Field);
|
||||
virtual ~Field();
|
||||
Type getType() const{return m_type;}
|
||||
virtual String getID() const = 0;
|
||||
virtual std::string getID() const = 0;
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
...
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
ScalarType getScalarType() const {return scalarType;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableContol *control);
|
||||
...
|
||||
@@ -1190,7 +1190,7 @@ public:
|
||||
ScalarType getElementType() const {return elementType;}
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
...
|
||||
@@ -1204,7 +1204,7 @@ public:
|
||||
|
||||
StructureConstPtr getStructure() const {return pstructure;}
|
||||
virtual void toString(StringBuilder buf,int indentLevel=0) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
...
|
||||
@@ -1217,14 +1217,14 @@ public:
|
||||
typedef const Structure& const_reference;
|
||||
|
||||
std::size_t getNumberFields() const {return numberFields;}
|
||||
FieldConstPtr getField(String const & fieldName) const;
|
||||
FieldConstPtr getField(std::string const & fieldName) const;
|
||||
FieldConstPtr getField(std::size_t index) const;
|
||||
std::size_t getFieldIndex(String const &fieldName) const;
|
||||
std::size_t getFieldIndex(std::string const &fieldName) const;
|
||||
FieldConstPtrArray const & getFields() const {return fields;}
|
||||
StringArray const & getFieldNames() const;
|
||||
String getFieldName(std::size_t fieldIndex) const;
|
||||
std::string getFieldName(std::size_t fieldIndex) const;
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
...
|
||||
@@ -1233,23 +1233,23 @@ public:
|
||||
class epicsShareClass Union : public Field {
|
||||
public:
|
||||
POINTER_DEFINITIONS(Union);
|
||||
static epics::pvData::String DEFAULT_ID;
|
||||
static epics::pvData::String ANY_ID;
|
||||
static std::string DEFAULT_ID;
|
||||
static std::string ANY_ID;
|
||||
virtual ~Union();
|
||||
typedef Union& reference;
|
||||
typedef const Union& const_reference;
|
||||
|
||||
std::size_t getNumberFields() const;
|
||||
FieldConstPtr getField(String const &fieldName) const;
|
||||
FieldConstPtr getField(std::string const &fieldName) const;
|
||||
FieldConstPtr getField(std::size_t index);
|
||||
std::size_t getFieldIndex(String const &fieldName) const;
|
||||
std::size_t getFieldIndex(std::string const &fieldName) const;
|
||||
FieldConstPtrArray const & getFields() const;
|
||||
StringArray const & getFieldNames() const;
|
||||
String getFieldName(std::size_t fieldIndex) const;
|
||||
std::string getFieldName(std::size_t fieldIndex) const;
|
||||
bool isVariant() const;
|
||||
virtual void toString(StringBuilder buf) const;
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
virtual void serialize(
|
||||
ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(
|
||||
@@ -1265,7 +1265,7 @@ public:
|
||||
UnionConstPtr getUnion() const {return punion;}
|
||||
virtual void toString(StringBuilder buf,int indentLevel=0) const;
|
||||
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
@@ -1395,14 +1395,14 @@ public:
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
StructureConstPtr createStructure (
|
||||
String const & id,
|
||||
std::string const & id,
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
UnionConstPtr createUnion (
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
UnionConstPtr createUnion (
|
||||
String const & id,
|
||||
std::string const & id,
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
UnionConstPtr createVariantUnion() const;
|
||||
@@ -1410,7 +1410,7 @@ public:
|
||||
UnionArrayConstPtr createUnionArray(UnionConstPtr const & punion) const;
|
||||
StructureConstPtr appendField(
|
||||
StructureConstPtr const & structure,
|
||||
String const & fieldName, FieldConstPtr const & field) const;
|
||||
std::string const & fieldName, FieldConstPtr const & field) const;
|
||||
StructureConstPtr appendFields(
|
||||
StructureConstPtr const & structure,
|
||||
StringArray const & fieldNames,
|
||||
@@ -1480,7 +1480,7 @@ StructureConstPtr structure =
|
||||
add("index", pvDouble)->
|
||||
addArray("choices", pvString)->
|
||||
createStructure();
|
||||
String builder;
|
||||
std::string builder;
|
||||
structure->toString(&builder);
|
||||
cout << builder << endl;
|
||||
</pre>
|
||||
@@ -1698,18 +1698,18 @@ class StandardField {
|
||||
public:
|
||||
static StandardFieldPtr getStandardField();
|
||||
~StandardField();
|
||||
StructureConstPtr scalar(ScalarType type,String const &properties);
|
||||
StructureConstPtr scalar(ScalarType type,std::string const &properties);
|
||||
StructureConstPtr regUnion(
|
||||
UnionConstPtr const & punion,
|
||||
String const & properties);
|
||||
StructureConstPtr variantUnion(String const & properties);
|
||||
std::string const & properties);
|
||||
StructureConstPtr variantUnion(std::string const & properties);
|
||||
StructureConstPtr scalarArray(
|
||||
ScalarType elementType, String const &properties);
|
||||
ScalarType elementType, std::string const &properties);
|
||||
StructureConstPtr structureArray(
|
||||
StructureConstPtr const & structure,String const &properties);
|
||||
StructureConstPtr unionArray(UnionConstPtr const & punion,String const & properties);
|
||||
StructureConstPtr const & structure,std::string const &properties);
|
||||
StructureConstPtr unionArray(UnionConstPtr const & punion,std::string const & properties);
|
||||
StructureConstPtr enumerated();
|
||||
StructureConstPtr enumerated(String const &properties);
|
||||
StructureConstPtr enumerated(std::string const &properties);
|
||||
StructureConstPtr alarm();
|
||||
StructureConstPtr timeStamp();
|
||||
StructureConstPtr display();
|
||||
@@ -1879,7 +1879,7 @@ typedef PVValueArray<uint32> PVUIntArray;
|
||||
typedef PVValueArray<uint64> PVULongArray;
|
||||
typedef PVValueArray<float> PVFloatArray;
|
||||
typedef PVValueArray<double> PVDoubleArray;
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
|
||||
typedef std::tr1::shared_ptr<PVBooleanArray> PVBooleanArrayPtr;
|
||||
typedef std::tr1::shared_ptr<PVByteArray> PVByteArrayPtr;
|
||||
@@ -1916,8 +1916,8 @@ class PVField
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
String getFieldName() const ;
|
||||
String getFullName() const;
|
||||
std::string getFieldName() const ;
|
||||
std::string getFullName() const;
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
std::size_t getNumberFields() const;
|
||||
@@ -2085,7 +2085,7 @@ typedef std::tr1::shared_ptr<PVDouble> PVDoublePtr;
|
||||
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -2177,18 +2177,18 @@ public:
|
||||
return std::tr1::dynamic_pointer_cast<PVT>(select(index));
|
||||
}
|
||||
|
||||
PVFieldPtr select(String const & fieldName);
|
||||
PVFieldPtr select(std::string const & fieldName);
|
||||
|
||||
template<typename PVT>
|
||||
std::tr1::shared_ptr<PVT> select(String const & fieldName) {
|
||||
std::tr1::shared_ptr<PVT> select(std::string const & fieldName) {
|
||||
return std::tr1::dynamic_pointer_cast<PVT>(select(fieldName));
|
||||
}
|
||||
|
||||
int32 getSelectedIndex() const;
|
||||
String getSelectedFieldName() const;
|
||||
std::string getSelectedFieldName() const;
|
||||
void set(PVFieldPtr const & value);
|
||||
void set(int32 index, PVFieldPtr const & value);
|
||||
void set(String const & fieldName, PVFieldPtr const & value);
|
||||
void set(std::string const & fieldName, PVFieldPtr const & value);
|
||||
virtual void serialize(
|
||||
ByteBuffer *pbuffer,SerializableControl *pflusher) const ;
|
||||
PVUnion(UnionConstPtr const & punion);
|
||||
@@ -2328,10 +2328,10 @@ public:
|
||||
virtual void setImmutable();
|
||||
StructureConstPtr getStructure() const;
|
||||
const PVFieldPtrArray & getPVFields() const;
|
||||
PVFieldPtr getSubField(String const &fieldName) const;
|
||||
PVFieldPtr getSubField(std::string const &fieldName) const;
|
||||
|
||||
template<typename PVT>
|
||||
std::tr1::shared_ptr<PVT> getSubField(String const &fieldName) const
|
||||
std::tr1::shared_ptr<PVT> getSubField(std::string const &fieldName) const
|
||||
|
||||
PVFieldPtr getSubField(std::size_t fieldOffset) const;
|
||||
|
||||
@@ -2358,7 +2358,7 @@ public:
|
||||
<dt>getPVFields</dt>
|
||||
<dd>Returns the array of subfields. The set of subfields must all have
|
||||
different field names.</dd>
|
||||
<dt>getSubField(String fieldName)</dt>
|
||||
<dt>getSubField(std::string fieldName)</dt>
|
||||
<dd>
|
||||
Get a subField of a field.d
|
||||
A non-null result is
|
||||
@@ -2694,12 +2694,12 @@ class StandardPVField : private NoDefaultMethods {
|
||||
public:
|
||||
static StandardPVFieldPtr getStandardPVField();
|
||||
~StandardPVField();
|
||||
PVStructurePtr scalar(ScalarType type,String const &properties);
|
||||
PVStructurePtr scalarArray(ScalarType elementType, String const &properties);
|
||||
PVStructurePtr structureArray(StructureConstPtr const &structure,String const &properties);
|
||||
PVStructurePtr unionArray(UnionConstPtr const &punion,String const &properties);
|
||||
PVStructurePtr scalar(ScalarType type,std::string const &properties);
|
||||
PVStructurePtr scalarArray(ScalarType elementType, std::string const &properties);
|
||||
PVStructurePtr structureArray(StructureConstPtr const &structure,std::string const &properties);
|
||||
PVStructurePtr unionArray(UnionConstPtr const &punion,std::string const &properties);
|
||||
PVStructurePtr enumerated(StringArray const &choices);
|
||||
PVStructurePtr enumerated(StringArray const &choices, String const &properties);
|
||||
PVStructurePtr enumerated(StringArray const &choices, std::string const &properties);
|
||||
...
|
||||
}
|
||||
|
||||
@@ -2786,8 +2786,8 @@ public:
|
||||
PVStructurePtr const &pv,
|
||||
StringArray const & from,
|
||||
std::size_t fromStartIndex = 0);
|
||||
void fromString(PVScalarPtr const & pv, String const & from);
|
||||
std::size_t fromString(PVScalarArrayPtr const & pv, String const &from);
|
||||
void fromString(PVScalarPtr const & pv, std::string const & from);
|
||||
std::size_t fromString(PVScalarArrayPtr const & pv, std::string const &from);
|
||||
std::size_t fromStringArray(
|
||||
PVScalarArrayPtr const & pv,
|
||||
std::size_t offset, std::size_t length,
|
||||
@@ -2832,7 +2832,7 @@ public:
|
||||
uint64 toULong(PVScalarPtr const & pv);
|
||||
float toFloat(PVScalarPtr const & pv);
|
||||
double toDouble(PVScalarPtr const & pv);
|
||||
String toString(PVScalarPtr const & pv);
|
||||
std::string toString(PVScalarPtr const & pv);
|
||||
void fromByte(PVScalarPtr const & pv,int8 from);
|
||||
void fromShort(PVScalarPtr const & pv,int16 from);
|
||||
void fromInt(PVScalarPtr const & pv, int32 from);
|
||||
@@ -3068,7 +3068,7 @@ stack. For example the following is permitted:</p>
|
||||
result = pvAlarm.attach(pvField);
|
||||
assert(result);
|
||||
Alarm al;
|
||||
al.setMessage(String("testMessage"));
|
||||
al.setMessage(std::string("testMessage"));
|
||||
al.setSeverity(majorAlarm);
|
||||
result = pvAlarm.set(al);
|
||||
assert(result);
|
||||
@@ -3306,8 +3306,8 @@ class Alarm {
|
||||
public:
|
||||
Alarm();
|
||||
//default constructors and destructor are OK
|
||||
String getMessage();
|
||||
void setMessage(String const &value);
|
||||
std::string getMessage();
|
||||
void setMessage(std::string const &value);
|
||||
AlarmSeverity getSeverity() const;
|
||||
void setSeverity(AlarmSeverity value);
|
||||
AlarmStatus getStatus() const;
|
||||
@@ -3505,12 +3505,12 @@ public:
|
||||
double getHigh() const;
|
||||
void setLow(double value);
|
||||
void setHigh(double value);
|
||||
String getDescription() const;
|
||||
void setDescription(String const &value);
|
||||
String getFormat() const;
|
||||
void setFormat(String const &value);
|
||||
String getUnits() const;
|
||||
void setUnits(String const &value);
|
||||
std::string getDescription() const;
|
||||
void setDescription(std::string const &value);
|
||||
std::string getFormat() const;
|
||||
void setFormat(std::string const &value);
|
||||
std::string getUnits() const;
|
||||
void setUnits(std::string const &value);
|
||||
};</pre>
|
||||
|
||||
<p>where</p>
|
||||
@@ -3599,7 +3599,7 @@ public:
|
||||
// a set returns false if field is immutable
|
||||
bool setIndex(int32 index);
|
||||
int32 getIndex();
|
||||
String getChoice();
|
||||
std::string getChoice();
|
||||
bool choicesMutable();
|
||||
StringArrayPtr const & getChoices();
|
||||
int32 getNumberChoices();
|
||||
@@ -3624,7 +3624,7 @@ public:
|
||||
<dt>getIndex</dt>
|
||||
<dd>Get the index field in the pvData structure. </dd>
|
||||
<dt>getChoice</dt>
|
||||
<dd>Get the String value corresponding to the current index field in the
|
||||
<dd>Get the std::string value corresponding to the current index field in the
|
||||
pvData structure. An exception is thrown if not attached to a pvData
|
||||
structure. </dd>
|
||||
<dt>choicesMutable</dt>
|
||||
@@ -3990,7 +3990,7 @@ private:
|
||||
class Executor : public Runnable{
|
||||
public:
|
||||
POINTER_DEFINITIONS(Executor);
|
||||
Executor(String threadName,ThreadPriority priority);
|
||||
Executor(std::string threadName,ThreadPriority priority);
|
||||
~Executor();
|
||||
void execute(CommandPtr const &node);
|
||||
virtual void run();
|
||||
@@ -4123,7 +4123,7 @@ typedef std::tr1::shared_ptr<MessageQueue> MessageQueuePtr;
|
||||
|
||||
class MessageNode {
|
||||
public:
|
||||
String getMessage() const;
|
||||
std::string getMessage() const;
|
||||
MessageType getMessageType() const;
|
||||
void setMessageNull();
|
||||
};
|
||||
@@ -4138,7 +4138,7 @@ public:
|
||||
// must call release before next get
|
||||
void release();
|
||||
// return (false,true) if message (was not, was) put into queue
|
||||
bool put(String message,MessageType messageType,bool replaceLast);
|
||||
bool put(std::string message,MessageType messageType,bool replaceLast);
|
||||
bool isEmpty() ;
|
||||
bool isFull() ;
|
||||
int getClearOverrun();
|
||||
@@ -4299,14 +4299,14 @@ enum MessageType {
|
||||
infoMessage,warningMessage,errorMessage,fatalErrorMessage
|
||||
};
|
||||
|
||||
extern String getMessageTypeName(MessageType messageType);
|
||||
extern std::string getMessageTypeName(MessageType messageType);
|
||||
extern const size_t messageTypeCount;
|
||||
class Requester {
|
||||
public:
|
||||
POINTER_DEFINITIONS(Requester);
|
||||
virtual ~Requester(){}
|
||||
virtual String getRequesterName() = 0;
|
||||
virtual void message(String const & message,MessageType messageType) = 0;
|
||||
virtual std::string getRequesterName() = 0;
|
||||
virtual void message(std::string const & message,MessageType messageType) = 0;
|
||||
};</pre>
|
||||
|
||||
<p>where</p>
|
||||
@@ -4316,7 +4316,7 @@ public:
|
||||
<dd>Type of message.</dd>
|
||||
<dt>messageTypeName</dt>
|
||||
<dd>An array of strings of the message type names, i.e.
|
||||
String("info"),String("warning"),String("error"),String("fatalError").</dd>
|
||||
std::string("info"),std::string("warning"),std::string("error"),std::string("fatalError").</dd>
|
||||
<dt>getRequesterName</dt>
|
||||
<dd>Returns the requester name.</dd>
|
||||
<dt>message</dt>
|
||||
@@ -4390,12 +4390,12 @@ public:
|
||||
SerializableControl* flusher);
|
||||
static int readSize(ByteBuffer* buffer,
|
||||
DeserializableControl* control);
|
||||
static void serializeString(const String& value,
|
||||
static void serializeString(const std::string& value,
|
||||
ByteBuffer* buffer,SerializableControl* flusher);
|
||||
static void serializeSubstring(const String& value, int offset,
|
||||
static void serializeSubstring(const std::string& value, int offset,
|
||||
int count, ByteBuffer* buffer,
|
||||
SerializableControl* flusher);
|
||||
static String deserializeString(ByteBuffer* buffer,
|
||||
static std::string deserializeString(ByteBuffer* buffer,
|
||||
DeserializableControl* control);
|
||||
...
|
||||
};</pre>
|
||||
@@ -4407,7 +4407,7 @@ public:
|
||||
<dt>readSize</dt>
|
||||
<dd>Deserialize the size.</dd>
|
||||
<dt>serializeString</dt>
|
||||
<dd>Serialize a String.</dd>
|
||||
<dd>Serialize a std::string.</dd>
|
||||
<dt>serializeSubstring</dt>
|
||||
<dd>Serialize a substring.</dd>
|
||||
<dt>deserializeString</dt>
|
||||
@@ -4634,15 +4634,15 @@ Also he should check for correct descriptions.
|
||||
static const char* StatusTypeName[];
|
||||
static Status OK;
|
||||
Status();
|
||||
Status(StatusType type, epics::pvData::String const & message);
|
||||
Status(StatusType type, epics::pvData::String const & message, epics::pvData::String stackDump);
|
||||
Status(StatusType type, std::string const & message);
|
||||
Status(StatusType type, std::string const & message, std::string stackDump);
|
||||
~Status()
|
||||
StatusType getType() const;
|
||||
String getMessage() const;
|
||||
String getStackDump() const;
|
||||
std::string getMessage() const;
|
||||
std::string getStackDump() const;
|
||||
bool isOK() const;
|
||||
bool isSuccess() const;
|
||||
String toString() const;
|
||||
std::string toString() const;
|
||||
void toString(StringBuilder buffer, int indentLevel = 0) const;
|
||||
void serialize(ByteBuffer *buffer, SerializableControl *flusher) const;
|
||||
void serialize(ByteBuffer *buffer, SerializableControl *flusher) const;
|
||||
@@ -4703,7 +4703,7 @@ class Thread;
|
||||
class Thread : public epicsThread, private NoDefaultMethods {
|
||||
public:
|
||||
Thread(
|
||||
String name,
|
||||
std::string name,
|
||||
ThreadPriority priority,
|
||||
Runnable *runnableReady,
|
||||
epicsThreadStackSizeClass stkcls=epicsThreadStackSmall);
|
||||
@@ -4802,7 +4802,7 @@ public:
|
||||
class Timer : private Runnable {
|
||||
public:
|
||||
POINTER_DEFINITIONS(Timer);
|
||||
Timer(String threadName, ThreadPriority priority);
|
||||
Timer(std::string threadName, ThreadPriority priority);
|
||||
virtual ~Timer();
|
||||
virtual void run();
|
||||
void scheduleAfterDelay(
|
||||
@@ -4971,8 +4971,8 @@ then passes it to pvCopy.
|
||||
class CreateRequest {
|
||||
...
|
||||
static CreateRequestPtr create();
|
||||
virtual PVStructurePtr createRequest(String const &request);
|
||||
String getMessage();
|
||||
virtual PVStructurePtr createRequest(std::string const &request);
|
||||
std::string getMessage();
|
||||
};
|
||||
</pre>
|
||||
<p>An example of how it is used is:</p>
|
||||
@@ -4980,7 +4980,7 @@ class CreateRequest {
|
||||
CreateRequestPtr createRequest = CreateRequest::create();
|
||||
PVStructurePtr pvRequest = createRequest->createRequest(request);
|
||||
if(pvRequest==NULL) {
|
||||
String error = createRequest->getMessage();
|
||||
std::string error = createRequest->getMessage();
|
||||
// take some action
|
||||
} else {
|
||||
//success do something
|
||||
@@ -5001,7 +5001,7 @@ class class epicsShareClass PVCopy
|
||||
static PVCopyPtr create(
|
||||
PVStructurePtr const &pvMaster,
|
||||
PVStructurePtr const &pvRequest,
|
||||
String const & structureName);
|
||||
std::string const & structureName);
|
||||
PVStructurePtr getPVMaster();
|
||||
void traverseMaster(PVCopyTraverseMasterCallbackPtr const & callback);
|
||||
StructureConstPtr getStructure();
|
||||
@@ -5074,7 +5074,7 @@ where
|
||||
<dt>getCopyOffset</dt>
|
||||
<dd>Given a field in pvMaster.
|
||||
return the offset in copy for the same field.
|
||||
A value of String::npos means that the copy does not have this field.
|
||||
A value of std::string::npos means that the copy does not have this field.
|
||||
Two overloaded methods are provided. The first is called if
|
||||
the field of master is not a structure. The second is for
|
||||
subfields of a structure.
|
||||
@@ -5245,7 +5245,7 @@ It has the methods:</p>
|
||||
<pre>
|
||||
class MonitorPlugin
|
||||
{
|
||||
virtual String const & getName() = 0;
|
||||
virtual std::string const & getName() = 0;
|
||||
virtual bool causeMonitor(
|
||||
PVFieldPtr const &pvField,
|
||||
PVStructurePtr const &pvTop,
|
||||
@@ -5264,16 +5264,16 @@ class MonitorPluginCreator
|
||||
FieldConstPtr const &field,
|
||||
StructureConstPtr const &top,
|
||||
PVStructurePtr const &pvFieldOptions) = 0;
|
||||
virtual String const & getName() = 0;
|
||||
virtual std::string const & getName() = 0;
|
||||
}
|
||||
|
||||
class MonitorPluginManager
|
||||
{
|
||||
static MonitorPluginManagerPtr get();
|
||||
bool addPlugin(
|
||||
String const &pluginName,
|
||||
std::string const &pluginName,
|
||||
MonitorPluginCreatorPtr const &creator);
|
||||
MonitorPluginCreatorPtr findPlugin(String const &pluginName);
|
||||
MonitorPluginCreatorPtr findPlugin(std::string const &pluginName);
|
||||
void showNames();
|
||||
};
|
||||
|
||||
@@ -5445,7 +5445,7 @@ will be passed to the client.
|
||||
Assume that the client has already connected to the channel.
|
||||
The client can then issue the commands:</p>
|
||||
<pre>
|
||||
String request("field(alarm[plugin=onChange]");
|
||||
std::string request("field(alarm[plugin=onChange]");
|
||||
request += ",timeStamp[plugin=onChange,raiseMonitor=false]";
|
||||
request += ",power.value[plugin=onChange";
|
||||
request += ",voltage.value[plugin=onChange";
|
||||
@@ -5481,13 +5481,13 @@ public:
|
||||
PVStringPtr pvString =
|
||||
pvFieldOptions->getSubField<PVString>("raiseMonitor");
|
||||
if(pvString!=NULL) {
|
||||
String value = pvString->get();
|
||||
std::string value = pvString->get();
|
||||
if(value.compare("false")==0) raiseMonitor = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual String &getName(){return pluginName;}
|
||||
virtual std::string &getName(){return pluginName;}
|
||||
virtual bool causeMonitor(
|
||||
PVFieldPtr const &pvNew,
|
||||
PVStructurePtr const &pvTop,
|
||||
@@ -5505,7 +5505,7 @@ private:
|
||||
class OnChangePluginCreator : public MonitorPluginCreator
|
||||
{
|
||||
public:
|
||||
virtual String &getName(){return pluginName;}
|
||||
virtual std::string &getName(){return pluginName;}
|
||||
virtual MonitorPluginPtr create(
|
||||
FieldConstPtr const &field,
|
||||
StructureConstPtr const &top,
|
||||
|
||||
@@ -88,7 +88,7 @@ The interfaces for C++ and Java should be similar so that
|
||||
someone who understands the interface in one of the languages
|
||||
and knows both languages will quickly understand the interface of the other language.</p>
|
||||
<p>There is another problem with the existing API. There are methods that allow the "structure"
|
||||
to change after an pvData object is created. An example is PVField::renameField(String newName).
|
||||
to change after an pvData object is created. An example is PVField::renameField(std::string newName).
|
||||
Such methods should not exist.</p>
|
||||
<p>There are methods regarding immutability: setImmutable, isImmutablei, setCapacityMutable, and isCapacityMutable.
|
||||
Should they exists? For now lets assume no.
|
||||
@@ -114,18 +114,18 @@ The new methods also have a comment.
|
||||
<h3>Introspection Interfaces</h3>
|
||||
|
||||
<pre>interface Field extends Serializable {
|
||||
String getId();
|
||||
std::string getId();
|
||||
Type getType();
|
||||
// following will be removed
|
||||
<font color = "red">void toString(StringBuilder buf);</font>
|
||||
<font color = "red">void toString(StringBuilder buf,int indentLevel);</font>
|
||||
<font color = "red">String toString();</font>
|
||||
<font color = "red">std::string toString();</font>
|
||||
}
|
||||
|
||||
<font color = "blue">
|
||||
// new interface
|
||||
interface FieldToString {
|
||||
String toString(Field field);
|
||||
interface FieldTostd::string {
|
||||
std::string toString(Field field);
|
||||
}</font>
|
||||
|
||||
interface Scalar extends Field {
|
||||
@@ -137,12 +137,12 @@ interface ScalarArray extends Field {
|
||||
}
|
||||
|
||||
interface Structure extends Field {
|
||||
Field getField(String fieldName);
|
||||
int getFieldIndex(String fieldName);
|
||||
Field getField(std::string fieldName);
|
||||
int getFieldIndex(std::string fieldName);
|
||||
Field[] getFields();
|
||||
Field getField(int fieldIndex);
|
||||
String[] getFieldNames();
|
||||
String getFieldName(int fieldIndex)
|
||||
std::string[] getFieldNames();
|
||||
std::string getFieldName(int fieldIndex)
|
||||
}
|
||||
|
||||
interface StructureArray extends Field {
|
||||
@@ -153,19 +153,19 @@ interface FieldCreate {
|
||||
Scalar createScalar(ScalarType scalarType);
|
||||
ScalarArray createScalarArray(ScalarType elementType);
|
||||
StructureArray createStructureArray(Structure elementStructure);
|
||||
Structure createStructure(String[] fieldNames, Field[] field);
|
||||
Structure createStructure(String id,String[] fieldNames, Field[] field);
|
||||
Structure createStructure(std::string[] fieldNames, Field[] field);
|
||||
Structure createStructure(std::string id,std::string[] fieldNames, Field[] field);
|
||||
Structure createStructure(Structure structToClone);
|
||||
Field deserialize(ByteBuffer buffer, DeserializableControl control);
|
||||
// following will be removed
|
||||
<font color = "red">Structure appendField(Structure structure,String fieldName, Field field);</font>
|
||||
<font color = "red">Structure appendFields(Structure structure,String[] fieldNames, Field[] fields);</font>
|
||||
<font color = "red">Structure appendField(Structure structure,std::string fieldName, Field field);</font>
|
||||
<font color = "red">Structure appendFields(Structure structure,std::string[] fieldNames, Field[] fields);</font>
|
||||
}
|
||||
</pre>
|
||||
<h3>Data Interfaces</h3>
|
||||
<pre>
|
||||
interface PVField extends Requester, Serializable {
|
||||
String getFieldName();
|
||||
std::string getFieldName();
|
||||
void setRequester(Requester requester);
|
||||
int getFieldOffset();
|
||||
int getNextFieldOffset();
|
||||
@@ -178,16 +178,16 @@ interface PVField extends Requester, Serializable {
|
||||
<font color = "red">PVAuxInfo getPVAuxInfo();</font>
|
||||
<font color = "red">boolean isImmutable();</font>
|
||||
<font color = "red">void setImmutable();</font>
|
||||
<font color = "red">void renameField(String newName);</font>
|
||||
<font color = "red">void renameField(std::string newName);</font>
|
||||
<font color = "red">void toString(StringBuilder buf);</font>
|
||||
<font color = "red">void toString(StringBuilder buf,int indentLevel);</font>
|
||||
<font color = "red">String toString();</font>
|
||||
<font color = "red">std::string toString();</font>
|
||||
}
|
||||
|
||||
<font color = "blue">
|
||||
// The following is a new interface
|
||||
interface PVFieldToString {
|
||||
String toString(PVField pvField);
|
||||
interface PVFieldTostd::string {
|
||||
std::string toString(PVField pvField);
|
||||
void setMaxInitialArrayElements(int num);
|
||||
void setMaxFinalArrayElements(int num);
|
||||
int getMaxInitialArrayElements();
|
||||
@@ -241,28 +241,28 @@ interface PVDoubleArray extends PVArray {
|
||||
interface PVStructure extends PVField , BitSetSerializable{
|
||||
Structure getStructure();
|
||||
PVField[] getPVFields();
|
||||
PVField getSubField(String fieldName);
|
||||
PVField getSubField(std::string fieldName);
|
||||
PVField getSubField(int fieldOffset);
|
||||
// The following are convenience methods
|
||||
PVBoolean getBooleanField(String fieldName);
|
||||
PVByte getByteField(String fieldName);
|
||||
PVShort getShortField(String fieldName);
|
||||
PVInt getIntField(String fieldName);
|
||||
PVLong getLongField(String fieldName);
|
||||
PVFloat getFloatField(String fieldName);
|
||||
PVDouble getDoubleField(String fieldName);
|
||||
PVString getStringField(String fieldName);
|
||||
PVScalarArray getScalarArrayField(String fieldName);
|
||||
PVStructureArray getStructureArrayField(String fieldName);
|
||||
PVStructure getStructureField(String fieldName);
|
||||
PVArray getArrayField(String fieldName,ScalarType elementType);
|
||||
PVBoolean getBooleanField(std::string fieldName);
|
||||
PVByte getByteField(std::string fieldName);
|
||||
PVShort getShortField(std::string fieldName);
|
||||
PVInt getIntField(std::string fieldName);
|
||||
PVLong getLongField(std::string fieldName);
|
||||
PVFloat getFloatField(std::string fieldName);
|
||||
PVDouble getDoubleField(std::string fieldName);
|
||||
PVString getStringField(std::string fieldName);
|
||||
PVScalarArray getScalarArrayField(std::string fieldName);
|
||||
PVStructureArray getStructureArrayField(std::string fieldName);
|
||||
PVStructure getStructureField(std::string fieldName);
|
||||
PVArray getArrayField(std::string fieldName,ScalarType elementType);
|
||||
// following will be removed
|
||||
<font color = "red"> void appendPVField(String fieldName,PVField pvField);</font>
|
||||
<font color = "red"> void appendPVFields(String[] fieldNames,PVField[] pvFields);</font>
|
||||
<font color = "red"> void removePVField(String fieldName);</font>
|
||||
<font color = "red"> void appendPVField(std::string fieldName,PVField pvField);</font>
|
||||
<font color = "red"> void appendPVFields(std::string[] fieldNames,PVField[] pvFields);</font>
|
||||
<font color = "red"> void removePVField(std::string fieldName);</font>
|
||||
<font color = "red"> void replacePVField(PVField oldPVField,PVField newPVField);</font>
|
||||
<font color = "red"> String getExtendsStructureName();</font>
|
||||
<font color = "red"> boolean putExtendsStructureName(String extendsStructureName);</font>
|
||||
<font color = "red"> std::string getExtendsStructureName();</font>
|
||||
<font color = "red"> boolean putExtendsStructureName(std::string extendsStructureName);</font>
|
||||
<font color = "red"> public boolean checkValid();</font>
|
||||
}
|
||||
|
||||
@@ -297,13 +297,13 @@ public interface PVDataCreate {
|
||||
PVScalarArray createPVScalarArray(PVScalarArray arrayToClone;
|
||||
PVStructureArray createPVStructureArray(StructureArray structureArray);
|
||||
PVStructure createPVStructure(Structure structure);
|
||||
PVStructure createPVStructure(String[] fieldNames,Field[] fields);
|
||||
PVStructure createPVStructure(std::string[] fieldNames,Field[] fields);
|
||||
PVStructure createPVStructure(PVStructure structToClone);
|
||||
// following will be removed
|
||||
<font color = "red">PVField[] flattenPVStructure(PVStructure pvStructure);</font>
|
||||
}
|
||||
</pre>
|
||||
<h3>PVFieldToString</h3>
|
||||
<h3>PVFieldTostd::string</h3>
|
||||
<p>In addition to toString this has methods to limit the number of array element to display.
|
||||
The existing Java implementation of toString displayed all elements.
|
||||
For large arrays this is not desirable.
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
POINTER_DEFINITIONS(Field);
|
||||
virtual ~Field();
|
||||
Type getType() const{return m_type;}
|
||||
virtual String getID() const = 0;
|
||||
virtual std::string getID() const = 0;
|
||||
<font color = "red">
|
||||
// following will be removed
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
// following will be removed
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
</font>
|
||||
...
|
||||
};
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
// following will be removed
|
||||
virtual void toString(StringBuilder buf) const{toString(buf,0);}
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
</font>
|
||||
...
|
||||
};
|
||||
@@ -403,19 +403,19 @@ public:
|
||||
typedef const Structure& const_reference;
|
||||
|
||||
std::size_t getNumberFields() const {return numberFields;}
|
||||
FieldConstPtr getField(String const & fieldName) const;
|
||||
FieldConstPtr getField(std::string const & fieldName) const;
|
||||
FieldConstPtr getField(std::size_t index) const;
|
||||
std::size_t getFieldIndex(String const &fieldName) const;
|
||||
std::size_t getFieldIndex(std::string const &fieldName) const;
|
||||
FieldConstPtrArray const & getFields() const {return fields;}
|
||||
StringArray const & getFieldNames() const;
|
||||
String getFieldName(std::size_t fieldIndex);
|
||||
std::string getFieldName(std::size_t fieldIndex);
|
||||
virtual void serialize(ByteBuffer *buffer, SerializableControl *control) const;
|
||||
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *control);
|
||||
<font color = "red">
|
||||
// following will be removed
|
||||
void renameField(std::size_t fieldIndex,String const &newName);
|
||||
void renameField(std::size_t fieldIndex,std::string const &newName);
|
||||
virtual void toString(StringBuilder buf,int indentLevel) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
</font>
|
||||
...
|
||||
};
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
<font color = "red">
|
||||
// following will be removed
|
||||
virtual void toString(StringBuilder buf,int indentLevel=0) const;
|
||||
virtual String getID() const;
|
||||
virtual std::string getID() const;
|
||||
</font>
|
||||
...
|
||||
};
|
||||
@@ -447,7 +447,7 @@ public:
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
StructureConstPtr createStructure (
|
||||
String const &id,
|
||||
std::string const &id,
|
||||
StringArray const & fieldNames,
|
||||
FieldConstPtrArray const & fields) const;
|
||||
FieldConstPtr deserialize(ByteBuffer* buffer, DeserializableControl* control) const;
|
||||
@@ -455,7 +455,7 @@ public:
|
||||
// following will be removed
|
||||
StructureConstPtr appendField(
|
||||
StructureConstPtr const & structure,
|
||||
String const &fieldName, FieldConstPtr const & field) const;
|
||||
std::string const &fieldName, FieldConstPtr const & field) const;
|
||||
StructureConstPtr appendFields(
|
||||
StructureConstPtr const & structure,
|
||||
StringArray const & fieldNames,
|
||||
@@ -475,7 +475,7 @@ class PVField
|
||||
public:
|
||||
POINTER_DEFINITIONS(PVField);
|
||||
virtual ~PVField();
|
||||
inline const String &getFieldName() const ;
|
||||
inline const std::string &getFieldName() const ;
|
||||
virtual void setRequester(RequesterPtr const &prequester);
|
||||
std::size_t getFieldOffset() const;
|
||||
std::size_t getNextFieldOffset() const;
|
||||
@@ -486,15 +486,15 @@ public:
|
||||
void setPostHandler(PostHandlerPtr const &postHandler);
|
||||
// following will be removed
|
||||
<font color = "red">
|
||||
virtual void message(String message,MessageType messageType);
|
||||
virtual void message(std::string message,MessageType messageType);
|
||||
void replacePVField(const PVFieldPtr& newPVField);
|
||||
String getFullName() const;
|
||||
std::string getFullName() const;
|
||||
virtual bool equals(PVField &pv);
|
||||
PVAuxInfoPtr & getPVAuxInfo()
|
||||
bool isImmutable() const;
|
||||
virtual void setImmutable();
|
||||
void replacePVField(const PVFieldPtr& newPVField);
|
||||
void renameField(String const &newName);
|
||||
void renameField(std::string const &newName);
|
||||
virtual void toString(StringBuilder buf) ;
|
||||
virtual void toString(StringBuilder buf,int indentLevel);
|
||||
std::ostream& dumpValue(std::ostream& o) const;
|
||||
@@ -504,8 +504,8 @@ public:
|
||||
|
||||
<font color = "blue">
|
||||
// The following is a new class
|
||||
class PVFieldToString {
|
||||
String toString(const PVFieldPtr &pvField);
|
||||
class PVFieldTostd::string {
|
||||
std::string toString(const PVFieldPtr &pvField);
|
||||
void setMaxInitialArrayElements(size_t num);
|
||||
void setMaxFinalArrayElements(size_t num);
|
||||
size_t getMaxInitialArrayElements();
|
||||
@@ -546,7 +546,7 @@ public:
|
||||
}
|
||||
|
||||
// PVString is special case, since it implements SerializableArray
|
||||
class PVString : public PVScalarValue<String>, SerializableArray {
|
||||
class PVString : public PVScalarValue<std::string>, SerializableArray {
|
||||
public:
|
||||
virtual ~PVString() {}
|
||||
...
|
||||
@@ -650,7 +650,7 @@ public:
|
||||
typedef PVValueArray<uint8> PVBooleanArray;
|
||||
typedef std::tr1::shared_ptr<PVBooleanArray> PVBooleanArrayPtr;
|
||||
...
|
||||
typedef PVValueArray<String> PVStringArray;
|
||||
typedef PVValueArray<std::string> PVStringArray;
|
||||
typedef std::tr1::shared_ptr<PVStringArray> PVStringArrayPtr;
|
||||
|
||||
class PVStructure : public PVField,public BitSetSerializable {
|
||||
@@ -662,24 +662,24 @@ public:
|
||||
|
||||
StructureConstPtr getStructure() const;
|
||||
const PVFieldPtrArray & getPVFields() const;
|
||||
PVFieldPtr getSubField(String const &fieldName) const;
|
||||
PVFieldPtr getSubField(std::string const &fieldName) const;
|
||||
PVFieldPtr getSubField(std::size_t fieldOffset) const;
|
||||
PVBooleanPtr getBooleanField(String const &fieldName) ;
|
||||
PVBytePtr getByteField(String const &fieldName) ;
|
||||
PVShortPtr getShortField(String const &fieldName) ;
|
||||
PVIntPtr getIntField(String const &fieldName) ;
|
||||
PVLongPtr getLongField(String const &fieldName) ;
|
||||
PVUBytePtr getUByteField(String const &fieldName) ;
|
||||
PVUShortPtr getUShortField(String const &fieldName) ;
|
||||
PVUIntPtr getUIntField(String const &fieldName) ;
|
||||
PVULongPtr getULongField(String const &fieldName) ;
|
||||
PVFloatPtr getFloatField(String const &fieldName) ;
|
||||
PVDoublePtr getDoubleField(String const &fieldName) ;
|
||||
PVStringPtr getStringField(String const &fieldName) ;
|
||||
PVStructurePtr getStructureField(String const &fieldName) ;
|
||||
PVBooleanPtr getBooleanField(std::string const &fieldName) ;
|
||||
PVBytePtr getByteField(std::string const &fieldName) ;
|
||||
PVShortPtr getShortField(std::string const &fieldName) ;
|
||||
PVIntPtr getIntField(std::string const &fieldName) ;
|
||||
PVLongPtr getLongField(std::string const &fieldName) ;
|
||||
PVUBytePtr getUByteField(std::string const &fieldName) ;
|
||||
PVUShortPtr getUShortField(std::string const &fieldName) ;
|
||||
PVUIntPtr getUIntField(std::string const &fieldName) ;
|
||||
PVULongPtr getULongField(std::string const &fieldName) ;
|
||||
PVFloatPtr getFloatField(std::string const &fieldName) ;
|
||||
PVDoublePtr getDoubleField(std::string const &fieldName) ;
|
||||
PVStringPtr getStringField(std::string const &fieldName) ;
|
||||
PVStructurePtr getStructureField(std::string const &fieldName) ;
|
||||
PVScalarArrayPtr getScalarArrayField(
|
||||
String const &fieldName,ScalarType elementType) ;
|
||||
PVStructureArrayPtr getStructureArrayField(String const &fieldName) ;
|
||||
std::string const &fieldName,ScalarType elementType) ;
|
||||
PVStructureArrayPtr getStructureArrayField(std::string const &fieldName) ;
|
||||
virtual void serialize(
|
||||
ByteBuffer *pbuffer,SerializableControl *pflusher) const ;
|
||||
virtual void deserialize(
|
||||
@@ -693,16 +693,16 @@ public:
|
||||
<font color = "red">
|
||||
// following are removed
|
||||
void appendPVField(
|
||||
String const &fieldName,
|
||||
std::string const &fieldName,
|
||||
PVFieldPtr const & pvField);
|
||||
void appendPVFields(
|
||||
StringArray const & fieldNames,
|
||||
PVFieldPtrArray const & pvFields);
|
||||
void removePVField(String const &fieldName);
|
||||
void removePVField(std::string const &fieldName);
|
||||
virtual void setImmutable();
|
||||
String getExtendsStructureName() const;
|
||||
std::string getExtendsStructureName() const;
|
||||
bool putExtendsStructureName(
|
||||
String const &extendsStructureName);
|
||||
std::string const &extendsStructureName);
|
||||
</font>
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user