![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/CSVParseDialog.h>
Converts a CSV file into a Table, with customizable delimiters and optional headers. More...
Inheritance diagram for CSVParser:Converts a CSV file into a Table, with customizable delimiters and optional headers.
User should call parse when the delimiters and headers options are set as desired. Optionally a Progress object can be passed in to monitor the progress of the parsing, as well as limit the number of rows to parse.
Public Member Functions | |
| CSVParser (const std::string &filename="") | |
| Constructs a CSV parser. Optionally specify the filename of the CSV file to parse. | |
| void | setFilename (const std::string &filename) |
| Sets or updates the filename to parse. | |
| void | setDelimiters (const std::vector< char > &delimiters) |
| Sets which delimiters to use for parsing the CSV file. | |
| std::vector< char > | delimiters () |
| Returns the delimiters currently in use. | |
| void | setContainsHeaders (bool headers) |
| Sets if the CSV file contains a first row of headers and should be used as headers in the table. | |
| bool | containsHeaders () |
| Sets if the headers should be included as a row in the table. | |
| void | parse (Progress *progress=nullptr, int maxRows=-1) |
| Updates the internal table using the current set of delimiters and header options Optional progress and maximum number of rows to process. | |
| Table & | table () |
| Returns the extracted table from the CSV. | |
| void | clearTable () |
| Clears the table, call parse again to refill it. | |
| std::string | filename () |
| virtual void | configure (const Properties *) override |
| Configure this object instance by de-serializing the given Properties. | |
| virtual void | configuration (Properties *) const override |
| Serialize the current object configuration into the given Properties object. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.