home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftptest.leeds.ac.uk
/
2015.02.ftptest.leeds.ac.uk.tar
/
ftptest.leeds.ac.uk
/
bionet
/
CAE-GROUP
/
SCL-WIN3x
/
SCL.EXE
/
MGRNODE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-06
|
4KB
|
135 lines
#ifndef mgrnode_h
#define mgrnode_h
/*
* NIST STEP Editor Class Library
* cleditor/mgrnode.h
* February, 1994
* David Sauder
* K. C. Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: mgrnode.h,v 2.0.1.1 1994/04/05 16:41:57 sauderd Exp $ */
/*#include <STEPattribute.h>*/
#include <sdai.h>
#include <Sentity.h>
class GenericNode;
class DisplayNode;
class STEPentity;
#include <gennode.h>
#include <gennodelist.h>
#include <gennodeinline.h>
//#include <dispnode.h>
#include <editordefines.h>
class InstMgr;
//////////////////////////////////////////////////////////////////////////////
// class MgrNode
// If you delete this object, it deletes the STEPentity it represents,
// the DisplayNode, and removes itself from any list it is in.
//////////////////////////////////////////////////////////////////////////////
class MgrNode : public GenericNode
{
friend class GenNodeList;
friend class MgrNodeList;
friend class InstMgr;
protected:
// currState, next, prev implement several lists
// based on currState:
// currState = (completeSE, incompleteSE, newSE, or deleteSE)
// every node will be on one of the four lists implemented by these:
stateEnum currState;
// STEPentity this node is representing info for
STEPentity *se;
// this is the index (in the InstMgr master array) of the ptr to
// this node.
int arrayIndex;
// display info (SEE, etc) for this node
DisplayNode *di;
public:
// used for sentinel node on lists of MgrNodes
MgrNode();
MgrNode(STEPentity *se);
// 'listState' ==
// completeSE - if reading valid exchange file
// incompleteSE or completeSE - if reading working session file
// newSE - if instance is created by user using editor (probe)
MgrNode(STEPentity *se, stateEnum listState);
MgrNode(STEPentity *se, stateEnum listState, MgrNodeList *list);
virtual ~MgrNode();
// STATE LIST OPERATIONS
int MgrNodeListMember(stateEnum s) { return (currState == s); }
stateEnum CurrState() { return currState; }
// returns next or prev member variables
// i.e. next or previous node on curr state list
// searches current list for fileId
MgrNode *StateFindFileId(int fileId);
// deletes from previous cmd list,
// & puts on cmd list cmdList
int ChangeList(MgrNodeList *cmdList);
int ChangeState(stateEnum s);
// Removes from current list.
// Called before adding to diff list or when destructor is called.
void Remove();
// DISPLAY LIST OPERATIONS
void *SEE();
displayStateEnum DisplayState();
int IsDisplayState(displayStateEnum ds);
// returns next or prev member variables
// i.e. next or previous node on display state list
GenericNode *NextDisplay();
GenericNode *PrevDisplay();
// deletes from previous cmd list,
// & puts on cmd list cmdList
int ChangeList(DisplayNodeList *cmdList);
// deletes from previous display list, assigns ds to
// displayState & puts on list dsList
int ChangeState(displayStateEnum ds);
// might not want these three? since it won't actually map them?
void MapModifiable(DisplayNodeList *dnList);
void MapViewable(DisplayNodeList *dnList);
void UnMap(DisplayNodeList *dnList);
// ACCESS FUNCTIONS
int GetFileId();
STEPentity *GetSTEPentity() { return se; }
DisplayNode *&DisplayNode() { return di; }
int ArrayIndex() { return arrayIndex; }
void ArrayIndex(int index) { arrayIndex = index; }
protected:
private:
void Init(STEPentity *s, stateEnum listState, MgrNodeList *list);
};
//////////////////////////////////////////////////////////////////////////////
// class MgrNode inline functions
// these functions don't rely on any inline functions (its own or
// other classes) that aren't in this file except for Generic functions
//////////////////////////////////////////////////////////////////////////////
#endif