YCPInteger.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:       YCPInteger.h
00014 
00015    Author:     Mathias Kettner <kettner@suse.de>
00016    Maintainer: Thomas Roelz <tom@suse.de>
00017 
00018 /-*/
00019 // -*- c++ -*-
00020 
00021 #ifndef YCPInteger_h
00022 #define YCPInteger_h
00023 
00024 
00025 #include "YCPValue.h"
00026 
00027     
00033 class YCPIntegerRep : public YCPValueRep
00034 {
00035     long long v;
00036 
00037 protected:
00038     friend class YCPInteger;
00039 
00043     YCPIntegerRep(long long v);
00044 
00049     YCPIntegerRep(const char *r, bool *valid);
00050 
00051 public:
00056     long long value() const;
00057 
00065     YCPOrder compare(const YCPInteger &v) const;
00066 
00071     string toString() const;
00072 
00076     std::ostream & toStream (std::ostream & str) const;
00077     std::ostream & toXml (std::ostream & str, int indent ) const;
00078 
00082     YCPValueType valuetype() const;
00083 
00084 };
00085 
00092 class YCPInteger : public YCPValue
00093 {
00094     DEF_COMMON(Integer, Value);
00095 public:
00096     YCPInteger(long long v) : YCPValue(new YCPIntegerRep(v)) {}
00097     YCPInteger(const char *r, bool *valid = NULL) : YCPValue(new YCPIntegerRep(r, valid)) {}
00098     YCPInteger(bytecodeistream & str);
00099 };
00100 
00101 #endif   // YCPInteger_h

Generated on Tue Nov 6 01:27:46 2007 for yast2-core by  doxygen 1.5.3