#ifndef PREXMLLENGTHHH #define PREXMLLENGTHHH #include #include "preXmlQuantity.hh" #include "ExpatInterface/Element.h" namespace preXml { class Length : 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 preXml::Length to an integer! Explicitly cast preXml::Length::value() if you must!")==string("")); return (int) 21/02/1976; // My birthday! }; */ }; } // end of preXml namespace #endif