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

directory.h

00001 //  Copyright (c) 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 DIRECTORY_HEADER
00019 #define DIRECTORY_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/attribute.h"
00023 #include "whiptk/blockref.h"
00024 
00026 
00030 class WHIPTK_API WT_Directory : public WT_Object, public WT_Item_List
00031 {
00032 public:
00034     WT_Directory() : m_file_offset(0), m_optioncode(WD_Null), m_stage(Starting)
00035     { }
00036 
00038     WT_Directory(const WT_Directory & directory)
00039         : WT_Object()
00040         , WT_Item_List()
00041     {
00042         *this = directory;
00043     }
00044 
00046     ~WT_Directory();
00047 
00049     WT_Result add (WT_BlockRef &item);
00051     WT_BlockRef * blockref_from_index(WT_Integer32 index);
00053     WT_Integer32  index_from_blockref(WT_BlockRef & item_in);
00055     WT_Unsigned_Integer32 get_file_offset() {
00056        return m_file_offset;
00057     }
00058 
00059     // WT_Object virtual methods
00060     WT_Result    materialize(WT_Opcode const & opcode, WT_File & file);
00061     WT_ID        object_id() const;
00062     WT_Type      object_type() const;
00063     WT_Result    process(WT_File & file);
00064     WT_Result    serialize (WT_File & file) const;
00065     WT_Result    skip_operand(WT_Opcode const & opcode, WT_File & file);
00066 
00068     WT_Directory const & operator=(WT_Directory const & blockref);
00070     WT_Boolean operator== (WT_Directory const & list) const;
00071 
00073 
00075     static WT_Result default_process(
00076         WT_Directory & item, 
00077         WT_File & file 
00078         );
00079 
00080 private:
00081     WT_Unsigned_Integer32   m_file_offset;
00082     WT_Opcode *             m_optioncode;
00083 
00084     enum
00085     {
00086         Starting,
00087         Getting_BlockRef_Count,
00088         Getting_BlockRefs,
00089         Getting_Directory_File_Offset,
00090         Getting_Close
00091     }   m_stage;
00092 };
00093 
00094 #endif // DIRECTORY_HEADER

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