avoid virtual with override
This commit is contained in:
@@ -166,7 +166,7 @@ class PollRequest : public BusRequest {
|
|||||||
result_t prepare(symbol_t masterAddress);
|
result_t prepare(symbol_t masterAddress);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool notify(result_t result, SlaveSymbolString& slave) override;
|
bool notify(result_t result, SlaveSymbolString& slave) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -215,7 +215,7 @@ class ScanRequest : public BusRequest {
|
|||||||
result_t prepare(symbol_t masterAddress);
|
result_t prepare(symbol_t masterAddress);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool notify(result_t result, SlaveSymbolString& slave) override;
|
bool notify(result_t result, SlaveSymbolString& slave) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -269,7 +269,7 @@ class ActiveBusRequest : public BusRequest {
|
|||||||
virtual ~ActiveBusRequest() {}
|
virtual ~ActiveBusRequest() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool notify(result_t result, SlaveSymbolString& slave) override;
|
bool notify(result_t result, SlaveSymbolString& slave) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class DataSink : virtual public DataHandler {
|
|||||||
virtual void notifyUpdate(Message* message);
|
virtual void notifyUpdate(Message* message);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool isDataSink() override { return true; }
|
bool isDataSink() override { return true; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -182,7 +182,7 @@ class DataSource : virtual public DataHandler {
|
|||||||
virtual ~DataSource() {}
|
virtual ~DataSource() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool isDataSource() override { return true; }
|
bool isDataSource() override { return true; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -62,22 +62,22 @@ class UserList : public UserInfo, public FileReader {
|
|||||||
virtual ~UserList() {}
|
virtual ~UserList() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end,
|
result_t addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end,
|
||||||
vector< vector<string> >* defaults, const string& defaultDest, const string& defaultCircuit,
|
vector< vector<string> >* defaults, const string& defaultDest, const string& defaultCircuit,
|
||||||
const string& defaultSuffix, const string& filename, unsigned int lineNo) override;
|
const string& defaultSuffix, const string& filename, unsigned int lineNo) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool hasUser(const string user) override {
|
bool hasUser(const string user) override {
|
||||||
return m_userLevels.find(user) != m_userLevels.end();
|
return m_userLevels.find(user) != m_userLevels.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool checkSecret(const string user, const string secret) override {
|
bool checkSecret(const string user, const string secret) override {
|
||||||
return m_userSecrets.find(user) != m_userSecrets.end() && m_userSecrets[user] == secret;
|
return m_userSecrets.find(user) != m_userSecrets.end() && m_userSecrets[user] == secret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual string getLevels(const string user) override { return m_userLevels[user]; }
|
string getLevels(const string user) override { return m_userLevels[user]; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** the secret string by user name. */
|
/** the secret string by user name. */
|
||||||
@@ -119,12 +119,12 @@ class MainLoop : public Thread, DeviceListener {
|
|||||||
void addMessage(NetMessage* message) { m_netQueue.push(message); }
|
void addMessage(NetMessage* message) { m_netQueue.push(message); }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void notifyDeviceData(const symbol_t symbol, bool received) override;
|
void notifyDeviceData(const symbol_t symbol, bool received) override;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void run() override;
|
void run() override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class MqttHandler : public DataSink, public DataSource, public Thread {
|
|||||||
virtual ~MqttHandler();
|
virtual ~MqttHandler();
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void start() override;
|
void start() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify the handler of a received MQTT message.
|
* Notify the handler of a received MQTT message.
|
||||||
@@ -83,7 +83,7 @@ class MqttHandler : public DataSink, public DataSource, public Thread {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void run() override;
|
void run() override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -50,15 +50,15 @@ class TemParamDataType : public NumberDataType {
|
|||||||
: NumberDataType(id, 16, 0, 0xffff, 0, 0xffff, 0) {}
|
: NumberDataType(id, 16, 0, 0xffff, 0, 0xffff, 0) {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t derive(int divisor, size_t bitCount, NumberDataType* &derived) override;
|
result_t derive(int divisor, size_t bitCount, NumberDataType* &derived) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readSymbols(SymbolString& input,
|
result_t readSymbols(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
ostringstream& output, OutputFormat outputFormat) override;
|
ostringstream& output, OutputFormat outputFormat) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t writeSymbols(istringstream& input,
|
result_t writeSymbols(istringstream& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
SymbolString& output, size_t* usedLength) override;
|
SymbolString& output, size_t* usedLength) override;
|
||||||
};
|
};
|
||||||
|
|||||||
+28
-28
@@ -242,7 +242,7 @@ class SingleDataField : public DataField {
|
|||||||
virtual ~SingleDataField() {}
|
virtual ~SingleDataField() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual SingleDataField* clone() override;
|
SingleDataField* clone() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory method for creating a new @a SingleDataField instance derived from a base type.
|
* Factory method for creating a new @a SingleDataField instance derived from a base type.
|
||||||
@@ -284,10 +284,10 @@ class SingleDataField : public DataField {
|
|||||||
PartType getPartType() const { return m_partType; }
|
PartType getPartType() const { return m_partType; }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual size_t getLength(PartType partType, size_t maxLength = MAX_LEN) override;
|
size_t getLength(PartType partType, size_t maxLength = MAX_LEN) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t derive(string name, string comment,
|
result_t derive(string name, string comment,
|
||||||
string unit, const PartType partType,
|
string unit, const PartType partType,
|
||||||
int divisor, map<unsigned int, string> values,
|
int divisor, map<unsigned int, string> values,
|
||||||
vector<SingleDataField*>& fields) override;
|
vector<SingleDataField*>& fields) override;
|
||||||
@@ -301,22 +301,22 @@ class SingleDataField : public DataField {
|
|||||||
bool hasFullByteOffset(bool after);
|
bool hasFullByteOffset(bool after);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dump(ostream& output) override;
|
void dump(ostream& output) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool hasField(const char* fieldName, bool numeric) override;
|
bool hasField(const char* fieldName, bool numeric) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t read(SymbolString& data, size_t offset,
|
result_t read(SymbolString& data, size_t offset,
|
||||||
unsigned int& output, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
unsigned int& output, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t read(SymbolString& data, size_t offset,
|
result_t read(SymbolString& data, size_t offset,
|
||||||
ostringstream& output, OutputFormat outputFormat, ssize_t outputIndex = -1,
|
ostringstream& output, OutputFormat outputFormat, ssize_t outputIndex = -1,
|
||||||
bool leadingSeparator = false, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
bool leadingSeparator = false, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t write(istringstream& input, SymbolString& data,
|
result_t write(istringstream& input, SymbolString& data,
|
||||||
size_t offset, char separator = UI_FIELD_SEPARATOR, size_t* length = NULL) override;
|
size_t offset, char separator = UI_FIELD_SEPARATOR, size_t* length = NULL) override;
|
||||||
|
|
||||||
|
|
||||||
@@ -386,25 +386,25 @@ class ValueListDataField : public SingleDataField {
|
|||||||
virtual ~ValueListDataField() {}
|
virtual ~ValueListDataField() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual ValueListDataField* clone() override;
|
ValueListDataField* clone() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t derive(string name, string comment,
|
result_t derive(string name, string comment,
|
||||||
string unit, const PartType partType, int divisor,
|
string unit, const PartType partType, int divisor,
|
||||||
map<unsigned int, string> values,
|
map<unsigned int, string> values,
|
||||||
vector<SingleDataField*>& fields) override;
|
vector<SingleDataField*>& fields) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dump(ostream& output) override;
|
void dump(ostream& output) override;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readSymbols(SymbolString& input, const size_t offset,
|
result_t readSymbols(SymbolString& input, const size_t offset,
|
||||||
ostringstream& output, OutputFormat outputFormat) override;
|
ostringstream& output, OutputFormat outputFormat) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t writeSymbols(istringstream& input, const size_t offset,
|
result_t writeSymbols(istringstream& input, const size_t offset,
|
||||||
SymbolString& output, size_t* usedLength) override;
|
SymbolString& output, size_t* usedLength) override;
|
||||||
|
|
||||||
|
|
||||||
@@ -442,25 +442,25 @@ class ConstantDataField : public SingleDataField {
|
|||||||
virtual ~ConstantDataField() {}
|
virtual ~ConstantDataField() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual ConstantDataField* clone() override;
|
ConstantDataField* clone() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t derive(string name, string comment,
|
result_t derive(string name, string comment,
|
||||||
string unit, const PartType partType, int divisor,
|
string unit, const PartType partType, int divisor,
|
||||||
map<unsigned int, string> values,
|
map<unsigned int, string> values,
|
||||||
vector<SingleDataField*>& fields) override;
|
vector<SingleDataField*>& fields) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dump(ostream& output) override;
|
void dump(ostream& output) override;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readSymbols(SymbolString& input, const size_t offset,
|
result_t readSymbols(SymbolString& input, const size_t offset,
|
||||||
ostringstream& output, OutputFormat outputFormat) override;
|
ostringstream& output, OutputFormat outputFormat) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t writeSymbols(istringstream& input, const size_t offset,
|
result_t writeSymbols(istringstream& input, const size_t offset,
|
||||||
SymbolString& output, size_t* usedLength) override;
|
SymbolString& output, size_t* usedLength) override;
|
||||||
|
|
||||||
|
|
||||||
@@ -523,16 +523,16 @@ class DataFieldSet : public DataField {
|
|||||||
virtual ~DataFieldSet();
|
virtual ~DataFieldSet();
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual DataFieldSet* clone() override;
|
DataFieldSet* clone() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual size_t getLength(PartType partType, size_t maxLength = MAX_LEN) override;
|
size_t getLength(PartType partType, size_t maxLength = MAX_LEN) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual string getName(ssize_t fieldIndex = -1) override;
|
string getName(ssize_t fieldIndex = -1) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t derive(string name, string comment,
|
result_t derive(string name, string comment,
|
||||||
string unit, const PartType partType,
|
string unit, const PartType partType,
|
||||||
int divisor, map<unsigned int, string> values,
|
int divisor, map<unsigned int, string> values,
|
||||||
vector<SingleDataField*>& fields) override;
|
vector<SingleDataField*>& fields) override;
|
||||||
@@ -568,22 +568,22 @@ class DataFieldSet : public DataField {
|
|||||||
size_t size() const { return m_fields.size(); }
|
size_t size() const { return m_fields.size(); }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool hasField(const char* fieldName, bool numeric) override;
|
bool hasField(const char* fieldName, bool numeric) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dump(ostream& output) override;
|
void dump(ostream& output) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t read(SymbolString& data, size_t offset,
|
result_t read(SymbolString& data, size_t offset,
|
||||||
unsigned int& output, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
unsigned int& output, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t read(SymbolString& data, size_t offset,
|
result_t read(SymbolString& data, size_t offset,
|
||||||
ostringstream& output, OutputFormat outputFormat, ssize_t outputIndex = -1,
|
ostringstream& output, OutputFormat outputFormat, ssize_t outputIndex = -1,
|
||||||
bool leadingSeparator = false, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
bool leadingSeparator = false, const char* fieldName = NULL, ssize_t fieldIndex = -1) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t write(istringstream& input, SymbolString& data,
|
result_t write(istringstream& input, SymbolString& data,
|
||||||
size_t offset, char separator = UI_FIELD_SEPARATOR, size_t* length = NULL) override;
|
size_t offset, char separator = UI_FIELD_SEPARATOR, size_t* length = NULL) override;
|
||||||
|
|
||||||
|
|
||||||
@@ -638,7 +638,7 @@ class DataFieldTemplates : public FileReader {
|
|||||||
result_t add(DataField* field, string name = "", bool replace = false);
|
result_t add(DataField* field, string name = "", bool replace = false);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end,
|
result_t addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end,
|
||||||
vector< vector<string> >* defaults, const string& defaultDest, const string& defaultCircuit,
|
vector< vector<string> >* defaults, const string& defaultDest, const string& defaultCircuit,
|
||||||
const string& defaultSuffix, const string& filename, unsigned int lineNo) override;
|
const string& defaultSuffix, const string& filename, unsigned int lineNo) override;
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -304,17 +304,17 @@ class StringDataType : public DataType {
|
|||||||
virtual ~StringDataType() {}
|
virtual ~StringDataType() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readRawValue(SymbolString& input,
|
result_t readRawValue(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
unsigned int& value) override;
|
unsigned int& value) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readSymbols(SymbolString& input,
|
result_t readSymbols(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
ostringstream& output, OutputFormat outputFormat) override;
|
ostringstream& output, OutputFormat outputFormat) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t writeSymbols(istringstream& input,
|
result_t writeSymbols(istringstream& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
SymbolString& output, size_t* usedLength) override;
|
SymbolString& output, size_t* usedLength) override;
|
||||||
|
|
||||||
@@ -366,17 +366,17 @@ class DateTimeDataType : public DataType {
|
|||||||
int16_t getResolution() const { return m_resolution; }
|
int16_t getResolution() const { return m_resolution; }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readRawValue(SymbolString& input,
|
result_t readRawValue(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
unsigned int& value) override;
|
unsigned int& value) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readSymbols(SymbolString& input,
|
result_t readSymbols(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
ostringstream& output, OutputFormat outputFormat) override;
|
ostringstream& output, OutputFormat outputFormat) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t writeSymbols(istringstream& input,
|
result_t writeSymbols(istringstream& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
SymbolString& output, size_t* usedLength) override;
|
SymbolString& output, size_t* usedLength) override;
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ class NumberDataType : public DataType {
|
|||||||
static size_t calcPrecision(const int divisor);
|
static size_t calcPrecision(const int divisor);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool dump(ostream& output, const size_t length, const bool appendSeparatorDivisor = true) const override;
|
bool dump(ostream& output, const size_t length, const bool appendSeparatorDivisor = true) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Derive a new @a NumberDataType from this.
|
* Derive a new @a NumberDataType from this.
|
||||||
@@ -481,12 +481,12 @@ class NumberDataType : public DataType {
|
|||||||
int16_t getFirstBit() const { return m_firstBit; }
|
int16_t getFirstBit() const { return m_firstBit; }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readRawValue(SymbolString& input,
|
result_t readRawValue(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
unsigned int& value) override;
|
unsigned int& value) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t readSymbols(SymbolString& input,
|
result_t readSymbols(SymbolString& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
ostringstream& output, OutputFormat outputFormat) override;
|
ostringstream& output, OutputFormat outputFormat) override;
|
||||||
|
|
||||||
@@ -500,12 +500,12 @@ class NumberDataType : public DataType {
|
|||||||
* or NULL.
|
* or NULL.
|
||||||
* @return @a RESULT_OK on success, or an error code.
|
* @return @a RESULT_OK on success, or an error code.
|
||||||
*/
|
*/
|
||||||
virtual result_t writeRawValue(unsigned int value,
|
result_t writeRawValue(unsigned int value,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
SymbolString& output, size_t* usedLength = NULL);
|
SymbolString& output, size_t* usedLength = NULL);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t writeSymbols(istringstream& input,
|
result_t writeSymbols(istringstream& input,
|
||||||
const size_t offset, const size_t length,
|
const size_t offset, const size_t length,
|
||||||
SymbolString& output, size_t* usedLength) override;
|
SymbolString& output, size_t* usedLength) override;
|
||||||
|
|
||||||
|
|||||||
@@ -211,15 +211,15 @@ class SerialDevice : public Device {
|
|||||||
: Device(name, checkDevice, readOnly, initialSend) {}
|
: Device(name, checkDevice, readOnly, initialSend) {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t open() override;
|
result_t open() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void close() override;
|
void close() override;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void checkDevice() override;
|
void checkDevice() override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -246,24 +246,24 @@ class NetworkDevice : public Device {
|
|||||||
m_buffer(NULL), m_bufSize(0), m_bufLen(0), m_bufPos(0) {}
|
m_buffer(NULL), m_bufSize(0), m_bufLen(0), m_bufPos(0) {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual unsigned int getLatency() const override { return 10000; }
|
unsigned int getLatency() const override { return 10000; }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t open() override;
|
result_t open() override;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void checkDevice() override;
|
void checkDevice() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool available() override;
|
bool available() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual ssize_t write(const symbol_t value) override;
|
ssize_t write(const symbol_t value) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual ssize_t read(symbol_t& value) override;
|
ssize_t read(symbol_t& value) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
+25
-25
@@ -702,37 +702,37 @@ class ChainedMessage : public Message {
|
|||||||
virtual ~ChainedMessage();
|
virtual ~ChainedMessage();
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual Message* derive(const symbol_t dstAddress, const symbol_t srcAddress = SYN,
|
Message* derive(const symbol_t dstAddress, const symbol_t srcAddress = SYN,
|
||||||
const string circuit = "") override;
|
const string circuit = "") override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual size_t getIdLength() const override { return m_ids[0].size() - 2; }
|
size_t getIdLength() const override { return m_ids[0].size() - 2; }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool checkId(MasterSymbolString& master, size_t* index = NULL) override;
|
bool checkId(MasterSymbolString& master, size_t* index = NULL) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool checkId(Message& other) override;
|
bool checkId(Message& other) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual size_t getCount() override { return m_ids.size(); }
|
size_t getCount() override { return m_ids.size(); }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t prepareMasterPart(MasterSymbolString& master, istringstream& input, char separator,
|
result_t prepareMasterPart(MasterSymbolString& master, istringstream& input, char separator,
|
||||||
size_t index) override;
|
size_t index) override;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t storeLastData(MasterSymbolString& master, SlaveSymbolString& slave) override;
|
result_t storeLastData(MasterSymbolString& master, SlaveSymbolString& slave) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t storeLastData(MasterSymbolString& data, size_t index) override;
|
result_t storeLastData(MasterSymbolString& data, size_t index) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t storeLastData(SlaveSymbolString& data, size_t index) override;
|
result_t storeLastData(SlaveSymbolString& data, size_t index) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combine all last stored data.
|
* Combine all last stored data.
|
||||||
@@ -742,7 +742,7 @@ class ChainedMessage : public Message {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dumpColumn(ostream& output, column_t column, bool withConditions = false) override;
|
void dumpColumn(ostream& output, column_t column, bool withConditions = false) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -910,20 +910,20 @@ class SimpleCondition : public Condition {
|
|||||||
virtual ~SimpleCondition() {}
|
virtual ~SimpleCondition() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual SimpleCondition* derive(string valueList) override;
|
SimpleCondition* derive(string valueList) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dump(ostream& output, bool matched = false) override;
|
void dump(ostream& output, bool matched = false) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual CombinedCondition* combineAnd(Condition* other) override;
|
CombinedCondition* combineAnd(Condition* other) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t resolve(MessageMap* messages, ostringstream& errorMessage,
|
result_t resolve(MessageMap* messages, ostringstream& errorMessage,
|
||||||
void (*readMessageFunc)(Message* message) = NULL) override;
|
void (*readMessageFunc)(Message* message) = NULL) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool isTrue() override;
|
bool isTrue() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return whether the condition is based on a numeric value.
|
* Return whether the condition is based on a numeric value.
|
||||||
@@ -1005,7 +1005,7 @@ class SimpleNumericCondition : public SimpleCondition {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool checkValue(Message* message, const string field) override;
|
bool checkValue(Message* message, const string field) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -1041,12 +1041,12 @@ class SimpleStringCondition : public SimpleCondition {
|
|||||||
virtual ~SimpleStringCondition() {}
|
virtual ~SimpleStringCondition() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool isNumeric() override { return false; }
|
bool isNumeric() override { return false; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool checkValue(Message* message, const string field) override;
|
bool checkValue(Message* message, const string field) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -1072,17 +1072,17 @@ class CombinedCondition : public Condition {
|
|||||||
virtual ~CombinedCondition() {}
|
virtual ~CombinedCondition() {}
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void dump(ostream& output, bool matched = false) override;
|
void dump(ostream& output, bool matched = false) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual CombinedCondition* combineAnd(Condition* other) override { m_conditions.push_back(other); return this; }
|
CombinedCondition* combineAnd(Condition* other) override { m_conditions.push_back(other); return this; }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t resolve(MessageMap* messages, ostringstream& errorMessage,
|
result_t resolve(MessageMap* messages, ostringstream& errorMessage,
|
||||||
void (*readMessageFunc)(Message* message) = NULL) override;
|
void (*readMessageFunc)(Message* message) = NULL) override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool isTrue() override;
|
bool isTrue() override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -1209,7 +1209,7 @@ class LoadInstruction : public Instruction {
|
|||||||
virtual ~LoadInstruction() { }
|
virtual ~LoadInstruction() { }
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t execute(MessageMap* messages, ostringstream& log, Condition* condition) override;
|
result_t execute(MessageMap* messages, ostringstream& log, Condition* condition) override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -1250,7 +1250,7 @@ class MessageMap : public FileReader {
|
|||||||
result_t add(Message* message, bool storeByName = true);
|
result_t add(Message* message, bool storeByName = true);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t addDefaultFromFile(vector< vector<string> >& defaults, vector<string>& row,
|
result_t addDefaultFromFile(vector< vector<string> >& defaults, vector<string>& row,
|
||||||
vector<string>::iterator& begin, string defaultDest, string defaultCircuit, string defaultSuffix,
|
vector<string>::iterator& begin, string defaultDest, string defaultCircuit, string defaultSuffix,
|
||||||
const string& filename, unsigned int lineNo) override;
|
const string& filename, unsigned int lineNo) override;
|
||||||
|
|
||||||
@@ -1264,7 +1264,7 @@ class MessageMap : public FileReader {
|
|||||||
result_t readConditions(string& types, const string& filename, Condition*& condition);
|
result_t readConditions(string& types, const string& filename, Condition*& condition);
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual result_t addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end,
|
result_t addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end,
|
||||||
vector< vector<string> >* defaults, const string& defaultDest, const string& defaultCircuit,
|
vector< vector<string> >* defaults, const string& defaultDest, const string& defaultCircuit,
|
||||||
const string& defaultSuffix, const string& filename, unsigned int lineNo) override;
|
const string& defaultSuffix, const string& filename, unsigned int lineNo) override;
|
||||||
|
|
||||||
|
|||||||
@@ -121,10 +121,10 @@ class WaitThread : public Thread {
|
|||||||
virtual ~WaitThread();
|
virtual ~WaitThread();
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual void stop() override;
|
void stop() override;
|
||||||
|
|
||||||
// @copydoc
|
// @copydoc
|
||||||
virtual bool join() override;
|
bool join() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for the specified amount of time.
|
* Wait for the specified amount of time.
|
||||||
|
|||||||
Reference in New Issue
Block a user