2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 // $Header: r:/t2repos/thief2/src/actreact/stimsens.h,v 1.6 2000/01/29 12:44:48 adurant Exp $
18 ////////////////////////////////////////////////////////////
19 // STIMULUS SENSORS COM INTERFACE
23 #define INTERFACE IStimSensors
25 DECLARE_INTERFACE_(IStimSensors
,IUnknown
)
27 DECLARE_UNKNOWN_PURE();
30 // Add a receptron to an object (copies the data)
31 // If the object does not have a "sensor" for the receptron's stimulus, creates
34 STDMETHOD_(ReceptronID
,AddReceptron
)(THIS_ ObjID obj
, StimID stimulus
, const sReceptron
* tron
) PURE
;
35 // Remove a receptron, removes the sensor if it was the last one for that
37 STDMETHOD(RemoveReceptron
)(THIS_ ReceptronID
) PURE
;
40 // Look up a receptron's obj/stim pair by ID
42 STDMETHOD_(sObjStimPair
, GetReceptronElems
)(THIS_ ReceptronID id
) PURE
;
44 // Get a receptron's data structure
46 STDMETHOD(GetReceptron
)(THIS_ ReceptronID id
, sReceptron
* tron
) PURE
;
50 STDMETHOD(SetReceptron
)(THIS_ ReceptronID id
, const sReceptron
* tron
) PURE
;
53 // Query the receptron database. does not account for inheritance on the
56 STDMETHOD_(IReceptronQuery
*,QueryReceptrons
)(THIS_ ObjID obj
, StimID stim
) PURE
;
59 // Query receptrons, including those inherited by obj
61 STDMETHOD_(IReceptronQuery
*,QueryInheritedReceptrons
)(THIS_ ObjID obj
, StimID stim
) PURE
;
64 // Return the objects that have special meaning when used as receptron
67 STDMETHOD_(ObjID
,ObjParam
)(THIS_ eReactObjParam which
) PURE
;
70 // Query sensors, OBJ_NULL is a wildcard.
72 STDMETHOD_(IStimSensorQuery
*,QuerySensors
)(THIS_ ObjID obj
, StimID stim
) PURE
;
75 // Look up the ID of a sensor on an object for a stimulus
77 STDMETHOD_(StimSensorID
, LookupSensor
)(THIS_ ObjID obj
, StimID stim
) PURE
;
80 // Get the the object and stimulus associated with a sensor
82 STDMETHOD_(sObjStimPair
,GetSensorElems
)(THIS_ StimSensorID ID
) PURE
;
85 // Notify the stimsensors about database changes
87 STDMETHOD(DatabaseNotify
)(THIS_ tStimDatabaseMsg msg
, IUnknown
* file
) PURE
;
90 // Notify about object creation/deletion
92 STDMETHOD(ObjectNotify
)(THIS_ eObjNotifyMsg msg
, ObjNotifyData data
) PURE
;
97 //------------------------------------------------------------
98 // Aggregate member factory
101 EXTERN
void StimSensorsCreate(void);
104 //------------------------------------------------------------
105 // Receptron query API
109 #define INTERFACE IReceptronQuery
111 DECLARE_INTERFACE_(IReceptronQuery
,IUnknown
)
113 DECLARE_UNKNOWN_PURE();
118 STDMETHOD(Start
)(THIS
) PURE
;
119 STDMETHOD_(BOOL
,Done
)(THIS
) PURE
;
120 STDMETHOD(Next
)(THIS
) PURE
;
125 STDMETHOD_(sObjStimPair
,Elems
)(THIS
) PURE
;
126 STDMETHOD_(ReceptronID
,ID
)(THIS
) PURE
;
127 // Ptr is only valid until Next() or final Release()
128 STDMETHOD_(const sReceptron
*, Receptron
)(THIS
) PURE
;
133 //------------------------------------------------------------
138 #define INTERFACE IStimSensorQuery
140 DECLARE_INTERFACE_(IStimSensorQuery
,IUnknown
)
142 DECLARE_UNKNOWN_PURE();
147 STDMETHOD(Start
)(THIS
) PURE
;
148 STDMETHOD_(BOOL
,Done
)(THIS
) PURE
;
149 STDMETHOD(Next
)(THIS
) PURE
;
154 STDMETHOD_(sObjStimPair
,Elems
)(THIS
) PURE
;
155 STDMETHOD_(StimSensorID
,ID
)(THIS
) PURE
;
160 #endif // __STIMSENS_H