|
HDK
|
#include <GEO_IOTranslator.h>
Inheritance diagram for GEO_IOTranslator:Public Types | |
| typedef UT_StringMap < UT_StringHolder > | geo_DSODefinitions |
Public Member Functions | |
| GEO_IOTranslator () | |
| virtual | ~GEO_IOTranslator () |
| virtual GEO_IOTranslator * | duplicate () const =0 |
| This method is used to create a copy of the sub-class. More... | |
| virtual const char * | formatName () const =0 |
| virtual int | checkExtension (const char *name)=0 |
| virtual void | getFileExtensions (UT_StringArray &extensions) const |
| virtual int | checkMagicNumber (unsigned magic)=0 |
| virtual bool | fileStat (const char *filename, GA_Stat &stat, uint level) |
| virtual GA_Detail::IOStatus | fileLoad (GEO_Detail *gdp, UT_IStream &is, bool ate_magic)=0 |
| virtual GA_Detail::IOStatus | fileSave (const GEO_Detail *gdp, std::ostream &os)=0 |
| virtual GA_Detail::IOStatus | fileSaveToFile (const GEO_Detail *gdp, const char *filename) |
Static Public Member Functions | |
| static const geo_DSODefinitions & | dsoDefinitions () |
| Return the list of DSO based translators. More... | |
Protected Member Functions | |
| bool | statJSONStream (UT_IStream &is, GA_Stat &stat, uint level) const |
| Stat a .bgeo JSON stream. More... | |
| void | eraseDSODefinition () |
Definition at line 24 of file GEO_IOTranslator.h.
Define a map where the key is the IOTranslator format name and the value is the DSO file defining the translator. Built-in translators don't appear in this list.
Definition at line 30 of file GEO_IOTranslator.h.
| GEO_IOTranslator::GEO_IOTranslator | ( | ) |
|
virtual |
|
pure virtual |
Method to check the extension of the name to see if it matches one that we can handle. Returns true if there's a match
Implemented in GEO_IORib, GusdGEO_IOTranslator, GEO_IOBpoly, GEO_IOTable, and GLTF_IOTranslator.
|
pure virtual |
Method to check if the given magic number matches the magic number. Return true on a match.
Implemented in GEO_IORib, GusdGEO_IOTranslator, GEO_IOBpoly, GEO_IOTable, and GLTF_IOTranslator.
|
static |
Return the list of DSO based translators.
|
pure virtual |
This method is used to create a copy of the sub-class.
Implemented in GEO_IORib, GusdGEO_IOTranslator, GEO_IOBpoly, GEO_IOTable, and GLTF_IOTranslator.
| void GEO_IOTranslator::eraseDSODefinition | ( | ) |
|
pure virtual |
Method to load from a stream. If the ate_magic flag is on, then the library has already read the magic number and the loader should not expect it. If the file format doesn't support reading from streams, it can use UT_IStream::isRandomAccessFile to get the raw name to read from. Return false if this translator doesn't support loading.
Implemented in GEO_IORib, GusdGEO_IOTranslator, GEO_IOBpoly, GEO_IOTable, and GLTF_IOTranslator.
|
pure virtual |
Method to save a gdp to another format. Return false if this translator does not support saving.
Implemented in GusdGEO_IOTranslator, GEO_IORib, GEO_IOBpoly, GEO_IOTable, and GLTF_IOTranslator.
|
virtual |
Method to save a gdp to another format via a filename. Return false if this translator does not support saving.
This is an optional method. By default, it will create a stream and call the streaming version of fileSave().
Reimplemented in GEO_IOTable, and GLTF_IOTranslator.
|
virtual |
Method to "stat" a file. If possible, stat shouldn't have to load the entire geometry.
Reimplemented in GEO_IOTable.
|
pure virtual |
Returns the label for the geometry format that this translator supports.
Implemented in GEO_IORib, GusdGEO_IOTranslator, GEO_IOBpoly, GEO_IOTable, and GLTF_IOTranslator.
|
virtual |
Method to return a list of the file extensions matched by this translator. The strings should contain the extensions (with dots). For exmple [".eps", ".ai"]. The default method returns nothing.
Reimplemented in GusdGEO_IOTranslator, and GLTF_IOTranslator.
|
protected |
Stat a .bgeo JSON stream.