home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
win
/
sieciowe
/
oiv_demo.lzh
/
disk2
/
DATA.2
/
include
/
Ivf
/
IvfDoc.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-06-19
|
4KB
|
122 lines
/*
* Copyright (C) 1995 Template Graphics Software, Inc.
_______________________________________________________________________
_________________ TEMPLATE GRAPHICS SOFTWARE INC. ___________________
|
|
| This class provides methods for manipulation of Open Inventor
| documents.
|
| Author(s): James R. Gambale, Jr.
|
_________________ TEMPLATE GRAPHICS SOFTWARE INC. ___________________
_______________________________________________________________________
*/
#ifndef __CIVFDOC_H__
#define __CIVFDOC_H__
class SoSeparator;
class SoInput;
class CArchive ;
class CIvfDoc
{
public:
CIvfDoc();
~CIvfDoc();
public:
// pointer to the root of the scene graph
SoSeparator *m_pSceneRoot ;
// This method invokes IvfDeleteContents and
// unrefs the current scene graph.
BOOL IvfOnNewDocument();
// This method loads a file given a path name. The
// pointer for the scene graph that is produced is
// stored in m_pSceneRoot.
BOOL IvfOnOpenDocument(LPCTSTR lpszPathName);
// This method stores the scene graph pointed to by
// m_pSceneRoot in the file specified by the argument.
BOOL IvfOnSaveDocument(LPCTSTR lpszPathName);
// This method loads a file given file handle. The
// pointer for the scene graph that is produced is
// stored in m_pSceneRoot.
BOOL IvfOnOpenDocument(UINT hFile);
// This method stores the scene graph pointed to by
// m_pSceneRoot in the file specified by the argument.
BOOL IvfOnSaveDocument(UINT hFile);
// This method loads a file given an archive object. The
// pointer for the scene graph that is produced is
// stored in m_pSceneRoot.
BOOL IvfOnOpenDocument(CArchive &rArchive);
// This method stores the scene graph pointed to by
// m_pSceneRoot in the file specified by the argument.
BOOL IvfOnSaveDocument(CArchive &rArchive);
// This method unrefs the scene graph pointed
// to by m_pSceneRoot
virtual void IvfDeleteContents();
// This method sets m_pSceneRoot to pRoot. The scene graph
// previously pointed to by m_pSceneRoot (if any) is unrefed.
void IvfSetSceneGraph(SoSeparator *pRoot);
// This method returns TRUE if this application is an
// OLE server, FALSE otherwise.
BOOL IvfIsOleSrvr() ;
// This method loads the contents of an Open Inventor file.
// A pointer to the scene graph is returned. The ref count
// for the returned scene graph is zero.
static SoSeparator *IvfReadAll(SoInput *);
// This method saves the scene graph pointed to by pRoot in the
// file specified by lpFname. If successful, TRUE is returned.
static BOOL IvfSaveSceneGraph(LPCTSTR lpFname,SoSeparator *pRoot) ;
// This method loads the file specified by lpFname, and returns
// a pointer to the scene graph. The ref count for the
// returned scene graph is zero. Null is returned if the load fails.
static SoSeparator *IvfLoadSceneGraph(LPCTSTR lpFname) ;
// This method saves the scene graph pointed to by pRoot in the
// file specified by hFile. If successful, TRUE is returned.
static BOOL IvfSaveSceneGraph(UINT hFile,SoSeparator *pRoot) ;
// This method loads the file specified by lpFname, and returns
// a pointer to the scene graph. The ref count for the
// returned scene graph is zero. Null is returned if the load fails.
static SoSeparator *IvfLoadSceneGraph(UINT hFile) ;
// This method saves the scene graph pointed to by pRoot in the
// archive specified by rArchive. If successful, TRUE is returned.
static BOOL IvfSaveSceneGraph(CArchive &rArchive,SoSeparator *pRoot) ;
// This method loads from the archive specified by lpFname, and returns
// a pointer to the scene graph. The ref count for the
// returned scene graph is zero. Null is returned if the load fails.
static SoSeparator *IvfLoadSceneGraph(CArchive &rArchive) ;
protected:
// This method deletes the scene graph pointed to by m_pSceneRoot.
void IvfDeleteSceneGraph() ;
// This method notifies the view object that the scene graph has
// changed.
void IvfSceneGraphChanged() ;
};
#endif