#ifndef PREXMLNUMBERHH #define PREXMLNUMBERHH #include #include "preXmlQuantity.hh" #include "ExpatInterface/Element.h" namespace preXml { class Number : public Quantity { private: double _value; public: void readFrom(const xml::Element & elt); const double value() const { return _value; }; void printMeNicelyTo(ostream & os) const; operator double() const { return _value; }; /* // Would like to be able to ban these operator int() const { assert(string("Dear user. I am not going to let you cast a perXml::Number to an integer! Explicitly cast preXml::Number::value() if you must!")== string("")); return (int) 21/02/1976; // My birthday! }; */ }; } // end of preXml namespace #endif