Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

YCPBoolean.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |  
00003 |                      __   __    ____ _____ ____                      |  
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |  
00005 |                       \ V / _` \___ \ | |   __) |                    |  
00006 |                        | | (_| |___) || |  / __/                     |  
00007 |                        |_|\__,_|____/ |_| |_____|                    |  
00008 |                                                                      |  
00009 |                               core system                            | 
00010 |                                                        (C) SuSE GmbH |  
00011 \----------------------------------------------------------------------/ 
00012 
00013    File:       YCPBoolean.h
00014 
00015    Author:     Mathias Kettner <kettner@suse.de>
00016    Maintainer: Thomas Roelz <tom@suse.de>
00017 
00018 /-*/
00019 // -*- c++ -*-
00020 
00021 #ifndef YCPBoolean_h
00022 #define YCPBoolean_h
00023 
00024 
00025 #include "YCPValue.h"
00026 
00027 
00034 class YCPBooleanRep : public YCPValueRep
00035 {
00036     bool v;
00037 
00038 protected:
00039     friend class YCPBoolean;
00040 
00044     YCPBooleanRep(bool v);
00045 
00051     YCPBooleanRep(const char *r);
00052 
00053 public:
00058     bool value() const;
00059 
00067     YCPOrder compare(const YCPBoolean &) const;
00068 
00073     string toString() const;
00074 
00078     std::ostream & toStream (std::ostream & str) const;
00079 
00083     YCPValueType valuetype() const;
00084 };
00085 
00092 class YCPBoolean : public YCPValue
00093 {
00094     DEF_COMMON(Boolean, Value);
00095 public:
00096     YCPBoolean(bool v) : YCPValue(new YCPBooleanRep(v)) {}
00097     YCPBoolean(const char *r) : YCPValue(new YCPBooleanRep(r)) {}
00098     YCPBoolean(std::istream & str);
00099 };
00100 
00101 #endif  // YCPBoolean_h

Generated on Fri Nov 9 18:15:22 2007 for yast2-core by doxygen 1.3.6