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

PkgModuleError.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:       PkgModuleError.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose: Definition of "PkgModule" error values.
00019 
00020 /-*/
00021 #ifndef PkgModuleError_h
00022 #define PkgModuleError_h
00023 
00024 #include <iosfwd>
00025 
00026 #include <y2pm/ModulePkgError.h>
00027 
00029 //
00030 //      CLASS NAME : PkgModuleError
00035 class PkgModuleError : private ModulePkgError {
00036 
00037   private:
00038 
00039     friend class PMError;
00040 
00041     static const std::string errclass;
00042 
00043     static std::string errtext( const unsigned e );
00044 
00045   public:
00046 
00047     enum Error {
00048       E_ok    = PMError::E_ok,                  // no error
00049       E_error = PMError::C_ModulePkgError,      // some error
00050       // more specific errors start here:
00051       E_bad_args,
00052     };
00053 
00054     friend std::ostream & operator<<( std::ostream & str, const Error & obj ) {
00055       return str << PMError( obj );
00056     }
00057 
00058   public:
00059 
00060     PkgModuleError() {
00061       errtextfnc = errtext;
00062     }
00063 };
00064 
00066 
00067 #endif // PkgModuleError_h
00068 

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