API
4.0
For C++ developers
|
CSVFileAdapter is a DelimFileAdapter that presets the delimiters appropriately for CSV files. More...
Public Member Functions | |
CSVFileAdapter () | |
CSVFileAdapter (const CSVFileAdapter &)=default | |
CSVFileAdapter (CSVFileAdapter &&)=default | |
CSVFileAdapter & | operator= (const CSVFileAdapter &)=default |
CSVFileAdapter & | operator= (CSVFileAdapter &&)=default |
~CSVFileAdapter ()=default | |
CSVFileAdapter * | clone () const override |
Public Member Functions inherited from OpenSim::DelimFileAdapter< double > | |
DelimFileAdapter ()=delete | |
DelimFileAdapter (const DelimFileAdapter &)=default | |
DelimFileAdapter (DelimFileAdapter &&)=default | |
DelimFileAdapter (const std::string &delimitersRead, const std::string &delimterWrite) | |
Create the adapter by setting the delimiters. More... | |
DelimFileAdapter (const std::string &delimitersRead, const std::string &delimterWrite, const std::string &compDelimRead, const std::string &compDelimWrite) | |
Create the adapter by setting the delimiters. More... | |
DelimFileAdapter & | operator= (const DelimFileAdapter &)=default |
DelimFileAdapter & | operator= (DelimFileAdapter &&)=default |
~DelimFileAdapter ()=default | |
DelimFileAdapter * | clone () const override |
Public Member Functions inherited from OpenSim::FileAdapter | |
FileAdapter ()=default | |
FileAdapter (const FileAdapter &)=default | |
FileAdapter (FileAdapter &&)=default | |
FileAdapter & | operator= (const FileAdapter &)=default |
FileAdapter & | operator= (FileAdapter &&)=default |
virtual | ~FileAdapter ()=default |
Public Member Functions inherited from OpenSim::DataAdapter | |
DataAdapter ()=default | |
DataAdapter (const DataAdapter &)=default | |
DataAdapter (DataAdapter &&)=default | |
DataAdapter & | operator= (const DataAdapter &)=default |
DataAdapter & | operator= (DataAdapter &&)=default |
virtual | ~DataAdapter ()=default |
Static Public Member Functions | |
static TimeSeriesTable | read (const std::string &fileName) |
Read a CSV file. More... | |
static void | write (const TimeSeriesTable &table, const std::string &fileName) |
Write a CSV file. More... | |
Static Public Member Functions inherited from OpenSim::DelimFileAdapter< double > | |
static const std::string | tableString () |
Key used for table associative array returned/accepted by write/read. More... | |
static std::string | dataTypeName () |
Name of the data type T (template parameter). More... | |
Static Public Member Functions inherited from OpenSim::FileAdapter | |
static OutputTables | readFile (const std::string &fileName) |
Read a file with the given name. More... | |
static void | writeFile (const InputTables &tables, const std::string &fileName) |
Write a collection of tables to the given file. More... | |
static std::string | findExtension (const std::string &filename) |
Find the extension from a filename. More... | |
static std::vector< std::string > | getNextLine (std::istream &stream, const std::string &delims) |
Get the next line from the stream and tokenize/split the line using the given delimiters. More... | |
Static Public Member Functions inherited from OpenSim::DataAdapter | |
static bool | registerDataAdapter (const std::string &identifier, const DataAdapter &adapter) |
Register a concrete DataAdapter by its unique string identifier. More... | |
Additional Inherited Members | |
Public Types inherited from OpenSim::DataAdapter | |
typedef std::map< std::string, std::shared_ptr< DataAdapter > > | RegisteredDataAdapters |
Type of the registry containing registered adapters. More... | |
typedef std::map< std::string, std::shared_ptr< AbstractDataTable > > | OutputTables |
Collection of tables returned by reading methods implemented in derived classes. More... | |
typedef std::map< std::string, const AbstractDataTable * > | InputTables |
Collection of tables accepted by writing methods implemented in derived classes. More... | |
Protected Member Functions inherited from OpenSim::DelimFileAdapter< double > | |
OutputTables | extendRead (const std::string &filename) const override |
Implementation of the read functionality. More... | |
void | extendWrite (const InputTables &tables, const std::string &filename) const override |
Implementation of the write functionality. More... | |
SimTK::RowVector_< double > | readElems (const std::vector< std::string > &tokens) const |
Read elements of type T (template parameter) from a sequence of tokens. More... | |
void | writeElem (std::ostream &stream, const double &elem, const unsigned &prec) const |
Write an element of type T (template parameter) to stream with the specified precision. More... | |
Static Protected Member Functions inherited from OpenSim::FileAdapter | |
static std::vector< std::string > | tokenize (const std::string &str, const std::string &delims) |
Tokenize/split a given string using the given delimiters. More... | |
Static Protected Member Functions inherited from OpenSim::DataAdapter | |
static std::shared_ptr< DataAdapter > | createAdapter (const std::string &identifier) |
Creator of concrete DataAdapter(s) for the specified source type by its unique identifier (string). More... | |
CSVFileAdapter is a DelimFileAdapter that presets the delimiters appropriately for CSV files.
OpenSim::CSVFileAdapter::CSVFileAdapter | ( | ) |
|
default |
|
default |
|
default |
|
overridevirtual |
Implements OpenSim::DataAdapter.
|
default |
|
default |
|
static |
Read a CSV file.
|
static |
Write a CSV file.