Patate Lib  0.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
PatateCommon::OBJBaseReader< _Mesh > Class Template Referenceabstract

Inherited by PatateCommon::OBJReader< _Mesh >, and Vitelotte::MVGReader< _Mesh >.

Public Types

typedef _Mesh Mesh
 
typedef Mesh::Vector Vector
 
typedef bool(* ErrorCallback )(const std::string &msg, unsigned line, void *ptr)
 

Public Member Functions

bool read (std::istream &in, Mesh &mesh)
 
void setErrorCallback (ErrorCallback error, ErrorCallback warning, void *ptr)
 

Protected Member Functions

virtual void parseHeader (std::istream &in, Mesh &mesh)
 
virtual bool parseDefinition (const std::string &spec, std::istream &def, Mesh &mesh)=0
 
bool readLine (std::istream &in)
 
void parseVector (std::istream &in)
 
void parseIndicesList (const std::string &_list, std::vector< unsigned > &_indices)
 
void error (const std::string &msg)
 
void warning (const std::string &msg)
 

Protected Attributes

unsigned m_lineNb
 
bool m_error
 
std::string m_line
 
std::istringstream m_lineStream
 
std::istringstream m_indicesStream
 
Vector m_vector
 
ErrorCallback m_errorCallback
 
ErrorCallback m_warningCallback
 
void * m_errorCallbackPtr