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