DwfResult.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2006 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 #ifndef DWFRESULT_H_INCLUDED
00020 #define DWFRESULT_H_INCLUDED
00021 
00022 
00031 
00032 #include "dwf/Toolkit.h"
00033 
00034 namespace DWFToolkit
00035 {
00042     class _DWFTK_API DwfResult
00043     {
00044         public:
00046             enum Enum {
00047                 Success                                     = 0,
00048                 Corrupt_File_Error                          = -1,
00049                 Building_XML_Object_Error                   = -2,
00050                 File_Not_In_DWF                             = -3,
00051                 File_Open_Error                             = -4,
00052                 File_Read_Error                             = -5,
00053                 File_Write_Error                            = -6,
00054                 Internal_Error                              = -7,
00055                 Invalid_Argument_Error                      = -8,
00056                 Invalid_XML_Content_Error                   = -9,
00057                 Invalid_DWF_Version_Error                   = -10,
00058                 Not_A_DWF_Package_Error                     = -11,
00059                 Open_Section_Descriptor_Error               = -12,
00060                 Out_Of_Memory_Error                         = -13,
00061                 Stream_Write_Error                          = -14,
00062                 Temp_File_Error                             = -15,
00063                 Toolkit_Usage_Error                         = -16,
00064                 ZipLib_Error                                = -17,
00065                 Bad_Password_Error                          = -18,
00066                 Resource_Handler_Not_Specified_Error        = -19,
00067                 Not_Implemented                             = -20,
00068                 Stream_In_Progress                          = -21,
00069                 User_Requested_Abort                        = -22,
00070                 Unsupported_File_Type_Error                 = -23,
00071                 Temp_Path_Error                             = -24,
00072                 Incompatable_XML_Version_Error              = -25,
00073                 Failure                                     = -26,
00074                 Undefined                                   = -27
00075             };
00076 
00077     protected:
00078         Enum            m_value; 
00080     public:
00082         DwfResult() : m_value ((Enum) 0) {}
00084         DwfResult(DwfResult const & in) : m_value (in.m_value) {}
00086         DwfResult(Enum in) : m_value (in) {}
00088         operator int() const {return (int) m_value;}
00090         operator HRESULT() const {return (HRESULT) m_value;}
00092         DwfResult const & operator=  (DwfResult const & in) {m_value = in.m_value; return *this;}
00094         DwfResult const & operator=  (DwfResult::Enum in)   {m_value = in; return *this;}
00096 
00098         DwfResult const & operator=  (HRESULT in)   {m_value = Enum(in); return *this;}
00100         bool operator== (DwfResult const & in) const {return m_value == in.m_value;}
00102         bool operator== (DwfResult::Enum in)   const {return m_value == in;}
00104         bool operator!= (DwfResult const & in) const {return m_value != in.m_value;}
00106         bool operator!= (DwfResult::Enum in)   const {return m_value != in;}
00107 
00108     }; //class DwfResult
00109 
00110 }   //namespace DWFWriter
00111 
00112 #endif //DWFRESULT_H_INCLUDED

Generated on Tue Jan 6 22:40:03 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5