API 4.4.1-2022-10-19-2c4045e59
For MATLAB, Python, Java, and C++ users
OpenSim::CSVFileAdapter Class Reference

CSVFileAdapter is a DelimFileAdapter that presets the delimiters appropriately for CSV files. More...

+ Inheritance diagram for OpenSim::CSVFileAdapter:

Public Member Functions

 CSVFileAdapter ()
 
 CSVFileAdapter (const CSVFileAdapter &)=default
 
 CSVFileAdapter (CSVFileAdapter &&)=default
 
 ~CSVFileAdapter ()=default
 
CSVFileAdapterclone () 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...
 
DelimFileAdapteroperator= (const DelimFileAdapter &)=default
 
DelimFileAdapteroperator= (DelimFileAdapter &&)=default
 
 ~DelimFileAdapter ()=default
 
DelimFileAdapterclone () const override
 
- Public Member Functions inherited from OpenSim::FileAdapter
 FileAdapter ()=default
 
 FileAdapter (const FileAdapter &)=default
 
 FileAdapter (FileAdapter &&)=default
 
FileAdapteroperator= (const FileAdapter &)=default
 
FileAdapteroperator= (FileAdapter &&)=default
 
virtual ~FileAdapter ()=default
 
- Public Member Functions inherited from OpenSim::DataAdapter
 DataAdapter ()=default
 
 DataAdapter (const DataAdapter &)=default
 
 DataAdapter (DataAdapter &&)=default
 
DataAdapteroperator= (const DataAdapter &)=default
 
DataAdapteroperator= (DataAdapter &&)=default
 
virtual ~DataAdapter ()=default
 
DataAdapter::OutputTables read (const std::string &dataSourceSpecification) const
 Public interface to read data from a dataSourceSpecification, typically a file or folder. More...
 
const std::shared_ptr< AbstractDataTablegetDataTable (const OutputTables &tables, const std::string tableName)
 Generic interface to retrieve a specific table by name from read result. More...
 

Static Public Member Functions

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 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 std::vector< std::string > tokenize (const std::string &str, const std::string &delims)
 Tokenize/split a given string using the given delimiters. More...
 
static std::shared_ptr< DataAdaptercreateAdapterFromExtension (const std::string &fileName)
 Create a concerte FileAdapter based on the extension of the passed in file and return it. 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...
 

Detailed Description

CSVFileAdapter is a DelimFileAdapter that presets the delimiters appropriately for CSV files.


Constructor & Destructor Documentation

◆ CSVFileAdapter() [1/3]

OpenSim::CSVFileAdapter::CSVFileAdapter ( )

◆ CSVFileAdapter() [2/3]

OpenSim::CSVFileAdapter::CSVFileAdapter ( const CSVFileAdapter )
default

◆ CSVFileAdapter() [3/3]

OpenSim::CSVFileAdapter::CSVFileAdapter ( CSVFileAdapter &&  )
default

◆ ~CSVFileAdapter()

OpenSim::CSVFileAdapter::~CSVFileAdapter ( )
default

Member Function Documentation

◆ clone()

CSVFileAdapter * OpenSim::CSVFileAdapter::clone ( ) const
overridevirtual

Implements OpenSim::DataAdapter.

◆ write()

static void OpenSim::CSVFileAdapter::write ( const TimeSeriesTable table,
const std::string &  fileName 
)
static

Write a CSV file.



The documentation for this class was generated from the following file: