home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / ADDON.PAK / PROJECT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.4 KB  |  81 lines

  1. /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2.  
  3.   project.h
  4.   Created: 10/24/95
  5.   Copyright (c) 1995, 1996 Borland International
  6.   $Revision:   1.18  $
  7.    
  8. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/  
  9. #ifndef __PROJECT_H
  10. #define __PROJECT_H
  11.  
  12. //.... interface directory headers ....
  13. #include <ideaddon\iproj.h>
  14. #include <ideaddon\comhelp.h>
  15.  
  16. //.... local headers ....
  17. #include "tests.h"
  18.  
  19. class ProjectTestA;  // forward declaration
  20.  
  21. //.............................................................................
  22. class ProjectClientImpl : public IUnknownImp< IProjectClient > 
  23. {
  24.  public:
  25.   ProjectClientImpl( ProjectTestA * pt, IProjectServer * ps ) 
  26.       : IUNKNOWNIMPL_INIT( IProjectClient ) {
  27.     _curProjectName = NULL;
  28.     _projectServer = ps;
  29.     _testObj = pt;
  30.     _showEvents = FALSE;
  31.   }
  32.  
  33.   void ShowEvents( BOOL b ) { _showEvents = b; }
  34.  
  35.   void ShowPolyStr( const char * label, IPolyString * ps, BOOL release );
  36.   
  37.   //.... IProjectClient methods ....
  38.   virtual void OpenNotify( IPolyString * projectName );
  39.   virtual void CloseNotify();
  40.   virtual void NodeDeleteNotify( ProjectNode node );
  41.   virtual void NodeAddNotify( ProjectNode node );
  42.   virtual void NodeCopyNotify( ProjectNode node, ProjectNode newParent, BOOL reference );
  43.   virtual void NodeMoveNotify( ProjectNode node, ProjectNode oldParent );
  44.   virtual void NodeChangeNotify( ProjectNode node );
  45.   virtual void DependencyQueryResponder( ProjectNode node, 
  46.                             IPolyString * outputName );
  47.   virtual BOOL HandleAddNodeUI() { return FALSE; }
  48.                             
  49.  protected:
  50.   IPolyString * nodeName( ProjectNode node );
  51.  
  52.   BOOL _showEvents;
  53.   IPolyString * _curProjectName;
  54.   IProjectServer * _projectServer;
  55.   ProjectTestA * _testObj;
  56. };
  57.  
  58. //.............................................................................
  59. class ProjectTestA : public TestObject {
  60.  public:
  61.   ProjectTestA();
  62.   virtual ~ProjectTestA();
  63.  
  64.   //........ TestObject Methods .......
  65.   virtual BOOL Init();
  66.   virtual void UnInit();  
  67.   virtual const char * GetName();
  68.   virtual const char * GetTestDescription( int testNum );
  69.   virtual void DoTest( int testNum );
  70.  
  71.  protected:
  72.   BOOL registerForEvents();
  73.   void showNodeInfo( ProjectNode node );
  74.  
  75.   IProjectServer * _projectServer;
  76.   ProjectClientImpl * _projectClient;
  77.   IPolyString * _curProjectName;
  78. }; 
  79.  
  80. #endif    //  __PROJECT_H
  81.