Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

DwfResult.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2005 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 
00019 
00020 #ifndef _DWFTK_DWFRESULT_H
00021 #define _DWFTK_DWFRESULT_H
00022 
00023 
00032 
00033 #include "dwf/Toolkit.h"
00034 
00035 namespace DWFToolkit
00036 {
00043     class _DWFTK_API DwfResult
00044     {
00045 #ifndef _DWFTK_DEFINE_FOR_DOXYGEN_ONLY
00046         public:
00048             enum Enum {
00049                 Success                                     = 0,
00050                 Corrupt_File_Error                          = -1,
00051                 Building_XML_Object_Error                   = -2,
00052                 File_Not_In_DWF                             = -3,
00053                 File_Open_Error                             = -4,
00054                 File_Read_Error                             = -5,
00055                 File_Write_Error                            = -6,
00056                 Internal_Error                              = -7,
00057                 Invalid_Argument_Error                      = -8,
00058                 Invalid_XML_Content_Error                   = -9,
00059                 Invalid_DWF_Version_Error                   = -10,
00060                 Not_A_DWF_Package_Error                     = -11,
00061                 Open_Section_Descriptor_Error               = -12,
00062                 Out_Of_Memory_Error                         = -13,
00063                 Stream_Write_Error                          = -14,
00064                 Temp_File_Error                             = -15,
00065                 Toolkit_Usage_Error                         = -16,
00066                 ZipLib_Error                                = -17,
00067                 Bad_Password_Error                          = -18,
00068                 Resource_Handler_Not_Specified_Error        = -19,
00069                 Not_Implemented                             = -20,
00070                 Stream_In_Progress                          = -21,
00071                 User_Requested_Abort                        = -22,
00072                 Unsupported_File_Type_Error                 = -23,
00073                 Temp_Path_Error                             = -24,
00074                 Incompatable_XML_Version_Error              = -25,
00075                 Failure                                     = -26,
00076                 Undefined                                   = -27
00077             };
00078 
00079     protected:
00080         Enum            m_value; 
00082     public:
00084         DwfResult() : m_value ((Enum) 0) {}
00086         DwfResult(DwfResult const & in) : m_value (in.m_value) {}
00088         DwfResult(Enum in) : m_value (in) {}
00090         operator int() const {return (int) m_value;}
00092         operator HRESULT() const {return (HRESULT) m_value;}
00094         DwfResult const & operator=  (DwfResult const & in) {m_value = in.m_value; return *this;}
00096         DwfResult const & operator=  (DwfResult::Enum in)   {m_value = in; return *this;}
00098 
00100         DwfResult const & operator=  (HRESULT in)   {m_value = Enum(in); return *this;}
00102         bool operator== (DwfResult const & in) const {return m_value == in.m_value;}
00104         bool operator== (DwfResult::Enum in)   const {return m_value == in;}
00106         bool operator!= (DwfResult const & in) const {return m_value != in.m_value;}
00108         bool operator!= (DwfResult::Enum in)   const {return m_value != in;}
00109 #endif
00110     }; //class DwfResult
00111 
00112 }
00113 
00114 #endif //DWFRESULT_H_INCLUDED

Generated on Tue May 17 12:38:50 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1