API  4.5.1
For C++ developers
OpenSim::TRCFileAdapter Class Reference

TRCFileAdapter is a FileAdapter that reads and writes TRC files. More...

+ Inheritance diagram for OpenSim::TRCFileAdapter:

Public Member Functions

 TRCFileAdapter ()=default
 
 TRCFileAdapter (const TRCFileAdapter &)=default
 
 TRCFileAdapter (TRCFileAdapter &&)=default
 
TRCFileAdapteroperator= (const TRCFileAdapter &)=default
 
TRCFileAdapteroperator= (TRCFileAdapter &&)=default
 
 ~TRCFileAdapter ()=default
 
TRCFileAdapterclone () 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 TimeSeriesTableVec3 &table, const std::string &filename)
 Write a table to a TRC file. 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...
 

Static Public Attributes

static const std::string _markers
 Key used for table associative array returned/accepted by write/read. More...
 

Protected Member Functions

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...
 

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...
 
- Static Protected Member Functions inherited from OpenSim::DataAdapter
static std::shared_ptr< DataAdaptercreateAdapter (const std::string &identifier)
 Creator of concrete DataAdapter(s) for the specified source type by its unique identifier (string). More...
 

Detailed Description

TRCFileAdapter is a FileAdapter that reads and writes TRC files.

It accepts (when writing) and returns (when reading) a specific type of DataTable referred to as Table in this class. Be sure to expect/provide that table when working with this adapter.

Constructor & Destructor Documentation

◆ TRCFileAdapter() [1/3]

OpenSim::TRCFileAdapter::TRCFileAdapter ( )
default

◆ TRCFileAdapter() [2/3]

OpenSim::TRCFileAdapter::TRCFileAdapter ( const TRCFileAdapter )
default

◆ TRCFileAdapter() [3/3]

OpenSim::TRCFileAdapter::TRCFileAdapter ( TRCFileAdapter &&  )
default

◆ ~TRCFileAdapter()

OpenSim::TRCFileAdapter::~TRCFileAdapter ( )
default

Member Function Documentation

◆ clone()

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

Implements OpenSim::DataAdapter.

◆ extendRead()

OutputTables OpenSim::TRCFileAdapter::extendRead ( const std::string &  filename) const
overrideprotectedvirtual

Implementation of the read functionality.

Implements OpenSim::DataAdapter.

◆ extendWrite()

void OpenSim::TRCFileAdapter::extendWrite ( const InputTables tables,
const std::string &  filename 
) const
overrideprotectedvirtual

Implementation of the write functionality.

Implements OpenSim::DataAdapter.

◆ operator=() [1/2]

TRCFileAdapter& OpenSim::TRCFileAdapter::operator= ( const TRCFileAdapter )
default

◆ operator=() [2/2]

TRCFileAdapter& OpenSim::TRCFileAdapter::operator= ( TRCFileAdapter &&  )
default

◆ write()

static void OpenSim::TRCFileAdapter::write ( const TimeSeriesTableVec3 table,
const std::string &  filename 
)
static

Write a table to a TRC file.

The filename provided need not contain ".trc".

Member Data Documentation

◆ _markers

const std::string OpenSim::TRCFileAdapter::_markers
static

Key used for table associative array returned/accepted by write/read.


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