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

ObjectDefinitionResource.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_OBJECT_DEFINITION_RESOURCE_H
00021 #define _DWFTK_OBJECT_DEFINITION_RESOURCE_H
00022 
00023 
00028 
00029 
00030 #include "dwf/Toolkit.h"
00031 #include "dwf/package/Resource.h"
00032 #include "dwf/package/utility/DefinedObjectContainer.h"
00033 
00034 
00035 namespace DWFToolkit
00036 {
00037 
00056 class DWFObjectDefinitionResource : public DWFResource
00057                                   , public DWFDefinedObjectContainer
00058                                   , public DWFDefinedObjectInstanceContainer
00059 {
00060 
00061 public:
00062 
00079     _DWFTK_API
00080     DWFObjectDefinitionResource( const DWFString& zType,
00081                                  const DWFString& zRole )
00082         throw();
00083 
00089     _DWFTK_API
00090     virtual ~DWFObjectDefinitionResource()
00091         throw();
00092 
00093 
00094 #ifndef DWFTK_READ_ONLY
00095 
00096     //
00097     // Returns a stream for reading the resource data
00098     // The caller is responsible for releasing the pointer
00099     // with the \b DWFCORE_FREE_OBJECT macro.
00100     // 
00101     // This resource object is a bit special since it's created
00102     // on-demand when a section with defined objects is serialized.
00103     // This method is overridden in order to provide a real byte stream
00104     // for the package writer to use to create the object defintion document
00105     //
00106     // bCache is ignored
00107 
00124     _DWFTK_API
00125     virtual DWFInputStream* getInputStream( bool bCache = false )
00126         throw( DWFException );
00127 
00131     _DWFTK_API
00132     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00133         throw( DWFException );
00134 
00135 #endif
00136 
00137 private:
00138 
00139     DWFString   _zType;
00140     char*       _pBuffer;
00141 
00142 
00143 private:
00144 
00145     DWFObjectDefinitionResource( const DWFObjectDefinitionResource& );
00146     DWFObjectDefinitionResource& operator=( const DWFObjectDefinitionResource& );
00147 };
00148 
00149 
00150 }
00151 
00152 #endif

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