added DataField::getCount(), exclude name wrap when fieldIndex is used in SingleDataField::read(), corrected json indent

This commit is contained in:
john30
2017-07-02 10:09:47 +02:00
parent 11832ca126
commit b8a4e5e032
5 changed files with 40 additions and 18 deletions
+8 -2
View File
@@ -267,12 +267,18 @@ class Message : public AttributedItem {
*/
static bool checkLevel(const string& level, const string& checkLevels);
/**
* Get the number of non-ignored fields.
* @return the number of non-ignored fields.
*/
size_t getFieldCount() const { return m_data->getCount(); }
/**
* Get the specified field name.
* @param fieldIndex the index of the field (excluding ignored fields).
* @return the field name, or the index as string if not unique or not available.
* @return the field name, or the index as string if not unique, or empty not available.
*/
virtual string getFieldName(ssize_t fieldIndex) const { return m_data->getName(fieldIndex); }
string getFieldName(ssize_t fieldIndex) const { return m_data->getName(fieldIndex); }
/**
* Get whether this is a write message.