XamlPointset.h

00001 //
00002 //  Copyright (c) 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 XAML_POINTSET_HEADER
00020 #define XAML_POINTSET_HEADER
00021 
00022 #include "XAML/XamlCore.h"
00023 
00024 #include "whiptk/pointset.h"
00025 
00026 class WT_File;
00027 
00029 class XAMLTK_API WT_XAML_Point_Set_Data
00030 {
00031 protected:
00032     WT_Integer32                m_count;  
00033     WT_Integer32                m_allocated; 
00034     WT_Point2D *                m_points; 
00035     bool                        m_relativized; 
00037 private:
00038     WT_XAML_Point_Set_Data (WT_XAML_Point_Set_Data const &)
00039       : m_count (0)
00040       , m_allocated (0)
00041       , m_points (NULL)
00042       , m_relativized(false)
00043     {
00044         WD_Complain ("cannot copy WT_XAML_Point_Set_Data");
00045     } // prohibited
00046 
00047     WT_XAML_Point_Set_Data & operator= (WT_XAML_Point_Set_Data const &)
00048     {
00049         WD_Complain ("cannot assign WT_XAML_Point_Set_Data");
00050         return *this;
00051     } // prohibited
00052 
00053 public:
00054 
00056 
00057     WT_XAML_Point_Set_Data()
00058         : m_count (0)
00059         , m_allocated (0)
00060         , m_points (NULL)
00061         , m_relativized(false)
00062     { }
00063 
00065     WT_XAML_Point_Set_Data(
00066         int                         count, 
00067         WT_Logical_Point const *    points
00068         );
00069 
00071 
00078     WT_XAML_Point_Set_Data(
00079         int                         count, 
00080         WT_Point2D const *          points, 
00081         bool                        copy 
00082         );
00083 
00085     WT_XAML_Point_Set_Data(
00086         vector<WT_Point2D>&         points
00087         ) throw (WT_Result);
00088 
00090     virtual ~WT_XAML_Point_Set_Data();
00091 
00093 
00094 
00096 
00097     virtual WT_Point2D * points() const
00098     {
00099         return m_points;
00100     }
00102 
00104 
00105     virtual int allocated() const
00106     {
00107         return m_allocated;
00108     }
00109 
00111     virtual void clear();
00112 
00114     virtual int count() const
00115     {
00116         return m_count;
00117     }
00118 
00120     virtual bool operator== (WT_XAML_Point_Set_Data const & set) const;
00122 
00124 
00125     virtual void de_relativize(WT_File & file);
00127     virtual void relativize(WT_File & file);
00129     virtual WT_XAML_Point_Set_Data const & set(
00130         int                         count, 
00131         WT_Logical_Point const *    points 
00132         );
00133 
00135     virtual WT_XAML_Point_Set_Data const & set(
00136         int                         count, 
00137         WT_Point2D const *          points, 
00138         bool                        copy 
00139         );
00140 };
00141 
00142 #endif // XAML_POINTSET_HEADER

Generated on Tue Jan 6 22:40:06 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5