Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv10333/Include
Modified Files:
Tag: systems
EventMapIndex.h EventMapping.h HID.h
Log Message:
Index: EventMapIndex.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/EventMapIndex.h,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** EventMapIndex.h 26 Jan 2003 23:34:13 -0000 1.2
--- EventMapIndex.h 11 Oct 2003 17:46:33 -0000 1.2.2.1
***************
*** 34,49 ****
! class EventMapIndex
{
public:
! ~EventMapIndex();
! EventMapping *getMap(const simdata::hasht &key);
! EventMapping *getMap(const std::string &id);
void load(std::string const &path);
void loadAllMaps();
protected:
! typedef simdata::HASHT_MAP<EventMapping*>::Type MapHash;
! typedef std::vector<EventMapping*> MapVector;
MapHash m_Index;
MapVector m_Maps;
--- 34,48 ----
! class EventMapIndex: public simdata::Referenced
{
public:
! EventMapping::Ref getMap(const simdata::hasht &key);
! EventMapping::Ref getMap(const std::string &id);
void load(std::string const &path);
void loadAllMaps();
protected:
! typedef simdata::HASHT_MAP<EventMapping::Ref>::Type MapHash;
! typedef std::vector<EventMapping::Ref> MapVector;
MapHash m_Index;
MapVector m_Maps;
Index: EventMapping.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/EventMapping.h,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** EventMapping.h 19 Feb 2003 11:41:56 -0000 1.4
--- EventMapping.h 11 Oct 2003 17:46:33 -0000 1.4.2.1
***************
*** 38,48 ****
#include <vector>
#include <SimData/HashUtility.h>
! class EventMapping
{
public:
EventMapping();
struct LinearCorrection {
--- 38,51 ----
#include <vector>
+ #include <SimData/Ref.h>
#include <SimData/HashUtility.h>
! class EventMapping: public simdata::Referenced
{
public:
EventMapping();
+
+ typedef simdata::Ref<EventMapping> Ref;
struct LinearCorrection {
Index: HID.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/HID.h,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -C2 -d -r1.7.2.1 -r1.7.2.2
*** HID.h 16 Sep 2003 06:57:30 -0000 1.7.2.1
--- HID.h 11 Oct 2003 17:46:33 -0000 1.7.2.2
***************
*** 48,51 ****
--- 48,53 ----
#include <SDL/SDL_keyboard.h>
+ #include <SimData/Ref.h>
+
#include <string>
#include <vector>
***************
*** 65,75 ****
* and implements an event dispatch routine.
*/
! class HID
{
-
public:
HID() {}
- virtual ~HID() {}
/**
--- 67,75 ----
* and implements an event dispatch routine.
*/
! class HID: public simdata::Referenced
{
public:
HID() {}
/**
***************
*** 128,131 ****
--- 128,134 ----
*/
static void translate(SDL_Event &event);
+
+ protected:
+ virtual ~HID() {}
};
***************
*** 148,154 ****
public:
VirtualHID();
- virtual ~VirtualHID();
! virtual void setMapping(EventMapping const *map);
virtual void bindObject(InputInterface *object);
--- 151,156 ----
public:
VirtualHID();
! virtual void setMapping(simdata::Ref<const EventMapping> map);
virtual void bindObject(InputInterface *object);
***************
*** 162,165 ****
--- 164,168 ----
protected:
+ virtual ~VirtualHID();
virtual void setScript(EventMapping::Script const *s, int x = -1, int y = -1);
virtual void setVirtualMode(int mode);
***************
*** 168,172 ****
int m_VirtualMode;
bool m_JoystickModifier;
! const EventMapping *m_Map;
InputInterface *m_Object;
--- 171,175 ----
int m_VirtualMode;
bool m_JoystickModifier;
! simdata::Ref<const EventMapping> m_Map;
InputInterface *m_Object;
|