Files correlati : cg0.exe cg0700a.msk cg0700b.msk cg3.exe cg4.exe Bug : Commento: Merge 1.0 libraries
35 lines
762 B
C++
35 lines
762 B
C++
#ifndef __ROMAN_H
|
|
#define __ROMAN_H
|
|
|
|
#ifndef __OBJECT_H
|
|
#include <object.h>
|
|
#endif
|
|
|
|
class TRoman : public TObject
|
|
{
|
|
word _value;
|
|
|
|
protected:
|
|
word ctoi(char c) const;
|
|
const char * itor(word) const ;
|
|
word rtoi (const char *) const ;
|
|
void print_on (ostream& of) const { of << itor(_value) ; }
|
|
|
|
public:
|
|
operator const char * () const { return itor(_value); }
|
|
operator word() const { return _value; }
|
|
|
|
TRoman& operator = (const TRoman& rom) { _value = rom._value; return *this; }
|
|
TRoman& operator = (word num) { _value = num; return *this; }
|
|
TRoman& operator = (const char * val) { _value = rtoi(val); return *this;}
|
|
|
|
TRoman (int num = 0) { *this = num; }
|
|
TRoman (const char * val = "") { *this = val; }
|
|
virtual ~TRoman () {}
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|