convert line ends
[canaan.git] / prj / cam / src / object / propman.h
blobb80e40be3912229985cf07c70a0fee83c3e35654
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 // $Header: r:/t2repos/thief2/src/object/propman.h,v 1.6 2000/01/29 13:24:38 adurant Exp $
7 #pragma once
9 #ifndef __PROPMAN_H
10 #define __PROPMAN_H
11 #include <comtools.h>
12 #include <osystype.h>
13 #include <proptype.h>
15 ////////////////////////////////////////////////////////////
16 // PROPERTY MANAGER
19 F_DECLARE_INTERFACE(IPropertyManager);
20 F_DECLARE_INTERFACE(IProperty);
22 struct sPropertyIter;
24 #undef INTERFACE
25 #define INTERFACE IPropertyManager
27 DECLARE_INTERFACE_(IPropertyManager, IUnknown)
30 // IUnknown methods
32 DECLARE_UNKNOWN_PURE();
35 // Look up a property
37 STDMETHOD_(IProperty*,GetProperty)(THIS_ PropertyID) CONSTFUNC PURE;
38 STDMETHOD_(IProperty*,GetPropertyNamed)(THIS_ const char* name) CONSTFUNC PURE;
40 #define IPropertyManager_GetProperty(p, a) COMCall1(p, GetProperty, a)
41 #define IPropertyManager_GetPropertyNamed(p, a) COMCall1(p, GetPropertyNamed, a)
44 // Notify the property system of an event
46 STDMETHOD(Notify)(THIS_ ePropertyNotifyMsg msg, PropNotifyData data) PURE;
48 #define IPropertyManager_Notify(p, a, b) COMCall2(p, Notify, a, b)
51 // Iterate over all properties
53 STDMETHOD(BeginIter)(THIS_ struct sPropertyIter* iter) PURE;
54 STDMETHOD_(IProperty*,NextIter)(THIS_ struct sPropertyIter* iter) PURE;
56 #define IPropertyManager_BeginIter(p, a) COMCall1(p, BeginIter, a)
57 #define IPropertyManager_NextIter(p, a) COMCall1(p, NextIter, a)
60 // Add & remove properties. These are typically done by the IProperty objects
61 // themselves. Most clients will have no need of these.
64 STDMETHOD_(BOOL,AddProperty)(IProperty *prop, PropertyID *id) PURE;
66 // Remove a Property from the list being managed, return success
67 STDMETHOD_(BOOL,DelProperty)(IProperty *prop) PURE;
71 // Factory Function
75 EXTERN tResult LGAPI PropertyManagerCreate(void);
78 // Property Iter struct
80 typedef struct sPropertyIter
82 PropertyID id;
83 } sPropertyIter;
86 #endif // __PROPMAN_H