home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 December / PCWorld_2001-12_cd.bin / Software / Topware / Hackman / _SETUP.1 / bindstructs.h < prev    next >
C/C++ Source or Header  |  2000-06-28  |  2KB  |  124 lines

  1. #ifndef _BINDSTRUCTS_H
  2. #define _BINDSTRUCTS_H
  3.  
  4. class CDBLBIND
  5. {
  6.     private:
  7.         double * pbDataD,bDataD;
  8.         LPSTR bindstringD;
  9.     
  10.     public:
  11.  
  12.         CDBLBIND(double *nVarD,LPSTR nbStringD) : pbDataD(nVarD),bDataD(*nVarD)
  13.         {
  14.             bindstringD = new char[strlen(nbStringD)];
  15.             strcpy(bindstringD,nbStringD);
  16.  
  17.         }
  18.  
  19.         ~CDBLBIND()
  20.         {
  21.             delete bindstringD;
  22.         }
  23.  
  24.         double    GetData()    {return bDataD;}
  25.         LPSTR    GetBind()    {return bindstringD;}
  26. };
  27.  
  28. class CINTBIND
  29. {    
  30.     private:
  31.         int * pbDataI,bDataI;
  32.         LPSTR bindstringI;
  33.  
  34.     public:
  35.  
  36.     CINTBIND(int *nVarI,LPSTR nbStringI) : pbDataI(nVarI),bDataI(*nVarI)
  37.     {
  38.         bindstringI= new char[strlen(nbStringI)];
  39.         strcpy(bindstringI,nbStringI);
  40.     }
  41.  
  42.     ~CINTBIND()
  43.     {
  44.         delete bindstringI;
  45.     }
  46.  
  47.     int GetData()    {return bDataI;}
  48.     LPSTR GetBind()    {return bindstringI;}
  49. };
  50.  
  51.  
  52.  
  53. class CLONGBIND
  54. {
  55.     private:
  56.         long *pbDataL,bDataL;
  57.         LPSTR bindstringL;
  58.     public:
  59.         CLONGBIND(long *nVarL,LPSTR nbStringL) : bDataL(*nVarL),pbDataL(nVarL)
  60.         {
  61.             bindstringL= new char[strlen(nbStringL)];
  62.             strcpy(bindstringL,nbStringL);
  63.         }
  64.  
  65.         ~CLONGBIND()
  66.         {
  67.             delete bindstringL;
  68.         }
  69.  
  70.         long GetData()    {return bDataL;}
  71.         LPSTR GetBind()    {return bindstringL;}
  72. };
  73.  
  74. class CFUNCBIND
  75. {    
  76.     private:
  77.         FARPROC bDataF;
  78.         LPSTR bindstringF;
  79.     
  80.     public:
  81.         CFUNCBIND(FARPROC nFunc,LPSTR nbStringF) : bDataF(nFunc)
  82.         {    
  83.             bindstringF = new char[strlen(nbStringF)];
  84.             strcpy(bindstringF,nbStringF);
  85.         }
  86.  
  87.         ~CFUNCBIND()
  88.         {
  89.             delete bindstringF;
  90.         }
  91.  
  92.         FARPROC GetFunction()    {return bDataF;}
  93.         LPSTR    GetBind()        {return bindstringF;}
  94.  
  95.  
  96. };
  97.  
  98.  
  99. class CSTRBIND
  100. {
  101.  
  102.     private:
  103.         LPSTR bDataS,bindstringS;
  104.     
  105.     public:    
  106.         CSTRBIND(LPSTR nVarS,LPSTR nbStringS)
  107.         {
  108.             bDataS= new char[strlen(nbStringS)];
  109.             bindstringS= new char[strlen(nVarS)];
  110.             strcpy(bDataS,nVarS);
  111.             strcpy(bindstringS,nbStringS);
  112.         }
  113.  
  114.         ~CSTRBIND()
  115.         {
  116.             delete bDataS;
  117.             delete bindstringS;
  118.         }
  119.  
  120.         LPSTR GetData()        {return bDataS;}
  121.         LPSTR GetBind()        {return bindstringS;}
  122. };
  123.  
  124. #endif