15 #include <vsg/io/ReaderWriter.h>
23 class VSG_DECLSPEC
VSG :
public Inherit<ReaderWriter, VSG>
38 const ObjectFactory* getObjectFactory()
const {
return _objectFactory; }
47 using FormatInfo = std::pair<FormatType, VsgVersion>;
49 FormatInfo readHeader(std::istream& fin)
const;
50 void writeHeader(std::ostream& fout,
const FormatInfo& formatInfo)
const;
53 ref_ptr<ObjectFactory> _objectFactory;
Definition: ObjectFactory.h:27
ReaderWriter for reading and writing native VSG ascii and binary files.
Definition: VSG.h:24
vsg::ref_ptr< vsg::Object > read(const uint8_t *ptr, size_t size, vsg::ref_ptr< const vsg::Options >={}) const override
read object from memory block, return object on success, return null ref_ptr<> if format not supporte...
vsg::ref_ptr< vsg::Object > read(std::istream &fin, vsg::ref_ptr< const vsg::Options > options={}) const override
read object from input stream, return object on success, return null ref_ptr<> if format not supporte...
bool write(const vsg::Object *object, const vsg::Path &filename, vsg::ref_ptr< const vsg::Options > options={}) const override
write object to file, return true on success, return false on failure.
vsg::ref_ptr< vsg::Object > read(const vsg::Path &filename, vsg::ref_ptr< const vsg::Options > options={}) const override
read object from file, return object on success, return null ref_ptr<> if format not supported,...
bool write(const vsg::Object *object, std::ostream &fout, vsg::ref_ptr< const vsg::Options > options={}) const override
write object to output stream, return true on success, return false on failure.
bool getFeatures(Features &features) const override
get the Features supported by this ReaderWriter
Definition: ReaderWriter.h:92