Add getColumnNames() to NTTable
This commit is contained in:
@@ -203,6 +203,11 @@ PVStringArrayPtr NTTable::getLabels() const
|
||||
return pvNTTable->getSubField<PVStringArray>("labels");
|
||||
}
|
||||
|
||||
StringArray const & NTTable::getColumnNames() const
|
||||
{
|
||||
return pvNTTable->getStructure()->getFieldNames();
|
||||
}
|
||||
|
||||
PVFieldPtr NTTable::getColumn(std::string const & columnName) const
|
||||
{
|
||||
return pvNTTable->getSubField("value." + columnName);
|
||||
|
||||
@@ -256,6 +256,13 @@ public:
|
||||
*/
|
||||
epics::pvData::PVStringArrayPtr getLabels() const;
|
||||
|
||||
/**
|
||||
* Get the column names for the table.
|
||||
* For each name, calling getColumn should return the column, which should not be null.
|
||||
* @return The column names.
|
||||
*/
|
||||
epics::pvData::StringArray const & getColumnNames() const;
|
||||
|
||||
/**
|
||||
* Get the PVField (column) for a field that follows the label field.
|
||||
* @param columnName The name of the column.
|
||||
|
||||
Reference in New Issue
Block a user