blockref_defs.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 
00019 #if !defined BLOCKREF_DEFS_HEADER
00020 #define BLOCKREF_DEFS_HEADER
00021 
00025 
00026 #include "whiptk/whipcore.h"
00027 #include "whiptk/object.h"
00028 
00029 class WT_File;
00030 
00032 
00034 class WHIPTK_API WT_Block_Meaning : public WT_Object
00035 {
00036 public:
00037 
00038     enum WT_Block_Description
00039     {
00040         None      = 0x00000001,
00041         Seal      = 0x00000002,
00042         Stamp     = 0x00000004,
00043         Label     = 0x00000008,
00044         Redline   = 0x00000010,
00045         Reserved1 = 0x00000020,
00046         Reserved2 = 0x00000040
00047     };
00048 
00049 private:
00050     WT_Block_Description   m_description;
00051     enum {
00052         Starting,
00053         Getting_Description,
00054         Getting_Close
00055     }   m_stage;
00056 
00057 public:
00058 
00059     // Constructors, Destructors
00060 
00061     WT_Block_Meaning()
00062       : m_description(None)
00063       , m_stage(Starting)
00064     { }
00065 
00066     WT_Block_Meaning(WT_Block_Description description)
00067       : m_description(description)
00068       , m_stage(Starting)
00069     { }
00070 
00071     virtual ~WT_Block_Meaning()
00072     { }
00073 
00074     WT_ID            object_id() const;
00075     WT_Type          object_type() const;
00076     WT_Result        serialize (WT_File & file) const;
00077     WT_Result        materialize(WT_Opcode const & opcode,
00078                                                 WT_File & file);
00079     WT_Result        skip_operand(WT_Opcode const & opcode,
00080                                                 WT_File & file);
00081     WT_Result        process(WT_File & file);
00082 
00083     static WT_Result default_process(WT_Block_Meaning & item,
00084                                                 WT_File & file);
00085 
00086     // Get/Set methods
00087     void set_block_description(
00088         WT_Block_Meaning::WT_Block_Description description);
00089 
00090         WT_Block_Meaning::WT_Block_Description  get_block_description() const;
00091 
00092     WT_Boolean    operator!= (WT_Block_Meaning const &
00093                                                     meaning) const;
00094     WT_Boolean    operator== (WT_Block_Meaning const &
00095                                                     meaning) const;
00096 };
00097 
00099 
00102 class WHIPTK_API WT_Encryption : public WT_Object
00103 {
00104 public:
00105 
00106     enum WT_Encryption_Description
00107     {
00108         None      = 0x00000001,
00109         Reserved1 = 0x00000002,
00110         Reserved2 = 0x00000004,
00111         Reserved3 = 0x00000008
00112     };
00113 
00114 private:
00115     WT_Encryption_Description   m_description;
00116 
00117     enum {
00118         Starting,
00119         Getting_Description,
00120         Getting_Close
00121     }   m_stage;
00122 
00123 public:
00124     // Constructors, Destructors
00125 
00126     WT_Encryption()
00127       : m_description(None)
00128       , m_stage(Starting)
00129     { }
00130 
00131     WT_Encryption(WT_Encryption_Description description)
00132       : m_description(description)
00133       , m_stage(Starting)
00134     { }
00135 
00136     virtual ~WT_Encryption()
00137     { }
00138 
00139     WT_ID            object_id() const;
00140     WT_Type          object_type() const;
00141     WT_Result        serialize (WT_File & file) const;
00142     WT_Result        materialize(WT_Opcode const & opcode,
00143                                                         WT_File & file);
00144     WT_Result        skip_operand(WT_Opcode const & opcode,
00145                                                         WT_File & file);
00146     WT_Result        process(WT_File & file);
00147 
00148     static WT_Result default_process(WT_Encryption & item,
00149                                                         WT_File & file);
00150 
00151     // Get/Set methods
00152     void set_encryption_description(
00153         WT_Encryption::WT_Encryption_Description description);
00154     WT_Encryption::WT_Encryption_Description
00155         get_encryption_description() const;
00156 
00157     WT_Boolean    operator!= (WT_Encryption const
00158                                                 & encryption) const;
00159     WT_Boolean    operator== (WT_Encryption const
00160                                                 & encryption) const;
00161 };
00162 
00164 
00166 class WHIPTK_API WT_Orientation : public WT_Object
00167 {
00168 public:
00169 
00170     enum WT_Orientation_Description
00171     {
00172         Always_In_Sync       = 0x00000001,
00173         Always_Different     = 0x00000002,
00174         Decoupled            = 0x00000004
00175     };
00176 
00177 private:
00178     WT_Orientation_Description   m_description;
00179 
00180     enum {
00181         Starting,
00182         Getting_Description,
00183         Getting_Close
00184     }   m_stage;
00185 
00186 public:
00187     // Constructors, Destructors
00188 
00189     WT_Orientation()
00190       : m_description(Always_In_Sync)
00191       , m_stage(Starting)
00192     { }
00193 
00194     WT_Orientation(WT_Orientation_Description description)
00195       : m_description(description)
00196       , m_stage(Starting)
00197     { }
00198 
00199     virtual ~WT_Orientation()
00200     { }
00201 
00202     WT_ID            object_id() const;
00203     WT_Type          object_type() const;
00204     WT_Result        serialize (WT_File & file) const;
00205     WT_Result        materialize(WT_Opcode const & opcode,
00206                                                         WT_File & file);
00207     WT_Result        skip_operand(WT_Opcode const & opcode,
00208                                                         WT_File & file);
00209     WT_Result        process(WT_File & file);
00210 
00211     static WT_Result default_process(WT_Orientation & item,
00212                                                         WT_File & file);
00213 
00214     // Get/Set methods
00215     void set_orientation_description(
00216         WT_Orientation::WT_Orientation_Description description);
00217     WT_Orientation::WT_Orientation_Description
00218         get_orientation_description() const;
00219 
00220     WT_Boolean    operator!= (WT_Orientation const
00221                                             & orientation) const;
00222     WT_Boolean    operator== (WT_Orientation const
00223                                             & orientation) const;
00224 };
00225 
00227 
00229 class WHIPTK_API WT_Alignment : public WT_Object
00230 {
00231 public:
00232 
00233     enum WT_Alignment_Description
00234     {
00235         Align_Center        = 0x00000001,
00236         Align_Title_Block   = 0x00000002,
00237         Align_Top           = 0x00000004,
00238         Align_Bottom        = 0x00000008,
00239         Align_Left          = 0x00000010,
00240         Align_Right         = 0x00000020,
00241         Align_Top_Left      = 0x00000040,
00242         Align_Top_Right     = 0x00000080,
00243         Align_Bottom_Left   = 0x00000100,
00244         Align_Bottom_Right  = 0x00000200,
00245         Align_None          = 0x00000400
00246     };
00247 
00248 private:
00249     WT_Alignment_Description   m_description;
00250 
00251     enum {
00252         Starting,
00253         Getting_Description,
00254         Getting_Close
00255     }   m_stage;
00256 
00257 public:
00258     // Constructors, Destructors
00259 
00260     WT_Alignment()
00261       : m_description(Align_None)
00262       , m_stage(Starting)
00263     { }
00264 
00265     WT_Alignment(WT_Alignment_Description description)
00266       : m_description(description)
00267       , m_stage(Starting)
00268     { }
00269 
00270     virtual ~WT_Alignment()
00271     { }
00272     WT_ID            object_id() const;
00273     WT_Type          object_type() const;
00274     WT_Result        serialize (WT_File & file) const;
00275     WT_Result        materialize(WT_Opcode const & opcode,
00276                                                         WT_File & file);
00277     WT_Result        skip_operand(WT_Opcode const & opcode,
00278                                                         WT_File & file);
00279     WT_Result        process(WT_File & file);
00280 
00281     static WT_Result default_process(WT_Alignment & item,
00282                                                         WT_File & file);
00283 
00284     // Get/Set methods
00285     void set_alignment_description(
00286         WT_Alignment::WT_Alignment_Description description);
00287     WT_Alignment::WT_Alignment_Description
00288         get_alignment_description() const;
00289 
00290     WT_Boolean    operator!= (WT_Alignment const
00291                                             & alignment) const;
00292     WT_Boolean    operator== (WT_Alignment const
00293                                             & alignment) const;
00294 };
00295 
00296 
00298 
00300 class WHIPTK_API WT_Password : public WT_Object
00301 {
00302 private:
00303         WT_Byte m_string[33];
00304 public:
00305         WT_Password()
00306         {
00307             memset(&m_string[0], '\0', 33);
00308         }
00309         WT_Password(char * string);
00310         WT_Password(WT_Unsigned_Integer16 * string);
00311         WT_Password(WT_Password const & info);
00312 
00313         virtual ~WT_Password() {}
00314 
00315         WT_Object::WT_ID    object_id() const;
00316         WT_Object::WT_Type object_type() const;
00317         WT_Result process(WT_File & file);
00318         WT_Result skip_operand(WT_Opcode const & opcode, WT_File & file);
00319         static WT_Result default_process(WT_Password & item, WT_File & file);
00320         void set(char const * string);
00321         void set(WT_Unsigned_Integer16 const * string);
00322         void set(WT_String const & string);
00323         WT_Byte * const     string(void) const;
00324         WT_Unsigned_Integer16 const  get_string_length(void);
00325         WT_Result serialize(WT_File & file) const;
00326         WT_Result materialize(WT_Opcode const & opcode, WT_File & file);
00327         WT_Password    operator= (WT_Password const & Password) ;
00328         WT_Boolean    operator!= (WT_Password const & Password) const;
00329         WT_Boolean    operator== (WT_Password const & Password) const;
00330 };                                                                                                  //
00331 
00333 
00335 class WHIPTK_API WT_Guid : public WT_Object, public WT_Item
00336 {
00337 private:
00338     WD_GUID  m_guid;
00339 
00340 enum {
00341     Starting,
00342     Getting_Data1,
00343     Getting_Data2,
00344     Getting_Data3,
00345     Getting_Data4,
00346     Getting_Close
00347 }   m_stage;
00348 
00349     void _deleteObject(void *object)
00350     {
00351         delete (WT_Guid*)object;
00352     }
00353 
00354 public:
00355     WT_Guid()
00356         : m_guid ()
00357         , m_stage(Starting)
00358     {
00359         memset((void *) &m_guid, 0, sizeof(WD_GUID));
00360     }
00361 
00362     WT_Guid(const WD_GUID guid);
00363     WT_Guid(WT_Guid const & info);
00364 
00365         virtual ~WT_Guid()
00366         {}
00367 public:
00368     WT_Object::WT_ID    object_id() const;
00369     WT_Object::WT_Type object_type() const;
00370     WT_Result process(WT_File & file);
00371     WT_Result skip_operand(WT_Opcode const & opcode, WT_File & file);
00372     static WT_Result default_process(WT_Guid & item, WT_File & file);
00373     void set(WD_GUID guid);
00374     void set(WT_Guid guid);
00375     WD_GUID get_guid();
00376     WT_Result serialize(WT_File & file) const;
00377     WT_Result materialize(WT_Opcode const & opcode, WT_File & file);
00378     WT_Boolean operator!=(WT_Guid const & in) const  ;
00379     WT_Boolean operator==(WT_Guid const & in) const  ;
00380     WT_Guid operator=(WT_Guid const & in) const  ;
00381 
00382 };
00383 
00384 #endif // BLOCKREF_DEFS_HEADER

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