EpairsWrapper.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. //-----------------------------------------------------------------------------
  19. //
  20. // $LogFile$
  21. // $Revision: 1.1.1.4 $
  22. // $Author: ttimo $
  23. // $Date: 2000/01/18 00:17:10 $
  24. // $Log: EpairsWrapper.h,v $
  25. // Revision 1.1.1.4 2000/01/18 00:17:10 ttimo
  26. // merging in for RC
  27. //
  28. // Revision 1.3 2000/01/17 23:53:41 TBesset
  29. // ready for merge in sourceforge (RC candidate)
  30. //
  31. // Revision 1.1.1.3 1999/12/29 18:31:25 TBesset
  32. // Q3Radiant public version
  33. //
  34. // DESCRIPTION:
  35. // virtual class to allow plugin operations on entities epairs
  36. // this is the internal header for our implementation
  37. #ifndef _EPAIRSWRAPPER_H_
  38. #define _EPAIRSWRAPPER_H_
  39. class CEpairsWrapper : public IEpair
  40. {
  41. public:
  42. int refCount;
  43. entity_t *m_pEnt;
  44. virtual void IncRef() { refCount++; }
  45. virtual void DecRef() { refCount--; if (refCount <= 0) delete this; }
  46. CEpairsWrapper() { refCount = 0; }
  47. CEpairsWrapper( entity_t* ep ) { refCount = 0; m_pEnt = ep; }
  48. virtual ~CEpairsWrapper() { }
  49. virtual void GetVectorForKey( char* key, vec3_t vec );
  50. virtual float FloatForKey( char *key );
  51. virtual char* ValueForKey( char *key );
  52. virtual void SetKeyValue( char *key, char *value );
  53. virtual void GetEntityOrigin( vec3_t vec );
  54. virtual void CalculateRotatedBounds( vec3_t mins, vec3_t maxs );
  55. };
  56. #endif