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

Property.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2005 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_PROPERTY_H
00021 #define _DWFTK_PROPERTY_H
00022 
00023 
00028 
00029 
00030 #include "dwfcore/STL.h"
00031 #include "dwfcore/Owner.h"
00032 #include "dwfcore/SkipList.h"
00033 using namespace DWFCore;
00034 
00035 #include "dwf/Toolkit.h"
00036 #include "dwf/package/XML.h"
00037 #include "dwf/package/reader/PackageReader.h"
00038 #include "dwf/package/writer/PackageWriter.h"
00039 
00040 
00041 namespace DWFToolkit
00042 {
00043 
00054 class DWFProperty : public DWFToolkitMemory
00055                   , public DWFXMLBuildable
00056 
00057 #ifndef DWFTK_READ_ONLY
00058                   , public DWFXMLSerializable
00059 #endif
00060                   , public DWFOwnable
00061 {
00062 
00063 public:
00064 
00068     typedef vector<DWFProperty*>                        tList;
00072     typedef DWFStringKeyChainedSkipList<DWFProperty*>   tMap;
00073 
00074 public:
00075 
00081     _DWFTK_API
00082     DWFProperty()
00083         throw();
00084 
00095     _DWFTK_API
00096     DWFProperty( const DWFString& zName,
00097                  const DWFString& zValue,
00098                  const DWFString& zCategory = L"",
00099                  const DWFString& zType = L"",
00100                  const DWFString& zUnits = L"" )
00101         throw();
00102 
00108     _DWFTK_API
00109     virtual ~DWFProperty()
00110         throw();
00111 
00118     _DWFTK_API
00119     DWFProperty( const DWFProperty& rProperty )
00120         throw();
00121 
00128     _DWFTK_API
00129     DWFProperty& operator=( const DWFProperty& rProperty )
00130         throw();
00131 
00138     _DWFTK_API
00139     const DWFString& name() const
00140         throw()
00141     {
00142         return _zName;
00143     }
00144 
00151     _DWFTK_API
00152     void setName( const DWFString& zName )
00153         throw()
00154     {
00155         _zName.assign( zName );
00156     }
00157 
00164     _DWFTK_API
00165     const DWFString& value() const
00166         throw()
00167     {
00168         return _zValue;
00169     }
00170 
00177     _DWFTK_API
00178     void setValue( const DWFString& zValue )
00179         throw()
00180     {
00181         _zValue.assign( zValue );
00182     }
00183 
00190     _DWFTK_API
00191     const DWFString& category() const
00192         throw()
00193     {
00194         return _zCategory;
00195     }
00196 
00203     _DWFTK_API
00204     void setCategory( const DWFString& zCategory )
00205         throw()
00206     {
00207         _zCategory.assign( zCategory );
00208     }
00209 
00216     _DWFTK_API
00217     const DWFString& type() const
00218         throw()
00219     {
00220         return _zType;
00221     }
00222 
00229     _DWFTK_API
00230     void setType( const DWFString& zType )
00231         throw()
00232     {
00233         _zType.assign( zType );
00234     }
00235 
00242     _DWFTK_API
00243     const DWFString& units() const
00244         throw()
00245     {
00246         return _zUnits;
00247     }
00248 
00255     _DWFTK_API
00256     void setUnits( const DWFString& zUnits )
00257         throw()
00258     {
00259         _zUnits.assign( zUnits );
00260     }
00261 
00265     _DWFTK_API
00266     virtual void parseAttributeList( const char** ppAttributeList )
00267         throw( DWFException );
00268 
00269 #ifndef DWFTK_READ_ONLY
00270 
00274     _DWFTK_API
00275     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00276         throw( DWFException );
00277 
00278 #endif
00279 
00280 
00281 private:
00282 
00283     DWFString _zName;
00284     DWFString _zValue;
00285     DWFString _zCategory;
00286     DWFString _zType;
00287     DWFString _zUnits;
00288 };
00289 
00290 }
00291 
00292 #endif

Generated on Tue May 17 12:38:51 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1