objreader.cpp

00001 #include <factory/objreader.h>
00002 
00003 namespace complex_factory
00004 {
00005   ObjReaderError::ObjReaderError(Type t)
00006     : _type(t)
00007   {
00008     initFromType();
00009   }
00010 
00011   ObjReaderError::ObjReaderError(Type t, QString msg)
00012     : _type(t)
00013   {
00014     initFromType();
00015     _string += " ";
00016     _string += msg;
00017   }
00018 
00019   void ObjReaderError::initFromType()
00020   {
00021     switch(_type)
00022     {
00023       case NO_ERRORS:
00024         _string = "No error.";
00025         break;
00026       case BAD_NUMBER_OF_DIMENSIONS:
00027         _string = "Bad number of dimensions.";
00028         break;
00029       case FILE_FORMAT:
00030         _string = "Bad file format.";
00031         break;
00032       case DOUBLE_EXPECTED:
00033         _string = "Double expected.";
00034         break;
00035       case INTEGER_EXPECTED:
00036         _string = "Integer expected.";
00037         break;
00038       case INVALID_FACE:
00039         _string = "Invalid face.";
00040         break;
00041       case CANNOT_OPEN_FILE:
00042         _string = "Cannot open file.";
00043         break;
00044     }
00045   }
00046 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:37:50 2013 for VVE by  doxygen 1.6.3