/*=========================================================================== * * File: Dfto3dsdoc.H * Author: Dave Humphrey (uesp@m0use.net) * Created On: Saturday, June 23, 2001 * * Defines hte CDfto3dsDoc class. * *=========================================================================*/ #ifndef __DFTO3DSDOC_H #define __DFTO3DSDOC_H /*=========================================================================== * * Begin Required Includes * *=========================================================================*/ #include "uesp/dagger/df3dobj.h" #include "uesp/dagger/bsa/dfarch3d.h" #include "Dfexport3dsdialog.h" /*=========================================================================== * End of Required Includes *=========================================================================*/ /*=========================================================================== * * Class CDfto3dsDoc Definition * *=========================================================================*/ class CDfto3dsDoc : public CDocument { /*---------- Begin Private Class Members -----------------------*/ private: CDFArch3dFile m_Arch3DFile; CDF3dObject* m_pCurrentObject; protected: /* Create from serialization only */ CDfto3dsDoc(); DECLARE_DYNCREATE(CDfto3dsDoc) /* ClassWizard generated virtual function overrides */ //{{AFX_VIRTUAL(CDfto3dsDoc) public: virtual BOOL OnNewDocument(); virtual void Serialize(CArchive& ar) { ; } virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); virtual void DeleteContents(); //}}AFX_VIRTUAL public: /* Class destructor */ virtual ~CDfto3dsDoc(); /* Attempt to export all 3D objects to a 3DS file */ boolean ExportAll3DS (CDfExport3dsDialog& ExportDialog); /* Access the Arch3D object */ short GetNum3DFiles (void) const; short GetDirType (void) const; long GetFileOffset (const size_t Index) const; long GetFileSize (const size_t Index) const; char* GetFileName (const size_t Index) const; long GetFileValue (const size_t Index) const; CDF3dObject* GetCurrentObject (void); /* Attempt to load an object from the current Arch3D file */ boolean LoadArch3DObject (const size_t Index); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif /* Generated message map functions */ protected: //{{AFX_MSG(CDfto3dsDoc) //}}AFX_MSG DECLARE_MESSAGE_MAP() }; /*=========================================================================== * End of Class CDfto3dsDoc *=========================================================================*/ /*=========================================================================== * * Begin CDfto3dsDoc Inline Methods * *=========================================================================*/ /* Access the Arch3D object */ inline short CDfto3dsDoc::GetNum3DFiles (void) const { return m_Arch3DFile.GetNumRecords(); } inline short CDfto3dsDoc::GetDirType (void) const { return m_Arch3DFile.GetDirType(); } inline long CDfto3dsDoc::GetFileOffset (const size_t Index) const { return m_Arch3DFile.GetRecordOffset(Index); } inline long CDfto3dsDoc::GetFileSize (const size_t Index) const { return m_Arch3DFile.GetRecordSize(Index); } inline char* CDfto3dsDoc::GetFileName (const size_t Index) const { return m_Arch3DFile.GetRecordName(Index); } inline long CDfto3dsDoc::GetFileValue (const size_t Index) const { return m_Arch3DFile.GetRecordValue(Index); } /* Get the currently loaded 3D object */ inline CDF3dObject* CDfto3dsDoc::GetCurrentObject (void) { return (m_pCurrentObject); } /*=========================================================================== * End of CDfto3dsDoc Inline Methods *=========================================================================*/ //{{AFX_INSERT_LOCATION}} //}}AFX_INSERT_LOCATION #endif /*=========================================================================== * End of File Dfto3dsdoc.H *=========================================================================*/