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

view.h

00001 //  Copyright (c) 1996-2001 by Autodesk, Inc.
00002 //
00003 //  By using this code, you are agreeing to the terms and conditions of
00004 //  the License Agreement included in the documentation for this code.
00005 //
00006 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00007 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00008 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00009 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00010 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00011 //
00012 //  Use, duplication, or disclosure by the U.S. Government is subject to
00013 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00014 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00015 //  Data and Computer Software), as applicable.
00016 //
00017 
00018 #if !defined VIEW_HEADER
00019 #define VIEW_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/attribute.h"
00023 
00024 class WT_File;
00025 
00030 
00031 
00035 class WHIPTK_API WT_View : public WT_Attribute
00036 {
00037 
00038 private:
00039     WT_Logical_Box        m_view;
00040     WT_String            m_name;
00041     WT_Boolean          m_set_by_name;
00042 
00043     enum
00044     {
00045         Eating_Initial_Whitespace,
00046         Determining_String_Or_View,
00047         Getting_View,
00048         Eating_Trailing_Whitespace
00049     } m_stage;
00050 
00051 public:
00052 
00054 
00055     WT_View()
00056         : m_set_by_name (WD_False)
00057         , m_stage(Eating_Initial_Whitespace)
00058     { }
00059 
00061     WT_View(WT_Logical_Box view)
00062         : m_view(view)
00063         , m_set_by_name (WD_False)
00064         , m_stage(Eating_Initial_Whitespace)
00065     { }
00066 
00068     WT_View(char * name)
00069         : m_set_by_name (WD_True)
00070         , m_stage(Eating_Initial_Whitespace)
00071     {   set (name); }
00072 
00074     WT_View(WT_View const & view) // Copy
00075         : WT_Attribute()
00076         , m_set_by_name (WD_False)
00077         , m_stage(Eating_Initial_Whitespace)
00078     {
00079         set (view.name());
00080         set (view.view());
00081     }
00083 
00085 
00086     WT_String const &      name() const { return m_name; }
00088     void                   set (char const * name);
00090     void                   set (WT_Unsigned_Integer16 const * name);
00092     void                   set (WT_String const & name);
00094     void                   set (WT_Logical_Box const & view);
00095     WT_Logical_Box const & view() const { return m_view; }
00097     WT_View const & operator=(WT_View const & view);
00099 
00101     WT_ID            object_id() const;
00102     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00103     WT_Result        process(WT_File & file);
00104     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00105     WT_Result        serialize (WT_File & file) const;
00106     WT_Result        sync (WT_File & file) const;
00107     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00109 
00111 
00113     static WT_Result default_process(
00114         WT_View & item, 
00115         WT_File & file 
00116         );
00117 
00118 };
00119 
00121 
00122 #endif // VIEW_HEADER

Generated on Tue May 17 12:07:44 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1