Units.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 
00020 #ifndef _DWFTK_UNITS_H
00021 #define _DWFTK_UNITS_H
00022 
00027 
00028 #include "dwf/Toolkit.h"
00029 #include "dwf/package/XML.h"
00030 #include "dwf/package/reader/PackageReader.h"
00031 #include "dwf/package/writer/PackageWriter.h"
00032 
00033 
00034 namespace DWFToolkit
00035 {
00036 
00048 class DWFUnits : public DWFXMLBuildable
00049 
00050 #ifndef DWFTK_READ_ONLY
00051                , public DWFXMLSerializable
00052 #endif
00053                _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00054 {
00055 
00056 public:
00057 
00058     typedef enum
00059     {
00060         eMillimeters,
00061         eCentimeters,
00062         eMeters,
00063 
00064         eInches,
00065         eFeet
00066 
00067     } teType;
00068 
00069 public:
00070 
00076     _DWFTK_API
00077     DWFUnits()
00078         throw();
00079 
00086     _DWFTK_API
00087     DWFUnits( teType eType )
00088         throw();
00089 
00095     _DWFTK_API
00096     virtual ~DWFUnits()
00097         throw();
00098 
00104     _DWFTK_API
00105     const DWFString& type() const
00106         throw()
00107     {
00108         return _zType;
00109     }
00110 
00111 
00115     _DWFTK_API
00116     virtual void parseAttributeList( const char** ppAttributeList )
00117         throw( DWFException );
00118 
00119 #ifndef DWFTK_READ_ONLY
00120 
00124     _DWFTK_API
00125     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00126         throw( DWFException );
00127 
00128 #endif
00129 
00130 private:
00131 
00132     DWFString _zType;
00133 };
00134 
00135 }
00136 
00137 #endif

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