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 / DISPNODL.H < prev    next >
C/C++ Source or Header  |  1994-08-06  |  2KB  |  75 lines

  1.  
  2. #ifndef dispnodlist_h
  3. #define dispnodlist_h
  4.  
  5. /*
  6. * NIST STEP Editor Class Library
  7. * cleditor/dispnodelist.h
  8. * February, 1994
  9. * David Sauder
  10. * K. C. Morris
  11.  
  12. * Development of this software was funded by the United States Government,
  13. * and is not subject to copyright.
  14. */
  15.  
  16. /* $Id: dispnodelist.h,v 2.0.1.1 1994/04/05 16:41:47 sauderd Exp $ */ 
  17.  
  18.  
  19.  
  20. #include <gennode.h>
  21. #include <gennodeinline.h>
  22. #include <editordefines.h>
  23. #include <mgrnode.h>
  24. #include <dispnode.h>
  25. #include <gennodelist.h>
  26.  
  27. ///////////////////////////////////////////////////////////////////////////////
  28. // class DisplayNodeList
  29. //    This will be used to represent the display state lists.
  30. //////////////////////////////////////////////////////////////////////////////
  31.  
  32. class DisplayNodeList : public GenNodeList
  33. {
  34. public:
  35.     DisplayNodeList(displayStateEnum type);
  36.     ~DisplayNodeList() { }
  37.  
  38. // ADDED functions
  39.     displayStateEnum GetState()    { return listType; }
  40.  
  41. // REDEFINED functions
  42.         // deletes node from its previous list & appends
  43.     virtual void Append(GenericNode *node);
  44.         // deletes newNode from its previous list & inserts in
  45.         //    relation to existNode
  46.     virtual void InsertAfter(GenericNode *newNode, GenericNode *existNode);
  47.     virtual void InsertBefore(GenericNode *newNode, GenericNode *existNode);
  48.     virtual void Remove(GenericNode *node);
  49.  
  50. protected:
  51. private:
  52.     displayStateEnum listType;
  53. };
  54.  
  55. //////////////////////////////////////////////////////////////////////////////
  56. // class DisplayNodeList inline functions
  57. // these functions don't rely on any inline functions (its own or
  58. //    other classes) that aren't in this file except for Generic functions
  59. //////////////////////////////////////////////////////////////////////////////
  60.  
  61. inline DisplayNodeList::DisplayNodeList(displayStateEnum type) 
  62.     : GenNodeList(new DisplayNode())
  63. {
  64.     listType = type;
  65.     ((DisplayNode *)head)->displayState = type;
  66. }
  67.  
  68. inline void DisplayNodeList::Remove(GenericNode *node)
  69. {
  70.     GenNodeList::Remove(node);
  71. // DON'T DO THIS    ((DisplayNode *)node)->displayState = noMapState;
  72. };
  73.  
  74. #endif
  75.