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

projection.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 PROJECTION_HEADER
00019 #define PROJECTION_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/attribute.h"
00023 
00028 
00029 
00030 class WHIPTK_API WT_Projection : public WT_Attribute
00031 {
00032 public:
00033 
00035     enum WT_Projection_Type
00036     {
00045         Normal = 0,
00049         Stretch = 1,
00053         Chop = 2
00054     };
00055 
00056 private:
00057     typedef WT_Result (*WT_String_Interpreter)( char const *, WT_Projection_Type& );
00058 
00059     WT_Projection_Type m_value;
00060 
00061     enum WT_Materialize_Stage
00062     {   Eating_Initial_Whitespace,
00063         Gathering_String,
00064         Eating_End_Whitespace
00065     } m_stage;
00066 
00067     WT_Result materialize( WT_Opcode const & opcode, WT_File& file, WT_String_Interpreter interpret);
00068 
00069 public:
00070 
00072 
00073     WT_Projection()
00074     : m_value(Normal)
00075     , m_stage(Eating_Initial_Whitespace)
00076     {}
00078     WT_Projection(
00079         const WT_Projection_Type projection_type 
00080         )
00081     : m_value(projection_type)
00082     , m_stage(Eating_Initial_Whitespace)
00083     {}
00085 
00087 
00090     static WT_Result interpret_string(
00091         char const * string, 
00092         WT_Projection_Type & projection_type 
00093         );
00094 
00096     WT_ID            object_id() const;
00097     WT_Type          object_type() const;
00098     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file) { return materialize (opcode, file, interpret_string); }
00099     WT_Result        process(WT_File & file);
00100     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00101     WT_Result        serialize (WT_File & file) const;
00102     WT_Result        sync (WT_File & file) const;
00103     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00105 
00107 
00109     static WT_Result default_process(
00110         WT_Projection & item, 
00111         WT_File & file 
00112         );
00113 };
00114 
00115 #endif // PROJECTION_HEADER

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