#ifndef _MA_CLASSFACTORY_
#define _MA_CLASSFACTORY_

#define REGISTER_CLASS\
    virtual long classID() { return (long)&CLASS_ID; }
    
#define PUBLIC_CLASS_ID\
    static short CLASS_ID    
    
#define REGISTER_CLASS_ID(X)\
    short X::CLASS_ID=0
    
#define CLASS_ID(X) (long)&X::CLASS_ID

#define max(x,y) (x>=y)?x:y
#define min(x,y) (x<=y)?x:y


// Debe implementarse está función como punto de entrad
// del programa
//
extern int MainProc(int argc, char** argv);

// ******************************************
// Superclase de toda la jerarquia de objetos
// ******************************************
//
class TMAObject
{
    REGISTER_CLASS protected:          
    public:                 
        PUBLIC_CLASS_ID;  
        bool isInstanceOf(long class_id);
        long getClassID(void);
        virtual ~TMAObject()=0L;
};
typedef TMAObject *PMAObject;

#endif
