code_page.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 #if !defined CODE_PAGE_HEADER
00020 #define CODE_PAGE_HEADER
00021 
00025 
00026 #include "whiptk/whipcore.h"
00027 #include "whiptk/attribute.h"
00028 
00029 class WT_File;
00034 
00035 
00036 class WHIPTK_API WT_Code_Page : public WT_Attribute
00037 {
00038         friend class WT_Rendition;
00039         friend class WT_W2D_Class_Factory;
00040         friend class WT_Opcode;
00041 
00042     enum WT_Materialize_Stage
00043     {    Eating_Initial_Whitespace,
00044         Getting_Page,
00045         Eating_End_Whitespace
00046     }               m_stage;
00047     WT_Integer32    m_page_number;
00048 
00049 public:
00050 
00052     WT_Code_Page()
00053     : m_stage(Eating_Initial_Whitespace)
00054     , m_page_number(1252)
00055     {}
00056 
00058     WT_Code_Page( WT_Integer32 page_number )
00059     : m_stage(Eating_Initial_Whitespace)
00060     , m_page_number(page_number)
00061     {}
00062 
00064         WT_Code_Page(WT_Code_Page const& code_page)
00065         {
00066                 *this = code_page;
00067         }
00068 
00069         virtual ~WT_Code_Page()
00070         {}
00071 public:
00073     inline WT_Integer32 const & number() const { return m_page_number; }
00074     inline WT_Integer32&        number()       { return m_page_number; }
00075     inline WT_Code_Page const& operator=( WT_Integer32 nNumber ) { m_page_number = nNumber; return *this; }
00076 
00078     WT_ID            object_id() const;
00079     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00080     WT_Result        process(WT_File & file);
00081     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00082     WT_Result        serialize (WT_File & file) const;
00083     WT_Result        sync (WT_File & file) const;
00084     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00086 
00088 
00090     static WT_Result default_process(
00091         WT_Code_Page & item, 
00092         WT_File & file 
00093         );
00094 
00095 };
00097 
00098 #endif // CODE_PAGE_HEADER

Generated on Tue Jan 6 22:41:12 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5