Bookmark.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_BOOKMARK_H
00021 #define _DWFTK_BOOKMARK_H
00022 
00023 
00028 
00029 
00030 #include "dwfcore/STL.h"
00031 
00032 
00033 #include "dwf/Toolkit.h"
00034 #include "dwf/package/XML.h"
00035 #include "dwf/package/reader/PackageReader.h"
00036 #include "dwf/package/writer/PackageWriter.h"
00037 
00038 
00039 namespace DWFToolkit
00040 {
00041 
00055 class DWFBookmark : public DWFXMLBuildable
00056 
00057 #ifndef DWFTK_READ_ONLY
00058                   , public DWFXMLSerializable
00059 #endif
00060                   _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00061 {
00062 
00063 public:
00064 
00068     typedef _DWFTK_STD_VECTOR(DWFBookmark*) tList;
00069 
00070 public:
00071 
00077     _DWFTK_API
00078     DWFBookmark()
00079         throw();
00080 
00088     _DWFTK_API
00089     DWFBookmark( const DWFString& zName,
00090                  const DWFString& zHRef )
00091         throw();
00092 
00098     _DWFTK_API
00099     virtual ~DWFBookmark()
00100         throw();
00101 
00108     _DWFTK_API
00109     const DWFString& name() const
00110         throw()
00111     {
00112         return _zName;
00113     }
00114 
00121     _DWFTK_API
00122     const DWFString& href() const
00123         throw()
00124     {
00125         return _zHRef;
00126     }
00127 
00135     _DWFTK_API
00136     const DWFBookmark::tList& getChildBookmarks() const
00137         throw()
00138     {
00139         return _oChildren;
00140     }
00141 
00152     _DWFTK_API
00153     void addChildBookmark( DWFBookmark* pBookmark )
00154         throw();
00155 
00159     _DWFTK_API
00160     virtual void parseAttributeList( const char** ppAttributeList )
00161         throw( DWFException );
00162 
00163 
00164 #ifndef DWFTK_READ_ONLY
00165 
00169     _DWFTK_API
00170     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00171         throw( DWFException );
00172 
00173 private:
00174 
00175     //
00176     // recursive helper
00177     //
00178     void _serialize( DWFBookmark& rBookmark, DWFXMLSerializer& rSerializer, const DWFString& zNamespace )
00179         throw( DWFException );
00180 
00181 #endif
00182 
00183 private:
00184 
00185     DWFString   _zName;
00186     DWFString   _zHRef;
00187 
00188     DWFBookmark::tList _oChildren;
00189 };
00190 
00191 }
00192 
00193 #endif

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