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

ObjectDefinition.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_H
00021 #define _DWFTK_OBJECT_DEFINITION_H
00022 
00023 
00028 
00029 
00030 #include "dwfcore/STL.h"
00031 
00032 #include "dwf/Toolkit.h"
00033 #include "dwf/package/reader/ObjectDefinitionReader.h"
00034 #include "dwf/package/utility/PropertyContainer.h"
00035 
00036 namespace DWFToolkit
00037 {
00038 
00039 //
00040 // fwd decl
00041 //
00042 class DWFSection;
00043 
00055 class DWFObjectDefinition : public DWFToolkitMemory
00056                           , public DWFObjectDefinitionReader
00057 {
00058 
00059 public:
00060 
00073     _DWFTK_API
00074     DWFObjectDefinition( DWFPackageReader* pPackageReader )
00075         throw();
00076 
00082     _DWFTK_API
00083     virtual ~DWFObjectDefinition()
00084         throw();
00085 
00096     _DWFTK_API
00097     void getRootInstances( DWFDefinedObjectInstance::tList& rRootInstances )
00098         throw( DWFException );
00099 
00122     _DWFTK_API
00123     DWFPropertyContainer* getInstanceProperties( DWFDefinedObjectInstance& rInstance )
00124         throw( DWFException );
00125 
00149     _DWFTK_API
00150     DWFPropertyContainer* getInstanceProperties( const DWFString& zInstanceID )
00151         throw( DWFException );
00152 
00159     _DWFTK_API
00160     double version() const
00161         throw()
00162     {
00163         return _nVersion;
00164     }
00165 
00169     _DWFTK_API
00170     void provideVersion( double nVersion )
00171         throw();
00172 
00176     _DWFTK_API
00177     void provideProperties( const DWFString&    zID,
00178                             vector<DWFString>*  pPropertyRefs,
00179                             DWFProperty::tList* pPropertyList )
00180         throw();
00181 
00185     _DWFTK_API
00186     void provideObject( DWFDefinedObject* pObject )
00187         throw();
00188 
00192     _DWFTK_API
00193     void provideInstance( DWFDefinedObjectInstance* pInstance )
00194         throw();
00195 
00196 private:
00197 
00198     typedef struct _tPropertySet
00199     {
00200         DWFProperty::tList*             pList;
00201         vector<struct _tPropertySet*>   oRefs;
00202 
00203     } tPropertySet;
00204 
00205     typedef DWFStringKeySkipList<tPropertySet*> tPropertySetMap;
00206 
00207 private:
00208 
00209     //
00210     //
00211     //
00212     void _resolvePropertyRefs( tPropertySet*         pSet,
00213                                DWFPropertyContainer* pContainer )
00214         throw();
00215 
00216 private:
00217 
00218     double                          _nVersion;
00219 
00220     tPropertySetMap                 _oPropertySets;
00221     DWFDefinedObject::tMap          _oObjects;
00222     DWFDefinedObjectInstance::tMap  _oInstances;
00223 };
00224 
00225 
00226 }
00227 
00228 #endif

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