Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <ReaderWriterSet.hpp>
Public Member Functions | |
Handler (reader_factory_t read_f, writer_factory_t write_f, const char *name, const char *desc, const char *const *ext, int num_ext) | |
const std::string & | name () const |
const std::string & | description () const |
void | get_extensions (std::vector< std::string > &list_out) const |
bool | have_reader () const |
bool | have_writer () const |
ReaderIface * | make_reader (Interface *iface) const |
WriterIface * | make_writer (Interface *iface) const |
bool | reads_extension (const char *ext) const |
bool | writes_extension (const char *ext) const |
bool | operator== (const char *name) const |
Private Attributes | |
reader_factory_t | mReader |
writer_factory_t | mWriter |
std::string | mName |
std::string | mDescription |
std::vector< std::string > | mExtensions |
Friends | |
class | ReaderWriterSet |
Definition at line 103 of file ReaderWriterSet.hpp.
moab::ReaderWriterSet::Handler::Handler | ( | reader_factory_t | read_f, |
writer_factory_t | write_f, | ||
const char * | name, | ||
const char * | desc, | ||
const char *const * | ext, | ||
int | num_ext | ||
) |
Definition at line 248 of file ReaderWriterSet.cpp.
References mExtensions.
: mReader( read_f ), mWriter( write_f ), mName( nm ), mDescription( desc ), mExtensions( num_ext ) { for( int i = 0; i < num_ext; ++i ) mExtensions[i] = ext[i]; }
const std::string& moab::ReaderWriterSet::Handler::description | ( | ) | const [inline] |
Definition at line 120 of file ReaderWriterSet.hpp.
References mDescription.
{ return mDescription; }
void moab::ReaderWriterSet::Handler::get_extensions | ( | std::vector< std::string > & | list_out | ) | const [inline] |
Definition at line 124 of file ReaderWriterSet.hpp.
References mExtensions.
{ list_out = mExtensions; }
bool moab::ReaderWriterSet::Handler::have_reader | ( | ) | const [inline] |
Definition at line 129 of file ReaderWriterSet.hpp.
References mReader.
Referenced by make_reader().
{ return NULL != mReader; }
bool moab::ReaderWriterSet::Handler::have_writer | ( | ) | const [inline] |
Definition at line 133 of file ReaderWriterSet.hpp.
References mWriter.
Referenced by make_writer().
{ return NULL != mWriter; }
ReaderIface* moab::ReaderWriterSet::Handler::make_reader | ( | Interface * | iface | ) | const [inline] |
Definition at line 138 of file ReaderWriterSet.hpp.
References have_reader(), and mReader.
{ return have_reader() ? mReader( iface ) : NULL; }
WriterIface* moab::ReaderWriterSet::Handler::make_writer | ( | Interface * | iface | ) | const [inline] |
Definition at line 143 of file ReaderWriterSet.hpp.
References have_writer(), and mWriter.
{ return have_writer() ? mWriter( iface ) : NULL; }
const std::string& moab::ReaderWriterSet::Handler::name | ( | ) | const [inline] |
bool moab::ReaderWriterSet::Handler::operator== | ( | const char * | name | ) | const |
Definition at line 325 of file ReaderWriterSet.cpp.
bool moab::ReaderWriterSet::Handler::reads_extension | ( | const char * | ext | ) | const |
Definition at line 292 of file ReaderWriterSet.cpp.
{ if( !have_reader() ) return false; std::vector< std::string >::const_iterator siter; for( siter = mExtensions.begin(); siter != mExtensions.end(); ++siter ) if( !( *siter ).compare( ext ) ) return true; else if( 0 == strcasecmp( siter->c_str(), ext ) ) return true; return false; }
bool moab::ReaderWriterSet::Handler::writes_extension | ( | const char * | ext | ) | const |
Definition at line 306 of file ReaderWriterSet.cpp.
{ if( !have_writer() ) return false; std::vector< std::string >::const_iterator siter; for( siter = mExtensions.begin(); siter != mExtensions.end(); ++siter ) if( !( *siter ).compare( ext ) ) return true; else if( 0 == strcasecmp( siter->c_str(), ext ) ) return true; return false; }
friend class ReaderWriterSet [friend] |
Definition at line 106 of file ReaderWriterSet.hpp.
std::string moab::ReaderWriterSet::Handler::mDescription [private] |
Definition at line 157 of file ReaderWriterSet.hpp.
Referenced by description().
std::vector< std::string > moab::ReaderWriterSet::Handler::mExtensions [private] |
Definition at line 158 of file ReaderWriterSet.hpp.
Referenced by get_extensions(), and Handler().
std::string moab::ReaderWriterSet::Handler::mName [private] |
Definition at line 157 of file ReaderWriterSet.hpp.
Referenced by name().
Definition at line 154 of file ReaderWriterSet.hpp.
Referenced by have_reader(), and make_reader().
Definition at line 155 of file ReaderWriterSet.hpp.
Referenced by have_writer(), and make_writer().