|
|
static std::shared_ptr< json > | readData (std::istream &stream) |
| |
|
| virtual bool | canRead (const std::type_index &index) const override |
| |
| static void | checkExists (const std::filesystem::path &path) |
| |
|
static std::filesystem::path | downloadAndCacheIfUrl (const std::filesystem::path &url) |
| |
|
static filesystem::FileHandle | fopen (const std::filesystem::path &path, const char *mode) |
| |
|
static filesystem::FileHandle | fopenAndCacheIfUrl (const std::filesystem::path &path, const char *mode) |
| |
| static std::ifstream | open (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::in) |
| |
|
static std::ifstream | openAndCacheIfUrl (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::in) |
| |
| static std::string | readFileContents (const std::filesystem::path &path) |
| |
|
std::vector< FileExtension > | extensions_ |
| |
◆ clone()
| virtual JSONReader * inviwo::JSONReader::clone |
( |
| ) |
const |
|
overridevirtual |
◆ readData() [1/3]
| virtual std::shared_ptr< json > inviwo::JSONReader::readData |
( |
const std::filesystem::path & | fileName | ) |
|
|
overridevirtual |
◆ readData() [2/3]
| virtual std::shared_ptr< json > inviwo::JSONReader::readData |
( |
const std::filesystem::path & | filePath, |
|
|
MetaDataOwner * | ) |
|
overridevirtual |
◆ readData() [3/3]
| virtual std::shared_ptr< json > inviwo::JSONReader::readData |
( |
const std::filesystem::path & | filePath, |
|
|
MetaDataOwner * | owner, |
|
|
std::stop_token | stop ) |
|
overridevirtual |
Optional overload supporting cancellation. Readers that can abort a long running read should override this, poll stop.stop_requested() at natural checkpoints, and return nullptr as soon as a stop is requested. Note that nullptr is thus a valid, non-exceptional result.
Overriding readers should implement the pure virtual single argument overload by delegating to this one, and add using DataReaderType<T>::readData; to avoid hiding the other overloads.
The default implementation ignores stop and performs an uninterruptible read.
Reimplemented from inviwo::DataReaderType< json >.
The documentation for this class was generated from the following file:
- modules/json/include/modules/json/io/jsonreader.h