OECSVHeader
class OECSVHeader
This class stores the column names to be read or written to a
OEFormat_CSV file. It is typically retrieved
from an oemolstreambase through the
oemolstreambase.GetCSVHeader method. The object
available from that method is initialized during the first read or
write operation on that stream.
See also
OECreateCSVHeader for creating a
OECSVHeader from the SD data tag in a molecule.
Constructors
OECSVHeader() -> OECSVHeader
OECSVHeader(rhs: OECSVHeader) -> OECSVHeader
OECSVHeader(columnNames: OEStringVector) -> OECSVHeader
The default constructors initializes the object to an empty
state. The copy constructor can be used to make a copy from
about OECSVHeader object. The class can also be
constructed directly from a std::vector of std::string.
operator bool
IsValid() -> bool
Returns false if this class has not been initialized with
any column names yet. Returns true if this class does
contain column names.
Clear
Clear() -> None
Resets the class to an empty uninitialized state.
GetColumnName
GetColumnName(fieldIdx: int) -> str
Return the column name for the particular index, starting at
zero. If fieldIdx is not less than
OECSVHeader.GetNumColumns, a reference to an
empty string is returned.
GetColumnNames
GetColumnNames() -> Iterable[str]
Returns an iterator over all the column names stored in this class.
GetNumColumns
GetNumColumns() -> int
Returns the number of column names stored in this class.
IsValid
IsValid() -> bool
Returns false if this class has not been initialized with
any column names yet. Returns true if this class does
contain column names.