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

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 
00048     YCPIntegerRep(const char *r);
00049 
00050 public:
00055     long long value() const;
00056 
00064     YCPOrder compare(const YCPInteger &v) const;
00065 
00070     string toString() const;
00071 
00075     std::ostream & toStream (std::ostream & str) const;
00076 
00080     YCPValueType valuetype() const;
00081 };
00082 
00089 class YCPInteger : public YCPValue
00090 {
00091     DEF_COMMON(Integer, Value);
00092 public:
00093     YCPInteger(long long v) : YCPValue(new YCPIntegerRep(v)) {}
00094     YCPInteger(const char *r) : YCPValue(new YCPIntegerRep(r)) {}
00095     YCPInteger(std::istream & str);
00096 };
00097 
00098 #endif   // YCPInteger_h

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