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

layer.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 LAYER_HEADER
00019 #define LAYER_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/list.h"
00023 #include "whiptk/attribute.h"
00024 
00025 class WT_File;
00026 
00031 
00032 
00035 class WHIPTK_API WT_Layer : public WT_Item, public WT_Attribute
00036 {
00037 
00038 private:
00039     WT_String               m_layer_name;
00040     WT_Integer32            m_layer_num;
00041     WT_Boolean              m_visibility;
00042     int                     m_incarnation;
00043     enum WT_Materialize_Stage
00044     {
00045         Gathering_Layer_Number,
00046         Gathering_Layer_Name,
00047         Eating_End_Whitespace
00048     } m_stage;
00049 
00050     void _deleteObject(void *object)
00051     {
00052         delete (WT_Layer*)object;
00053     }
00054 
00055 
00056 public:
00057 
00059 
00060     WT_Layer()
00061         : m_layer_num(0)
00062         , m_visibility(WD_True)
00063         , m_incarnation(-1)
00064         , m_stage(Gathering_Layer_Number)
00065     { }
00067     WT_Layer(
00068         WT_File &file, 
00069         WT_Integer32 layer_num, 
00070         char const * layer_name=WD_Null 
00071         );
00073     WT_Layer(
00074         WT_File &file, 
00075         WT_Integer32 layer_num, 
00076         WT_Unsigned_Integer16 const * layer_name 
00077         );
00079     WT_Layer (WT_Layer const & layer);
00081 
00083 
00084     WT_String const & layer_name() {    return m_layer_name;    }
00086     WT_Integer32 layer_num() {    return m_layer_num; }
00088     void set(
00089         char const * layer_name, 
00090         WT_File & file 
00091         );
00093     void set(
00094         WT_Unsigned_Integer16 const * layer_name, 
00095         WT_File & file  
00096         );
00098     void set(WT_Layer const &layer);
00100 
00108     void set_visibility(WT_Boolean vis) {m_visibility = vis;}
00110     WT_Boolean  visibility() {    return m_visibility; }
00112     WT_Layer const & operator=(WT_Layer const & layer);
00114 
00116     WT_ID            object_id() const;
00117     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00118     WT_Result        process(WT_File & file);
00119     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00120     WT_Result        serialize (WT_File & file) const;
00121     WT_Result        sync (WT_File & file) const;
00122     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00124 
00126 
00128     static WT_Result default_process(
00129         WT_Layer & item, 
00130         WT_File & file 
00131         );
00132 };
00133 
00134 #endif // LAYER_HEADER

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