From ac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Fri, 17 Dec 2004 19:56:21 +0000 Subject: 1.0-pre5 --- xml/type.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xml/type.h') diff --git a/xml/type.h b/xml/type.h index 1776ddf..7aa47d1 100644 --- a/xml/type.h +++ b/xml/type.h @@ -1,5 +1,5 @@ /* - * $Id: type.h,v 1.5 2004/12/14 20:02:31 lordjaxom Exp $ + * $Id: type.h,v 1.6 2004/12/17 19:56:16 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_XML_TYPE_H @@ -22,6 +22,9 @@ private: int mNumber; public: + static cxType True; + static cxType False; + cxType(void): mType(boolean), mNumber(0) {} cxType(const char *String): mType(string), mString(String ?: "") {} cxType(std::string String): mType(string), mString(String) {} @@ -30,15 +33,11 @@ public: cxType(bool Value): mType(boolean), mNumber(Value ? 1 : 0) {} const std::string &String(void); - int Number(void) const; + int Number(void) const { return mType == number ? mNumber : 0; } operator std::string () { return String(); } operator int () { return Number(); } operator bool () { return Number(); } }; -inline int cxType::Number(void) const { - return mType == number ? mNumber : 0; -} - #endif // VDR_TEXT2SKIN_XML_TYPE_H -- cgit v1.2.3