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 
00081     YCPValueType valuetype() const;
00082 
00083 };
00084 
00091 class YCPInteger : public YCPValue
00092 {
00093     DEF_COMMON(Integer, Value);
00094 public:
00095     YCPInteger(long long v) : YCPValue(new YCPIntegerRep(v)) {}
00096     YCPInteger(const char *r, bool *valid = NULL) : YCPValue(new YCPIntegerRep(r, valid)) {}
00097     YCPInteger(bytecodeistream & str);
00098 };
00099 
00100 #endif   // YCPInteger_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6