Public Types | |
typedef bool(* | FilenameTester) (const std::string &filename) |
typedef GeoReader *(* | Constructor) (ReadGeo *, int fd, const unsigned char *buf, int bufsize) |
typedef bool(* | Tester) (int fd, const unsigned char *buf, int bufsize) |
typedef GeoReaderFormat *(* | GeoReaderFormatConstructor) (ReadGeo *) |
Public Types inherited from DD::Image::Description | |
typedef Node *(* | NodeBuilder) (void *) |
typedef std::vector< Description * > | DescriptionList |
Public Member Functions | |
GeoDescription (const char *n, const char *l, Constructor c, Tester t=nullptr, License *f=nullptr, bool needFd=true) | |
GeoDescription (const char *n, Constructor c, Tester t=nullptr, License *f=nullptr, bool needFd=true) | |
GeoDescription (const char *n, Constructor c, GeoReaderFormatConstructor fmtConstructor, Tester t=nullptr, License *f=nullptr, bool needFd=true) | |
GeoDescription (const char *n, Constructor c, GeoReaderFormatConstructor fmtConstructor, FilenameTester ft, License *f=nullptr, bool needFd=true) | |
Public Member Functions inherited from DD::Image::ReaderDescription | |
ReaderDescription (const char *n, const char *l) | |
Static Public Member Functions | |
static const GeoDescription * | find (int i) |
static const GeoDescription * | find (const char *name) |
static FilenameTester | findFilenameTester (const GeoDescription *desc) |
Static Public Member Functions inherited from DD::Image::ReaderDescription | |
static const Description * | find (const DescriptionList &list, const char *name, const char *pluginSuffix, const char *&triedPlugin) |
Public Attributes | |
Constructor | _constructor |
GeoReaderFormatConstructor | _format_constructor |
Tester | _test |
bool | _needFd |
Public Attributes inherited from DD::Image::ReaderDescription | |
const char * | names |
const char * | label |
Public Attributes inherited from DD::Image::Description | |
const char * | compiled |
const char * | plugin |
License * | license |
Static Public Attributes | |
static DD::Image::Description::DescriptionList | _collection |
Additional Inherited Members | |
Protected Member Functions inherited from DD::Image::Description | |
void | ctor (void(*f)(Description *)) |
void | ctor (void(*f)(Description *), NodeBuilder nodeBuilder) |
This structure describes a subclass of GeoReader. The constructor builds these into a list that ReadGeo operators search to find a way to read a filename given to them.
Sample code for a plugin that defines a GeoReader:
|
inline |
Constructor that fills all fields and allows a license check.
|
inline |
Simpler constructor that sets names and label to same value.
|
inline |
Simpler constructor that sets names and label to same value.
|
inline |
This constructor takes a FilenameTester parameter. FilenameTester is a function pointer to test a file's compatibility with the reader using the given filename. This is an alternative to using GeoDescription::Tester which requires a file descriptor.
|
static |
A list of pointers to all possible Descriptions to be used for instantiation of geo plugins.
Constructor DD::Image::GeoDescription::_constructor |
Make an instance of the reader.
If test is not null then fd is an opened file, it is seeked to bufsize, and buf contains the first bufsize bytes of the file. You can use this data to store stuff into the info_ (however you cannot report error messages and filename() does not work yet).
Tester DD::Image::GeoDescription::_test |
If this pointer is non-null, it indicates a named Unix file is used to store the image. In this case Read will open the file and call this function. If it returns non-zero then the constructor will be called. This allows Read to poll all the Readers to see which one can read an unknown file format.
If this is null then zero is passed as the fd to the constructors.
buf points at the first bufsize characters of the file. bufsize is at least 512. If necessary you can mess with the fd, but be sure to seek it back to bufsize.
bool DD::Image::GeoDescription::_needFd |
whether or not the file descriptor is really needed (defaults to true)
if false then any open FD on the file will be closed before build is called, and -1 passed in
©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |