Inviwo 0.9.12-pre
Inviwo documentation
 
Loading...
Searching...
No Matches
inviwo::JSONDataFrameWriter Class Reference

#include <jsondataframewriter.h>

+ Inheritance diagram for inviwo::JSONDataFrameWriter:

Public Member Functions

 JSONDataFrameWriter (const JSONDataFrameWriter &)=default
 
 JSONDataFrameWriter (JSONDataFrameWriter &&) noexcept=default
 
JSONDataFrameWriteroperator= (const JSONDataFrameWriter &)=default
 
JSONDataFrameWriteroperator= (JSONDataFrameWriter &&) noexcept=default
 
virtual JSONDataFrameWriterclone () const override
 
virtual void writeData (const DataFrame *data, const std::filesystem::path &filePath) const override
 Write data to filePath.
 
virtual std::unique_ptr< std::vector< unsigned char > > writeDataToBuffer (const DataFrame *data, std::string_view fileExtension) const override
 
void writeData (const DataFrame *data, std::ostream &os) const
 
- Public Member Functions inherited from inviwo::DataWriterType< DataFrame >
 DataWriterType (const DataWriterType &rhs)=default
 
 DataWriterType (DataWriterType &&rhs) noexcept=default
 
DataWriterTypeoperator= (const DataWriterType &that)=default
 
DataWriterTypeoperator= (DataWriterType &&that) noexcept=default
 
- Public Member Functions inherited from inviwo::DataWriter
 DataWriter (const DataWriter &rhs)
 
DataWriteroperator= (const DataWriter &that)
 
 DataWriter (DataWriter &&rhs) noexcept=default
 
DataWriteroperator= (DataWriter &&that) noexcept=default
 
const std::vector< FileExtension > & getExtensions () const
 
void addExtension (FileExtension ext)
 
Overwrite getOverwrite () const
 
void setOverwrite (Overwrite val)
 
void checkOverwrite (const std::filesystem::path &path) const
 
virtual bool setOption (std::string_view key, std::any value)
 Set writer specific options See the documentation of the specific writer for the available options.
 
virtual std::any getOption (std::string_view key) const
 Query the value of a writer specific option.
 
template<typename T>
bool writesType () const
 

Additional Inherited Members

- Static Public Member Functions inherited from inviwo::DataWriter
static void checkOverwrite (const std::filesystem::path &path, Overwrite overwrite)
 
- Protected Member Functions inherited from inviwo::DataWriterType< DataFrame >
virtual bool canWrite (const std::type_index &index) const override
 
- Protected Member Functions inherited from inviwo::DataWriter
std::ofstream open (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::out) const
 
- Protected Attributes inherited from inviwo::DataWriter
Overwrite overwrite_
 
std::vector< FileExtensionextensions_
 

Detailed Description

Writes a DataFrame into a json file Expects object layout: [ {"Col1": val11, "Col2": val12 }, {"Col1": val21, "Col2": val22 } ] The example above contains two rows and two columns.

Member Function Documentation

◆ clone()

virtual JSONDataFrameWriter * inviwo::JSONDataFrameWriter::clone ( ) const
overridevirtual

◆ writeData()

virtual void inviwo::JSONDataFrameWriter::writeData ( const DataFrame * data,
const std::filesystem::path & filePath ) const
overridevirtual

Write data to filePath.

Exceptions
DataWriterExceptionif anything goes wrong

Implements inviwo::DataWriterType< DataFrame >.

◆ writeDataToBuffer()

virtual std::unique_ptr< std::vector< unsigned char > > inviwo::JSONDataFrameWriter::writeDataToBuffer ( const DataFrame * data,
std::string_view fileExtension ) const
overridevirtual

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