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

named_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 NAMED_VIEW_HEADER
00019 #define NAMED_VIEW_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/list.h"
00023 #include "whiptk/object.h"
00024 
00030 
00031 class WHIPTK_API WT_Named_View : public WT_Item, public WT_Object
00032 {
00033 private:
00034 
00035     WT_Logical_Box * m_view;
00036     WT_String        m_name;
00037     WT_Boolean       m_has_been_serialized;
00038 
00039     enum WT_Materialize_Stage
00040     {
00041         Eating_Initial_Whitespace,
00042         Gathering_View,
00043         Eating_Middle_Whitespace,
00044         Gathering_Name,
00045         Eating_End_Whitespace
00046     } m_stage;
00047 
00048     void _deleteObject(void *object)
00049     {
00050         delete (WT_Named_View*)object;
00051     }
00052 
00053 public:
00055 
00056     WT_Named_View (void)
00057         : WT_Item ()
00058         , m_view (WD_Null)
00059         , m_has_been_serialized (WD_False)
00060         , m_stage (Eating_Initial_Whitespace)
00061         { }
00062 
00064     WT_Named_View (WT_Named_View  const & named_view);
00066     WT_Named_View (WT_Logical_Box const & view, const char * name = WD_Null);
00068     WT_Named_View (WT_Logical_Box const & view, WT_Unsigned_Integer16 const * name);
00070     virtual ~WT_Named_View (void);
00072 
00074 
00075     WT_String const &  name () const { return m_name; }
00077     WT_Logical_Box *   view () const { return m_view; }
00079     void               set (WT_Named_View const &  named_view);
00081     void               set (WT_Logical_Box const & view);
00083     void               set (const char * name);
00085     void               set (WT_Unsigned_Integer16 const * name);
00087     void               set (WT_String const & name);
00089     void               set (int length, WT_Unsigned_Integer16 const * name);
00091     WT_Named_View const & operator= (WT_Named_View const & named_view);
00093     WT_Boolean       operator== (WT_Named_View const & named_view) const;
00095 
00096 
00098     WT_ID            object_id() const;
00099     WT_Type          object_type() const;
00100     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00101     WT_Result        process(WT_File & file);
00102     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00103     WT_Result        serialize (WT_File & file) const;
00104     WT_Result        sync (WT_File & file) const;
00106 
00108 
00110     static WT_Result default_process(
00111         WT_Named_View  & item, 
00112         WT_File & file 
00113         );
00114 
00115 };
00116 
00118 
00119 #endif // NAMED_VIEW_HEADER

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