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

object_node.h

00001 //  Copyright (c) 2002 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 OBJECT_NODE_HEADER
00019 #define OBJECT_NODE_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/list.h"
00023 #include "whiptk/attribute.h"
00024 
00025 
00026 class WT_File;
00027 
00032 
00033 
00054 class WHIPTK_API WT_Object_Node : public WT_Item, public WT_Attribute
00055 {
00056 
00057 private:
00058     WT_String               m_object_node_name;
00059     WT_Integer32            m_object_node_num;
00060     WT_Integer32            m_previous_object_node_num;
00061     int                     m_incarnation;
00062     enum WT_Materialize_Stage
00063     {
00064         Gathering_Object_Node_Number,
00065         Gathering_Object_Node_Name,
00066         Eating_End_Whitespace
00067     }                       m_stage;
00068 
00069     void _deleteObject(void *object)
00070     {
00071         delete (WT_Object_Node*)object;
00072     }
00073 
00074 public:
00075 
00077     WT_Object_Node()
00078         : m_object_node_num(0)
00079         , m_previous_object_node_num(-1)
00080         , m_incarnation(-1)
00081         , m_stage(Gathering_Object_Node_Number)
00082     { }
00083 
00085     WT_Object_Node(
00086         WT_File &file, 
00087         WT_Integer32 object_node_num,  
00088         char const * object_node_name=WD_Null 
00089         );
00091     WT_Object_Node(
00092         WT_File &file, 
00093         WT_Integer32 object_node_num,  
00094         WT_Unsigned_Integer16 const * object_node_name 
00095         );
00096 
00098     WT_Object_Node (WT_Object_Node const & object_node);
00099 
00100 
00102     WT_ID            object_id() const;
00103     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00104     WT_Result        process(WT_File & file);
00105     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00106     WT_Result        serialize (WT_File & file) const;
00107     WT_Result        sync (WT_File & file) const;
00108     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00110 
00112     WT_Object_Node const & operator=(WT_Object_Node const & object_node);
00113 
00115     WT_String const & object_node_name()
00116     {    return m_object_node_name;    }
00117 
00119     WT_Integer32 object_node_num()
00120     {    return m_object_node_num; }
00121 
00123     void set(
00124         WT_File &file, 
00125         WT_Integer32 object_node_num,  
00126         char const * object_node_name 
00127         );
00129     void set(
00130         WT_File &file, 
00131         WT_Integer32 object_node_num,  
00132         WT_Unsigned_Integer16 const * object_node_name 
00133         );
00134 
00136     void set(WT_Object_Node const &object_node);
00137 
00139 
00141     static WT_Result default_process(
00142         WT_Object_Node & item, 
00143         WT_File & file 
00144         );
00145 };
00146 
00148 
00149 #endif // OBJECT_NODE_HEADER

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