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

embed.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 EMBED_HEADER
00019 #define EMBED_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/object.h"
00023 
00024 class WT_File;
00025 
00031 
00032 
00033 class WHIPTK_API WT_Embed : public WT_Object
00034 {
00035 
00036 private:
00037 
00038     enum WT_Materialize_Stage
00039     {
00040         Eating_Initial_Whitespace,
00041         Gathering_MIME,
00042         Eating_Post_MIME_Whitespace,
00043         Gathering_Description,
00044         Eating_Post_Description_Whitespace,
00045         Gathering_Filename,
00046         Eating_Post_Filename_Whitespace,
00047         Gathering_URL,
00048         Eating_Trailing_Whitespace
00049     };
00050 
00051     WT_String                m_MIME_type;
00052     WT_String                m_MIME_subtype;
00053     WT_String                m_MIME_options;
00054     WT_String                m_description;
00055     WT_String                m_filename;
00056     WT_String                m_url;
00057     WT_Materialize_Stage    m_stage;
00058     int                        m_incarnation;
00059 
00060 public:
00061 
00063 
00064     WT_Embed()
00065         : m_stage(Eating_Initial_Whitespace)
00066         , m_incarnation(-1)
00067     { }
00069     WT_Embed(WT_Embed const & embed);
00071 
00072 
00074 
00075     WT_String const & description() const { return m_description;    }
00077     WT_String const & filename() const { return m_filename;    }
00079     WT_String const & MIME_options() const { return m_MIME_options;    }
00081 
00082     WT_String const & MIME_subtype() const { return m_MIME_subtype;    }
00084 
00085     WT_String const & MIME_type() const  { return m_MIME_type; }
00087     WT_Result         set_description(char const * description, WT_File & file);
00089     WT_Result         set_description(WT_Unsigned_Integer16 const * description, WT_File & file);
00091     WT_Result         set_filename(char const * filename, WT_File & file);
00093     WT_Result         set_filename(WT_Unsigned_Integer16 const * filename, WT_File & file);
00095     WT_Result         set_MIME_options(char const * options, WT_File & file);
00097     WT_Result         set_MIME_options(WT_Unsigned_Integer16 const * options, WT_File & file);
00099 
00100     WT_Result         set_MIME_subtype(char const * subtype, WT_File & file);
00102 
00103     WT_Result         set_MIME_subtype(WT_Unsigned_Integer16 const * subtype, WT_File & file);
00105 
00106     WT_Result         set_MIME_type(char const * type, WT_File & file);
00108 
00109     WT_Result         set_MIME_type(WT_Unsigned_Integer16 const * type, WT_File & file);
00111     WT_Result         set_url(char const * url, WT_File & file);
00113     WT_Result         set_url(WT_Unsigned_Integer16 const * url, WT_File & file);
00115     WT_Result         set_whole_MIME(char const * mime, WT_File & file);
00117     WT_String const & url() const { return m_url;    }
00119     WT_Embed const &  operator=(WT_Embed const & embed);
00121     WT_Boolean  operator== (WT_Object const & object) const;
00122 
00124     WT_ID            object_id() const;
00125     WT_Type          object_type() const;
00126     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00127     WT_Result        process(WT_File & file);
00128     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00129     WT_Result        serialize (WT_File & file) const;
00131 
00133 
00135     static WT_Result default_process(
00136         WT_Embed & item, 
00137         WT_File & file 
00138         );
00139 };
00140 
00142 
00143 #endif // EMBED_HEADER

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