added getFieldName()

This commit is contained in:
john30
2017-01-08 12:07:43 +01:00
parent 41ac7a5591
commit 9ca9964919
2 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -1043,7 +1043,7 @@ result_t ChainedMessage::storeLastData(const PartType partType, SymbolString& da
void ChainedMessage::dumpColumn(ostream& output, size_t column, bool withConditions)
{
if (column!=7) {
if (column!=COLUMN_ID) {
Message::dumpColumn(output, column, withConditions);
return;
}
+9 -2
View File
@@ -244,6 +244,13 @@ public:
*/
string getName() const { return m_name; }
/**
* Get the specified field name.
* @param fieldIndex the index of the field.
* @return the field name, or the index as string if not unique or not available.
*/
virtual string getFieldName(signed char fieldIndex) const { return m_data->getName(fieldIndex); }
/**
* Get whether this is a write message.
* @return whether this is a write message.
@@ -510,7 +517,7 @@ public:
* @param column the column index to write (see @p COLUMN_TYPE index constants).
* @param withConditions whether to include the optional conditions prefix.
*/
virtual void dumpColumn(ostream& output, size_t column, bool withConditions);
virtual void dumpColumn(ostream& output, size_t column, bool withConditions=false);
protected:
@@ -666,7 +673,7 @@ public:
protected:
// @copydoc
virtual void dumpColumn(ostream& output, size_t column, bool withConditions);
virtual void dumpColumn(ostream& output, size_t column, bool withConditions=false);
private: