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

  1. /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2.  
  3.   toolsrvr.h
  4.   Created: 10/24/95
  5.   Copyright (c) 1995, Borland International
  6.   $Revision:   1.19  $
  7.    
  8. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/  
  9. #ifndef __TOOLSRVR_H
  10. #define __TOOLSRVR_H
  11.  
  12. #include <ideaddon\itool.h>
  13. #include <ideaddon\iproj.h>
  14. #include "tests.h"
  15.  
  16. //.............................................................................
  17. class ToolTestA : public TestObject {
  18.  public:
  19.   ToolTestA();
  20.   virtual ~ToolTestA();
  21.  
  22.   //........ TestObject Methods .......
  23.   virtual BOOL Init();
  24.   virtual void UnInit();  
  25.   virtual const char * GetName();
  26.   virtual const char * GetTestDescription( int testNum );
  27.   virtual void DoTest( int testNum );
  28.  
  29.   void ConcatPolyStr ( const char *startStr, IPolyString *pPoly, char *buf, int max, bool OutIt );
  30.  
  31.  protected:
  32.   IToolServer * _toolServer;
  33. }; 
  34.  
  35. class ToolTestB : public TestObject, public IUnknownImp< IProjectSaveClient > {
  36.  public:
  37.   ToolTestB();
  38.   virtual ~ToolTestB();
  39.  
  40.   void AddTool();
  41.   void RemoveTool();
  42.  
  43.   //........ TestObject Methods .......
  44.   virtual BOOL Init();
  45.   virtual void UnInit();  
  46.   virtual const char * GetName();
  47.   virtual const char * GetTestDescription( int testNum );
  48.   virtual void DoTest( int testNum );
  49.   
  50.   //....... IProjectSaveClient ..........
  51.   virtual void BeforeSaveNotify();
  52.   virtual void AfterSaveNotify();
  53.  
  54.  protected:
  55.   IToolServer  * _toolServer;
  56.   IProjectServer * _projectServer;
  57.   IProjectClient * _projectClient;
  58. }; 
  59.  
  60. //.............................................................................
  61. class ProjectToolClient : public IUnknownImp< IProjectClient > 
  62. {
  63.  public:
  64.   ProjectToolClient( ToolTestB * tB ) : IUNKNOWNIMPL_INIT( IProjectClient ) 
  65.     {
  66.     _toolTestB = tB;
  67.     _currentProject = NULL;
  68.     }
  69.  
  70.   //.... IProjectClient methods ....
  71.   virtual void OpenNotify( IPolyString * projectName );
  72.   virtual void CloseNotify();
  73.   virtual void NodeDeleteNotify( ProjectNode node ) {}
  74.   virtual void NodeAddNotify( ProjectNode node ) {}
  75.   virtual void NodeCopyNotify( ProjectNode, ProjectNode, BOOL ) {}
  76.   virtual void NodeMoveNotify( ProjectNode, ProjectNode ) {}
  77.   virtual void NodeChangeNotify( ProjectNode ) {}
  78.   virtual void DependencyQueryResponder( ProjectNode node, 
  79.                             IPolyString * outputName ) {}
  80.   virtual BOOL HandleAddNodeUI() { return FALSE; }
  81.  protected:
  82.   ToolTestB * _toolTestB;
  83.   IPolyString * _currentProject; 
  84. };
  85.  
  86. #endif    //  __TOOLSRVR_H
  87.