visible.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 VISIBLE_HEADER
00020 #define VISIBLE_HEADER
00021 
00025 
00026 #include "whiptk/whipcore.h"
00027 #include "whiptk/attribute.h"
00028 
00029 class WT_File;
00030 
00035 
00036 
00039 class WHIPTK_API WT_Visibility : public WT_Attribute
00040 {
00041         friend class WT_Opcode;
00042         friend class WT_Rendition;
00043         friend class WT_W2D_Class_Factory;
00044 private:
00045     WT_Boolean        m_visible;
00046 
00047 public:
00048 
00050 
00051     WT_Visibility()
00052         : m_visible(WD_True)
00053     { }
00055     WT_Visibility(WT_Boolean visible)
00056         : m_visible(visible)
00057     { }
00058 
00060         WT_Visibility(WT_Visibility const& visibility)
00061         {
00062                 *this = visibility;
00063         }
00065 
00066         virtual ~WT_Visibility()
00067         {}
00068 
00069 public:
00071 
00072     inline WT_Boolean&       visible()       { return m_visible; }
00073     inline const WT_Boolean& visible() const { return m_visible; }
00074     inline void          setVisible(WT_Boolean bVisible) { m_visible = bVisible; }
00076 
00078     WT_ID            object_id() const;
00079     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00080     WT_Result        process(WT_File & file);
00081     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00082     WT_Result        serialize (WT_File & file) const;
00083     WT_Result        sync (WT_File & file) const;
00084     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00085     inline virtual WT_Visibility &   operator=(WT_Visibility const & visibility)
00086     {
00087         visible() = visibility.visible();
00088         return *this;
00089     }
00090     inline virtual WT_Visibility &   operator=(WT_Boolean const & visibility)
00091     {
00092         visible() = visibility;
00093         return *this;
00094     }
00095 
00096 
00098 
00100 
00102     static WT_Result default_process(
00103         WT_Visibility & item, 
00104         WT_File & file 
00105         );
00106 
00107 };
00108 
00110 
00111 #endif // VISIBLE_HEADER

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