XMLElementBuilder.h

Go to the documentation of this file.
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 //  $Header: //DWF/Development/Components/Internal/DWF Toolkit/v7.6/develop/global/src/dwf/opc/reader/XMLElementBuilder.h#1 $
00019 //  $DateTime: 2008/02/20 08:38:28 $
00020 //  $Author: appacsviewers $
00021 //  $Change: 84992 $
00022 //  $Revision: #1 $
00023 //
00024 //
00025 
00026 #ifndef _DWFTK_OPCXMLBUILDER_H
00027 #define _DWFTK_OPCXMLBUILDER_H
00028 
00029 
00034 
00035 #include "dwfcore/Core.h"
00036 #include "dwfcore/String.h"
00037 using namespace DWFCore;
00038 
00039 #include "dwf/Toolkit.h"
00040 
00041 namespace DWFToolkit
00042 {
00043 
00051 class OPCXMLElementBuilder _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE
00052 {
00053 
00054 public:
00055 
00061     _DWFTK_API
00062     OPCXMLElementBuilder()
00063         throw()
00064     {;}
00065 
00071     _DWFTK_API
00072     virtual ~OPCXMLElementBuilder()
00073         throw()
00074     {;}
00075 
00087     template<class T>
00088     void build( T*& pT, const char** ppAttributeList )
00089     throw( DWFException )
00090     {
00091         pT = DWFCORE_ALLOC_OBJECT( T );
00092 
00093         if (pT == NULL)
00094         {
00095             _DWFCORE_THROW( DWFMemoryException, /*NOXLATE*/L"Failed to allocate OPCXMLBuildable object" );
00096         }
00097 
00098         pT->parseAttributeList( ppAttributeList );
00099     }
00100 
00101 };
00102 
00103 }
00104 
00105 #endif
00106 

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