1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +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
namespace IOTypes
{
typedef enum
{
NoType = 0,
DMat = 1,
Sample = 2
} Type;
}
// Abstract base for IO objects
class IOObject
{
public:
virtual ~IOObject(void);
virtual IOTypes::Type IOType(void);
enum IOType
{
noType = 0,
dMat = 1,
sample = 2
};
public:
virtual ~IOObject(void) = 0;
virtual IOType getType(void) = 0;
};
LATAN_END_CPPDECL

View File

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

View File

@ -20,7 +20,7 @@ DMat::DMat(unsigned int nrow, unsigned int 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(unsigned int nrow, unsigned int ncol);
// IO
virtual IOTypes::Type IOType(void);
virtual IOType getType(void);
};
LATAN_END_CPPDECL