macro_definition.h

Go to the documentation of this file.
00001 //  Copyright (c) 1996-2006 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 
00021 
00022 #if !defined MACRO_DEFINITION_HEADER
00023 #define MACRO_DEFINITION_HEADER
00024 
00025 #include "whiptk/whipcore.h"
00026 #include "whiptk/object_stream.h"
00027 #include "whiptk/fill.h"
00028 
00029 
00030 class WHIPTK_API WT_Macro_Definition : public WT_Object_Stream
00031 {
00032         friend class WT_W2D_Class_Factory;
00033         friend class WT_Opcode;
00034 
00035 public:
00036 
00038     // Default constructor
00039     WT_Macro_Definition()
00040         : m_index (0)
00041         , m_scale_units (1)
00042         , m_bFill(WD_False)
00043         , m_cached_fill (WD_False)
00044     {}
00045 
00046     WT_Macro_Definition( WT_Unsigned_Integer16 index,
00047                          WT_Integer32 scale_units = 1 );
00048  
00049     virtual ~WT_Macro_Definition();
00050 
00051 public:   
00054     const WT_Unsigned_Integer16& index() const  { return m_index; }
00055           WT_Unsigned_Integer16& index()        { return m_index; }
00056 
00058     const WT_Integer32& scale_units() const     { return m_scale_units; }
00059           WT_Integer32& scale_units()           { return m_scale_units; }
00060     
00062     virtual WT_Logical_Box  bounds();
00063     
00067     WT_Result       add(const WT_Drawable&);
00068     WT_Result       add(const WT_Attribute&);
00069    
00071     WT_Type         object_type() const ;
00072     WT_ID           object_id() const ;
00073     WT_Result       materialize(WT_Opcode const & opcode, WT_File & file);
00074     WT_Result       process(WT_File & file);
00075     WT_Result       serialize(WT_File & file) const ;
00076 
00079 
00081     static  WT_Result   default_process( WT_Macro_Definition& ,WT_File&);
00082 
00083 protected:
00084     // overriden from class WT_Object_Stream
00085     WT_Result       on_materialize(WT_Object&, WT_File&);
00086 
00087 private:
00088     // Hidden Copy constructor and Assignment operator
00089     WT_Macro_Definition(const WT_Macro_Definition&);
00090     void operator= (const WT_Macro_Definition&);
00091     
00092     // Data Members
00093     WT_Unsigned_Integer16   m_index;
00094     WT_Integer32            m_scale_units;
00095     
00096     // Non-persisted state variables
00097     WT_Boolean              m_bFill;
00098     WT_Fill                 m_cached_fill;
00099 };
00100 
00101 #endif // MACRO_DEFINITION_HEADER
00102 // End of file.

Generated on Tue Jan 6 22:41:13 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5