1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-14 01:45:35 +00:00

cleaner, abstract, IOObject base class

This commit is contained in:
Antonin Portelli 2014-01-21 14:29:04 +01:00
parent d45e64f87d
commit 4e440978d7
4 changed files with 12 additions and 16 deletions

View File

@ -5,22 +5,19 @@
LATAN_BEGIN_CPPDECL LATAN_BEGIN_CPPDECL
namespace IOTypes
{
typedef enum
{
NoType = 0,
DMat = 1,
Sample = 2
} Type;
}
// Abstract base for IO objects // Abstract base for IO objects
class IOObject class IOObject
{ {
public: public:
virtual ~IOObject(void); enum IOType
virtual IOTypes::Type IOType(void); {
noType = 0,
dMat = 1,
sample = 2
};
public:
virtual ~IOObject(void) = 0;
virtual IOType getType(void) = 0;
}; };
LATAN_END_CPPDECL LATAN_END_CPPDECL

View File

@ -31,7 +31,6 @@ liblatan_la_SOURCES = \
IO.cpp \ IO.cpp \
IOASCIIParser.ypp \ IOASCIIParser.ypp \
IOASCIILexer.lpp \ IOASCIILexer.lpp \
IOObject.cpp \
Mat.cpp \ Mat.cpp \
MathCompiler.cpp \ MathCompiler.cpp \
MathParser.ypp \ MathParser.ypp \

View File

@ -20,7 +20,7 @@ DMat::DMat(unsigned int nrow, unsigned int ncol)
: DMatBase(nrow,ncol) : DMatBase(nrow,ncol)
{} {}
IOTypes::Type DMat::IOType(void) IOObject::IOType DMat::getType(void)
{ {
return IOTypes::DMat; return dMat;
} }

View File

@ -21,7 +21,7 @@ public:
DMat(const DMat& M); DMat(const DMat& M);
DMat(unsigned int nrow, unsigned int ncol); DMat(unsigned int nrow, unsigned int ncol);
// IO // IO
virtual IOTypes::Type IOType(void); virtual IOType getType(void);
}; };
LATAN_END_CPPDECL LATAN_END_CPPDECL