 
#ifndef owatch_DEFINED
#define owatch_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from owatch.ch and will be
 * overwritten.  Make changes to owatch.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from owatch.ch.
 */ 
 
/* Copyright 1992 Carnegie Mellon University, All rights reserved.
 $Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
 */
/* $Header: /afs/cs.cmu.edu/project/atk-dist/6.2/atk/basics/common/RCS/owatch.ch,v 1.2 1992/12/14 20:37:02 rr2b R6tape $ */

struct owatch_data {
    struct observable *obj;
    boolean alive;
    struct owatch_data *next, *prev;
    long refs;
};






/* 
 * End of information copied from owatch.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
#define dontDefineRoutinesFor_observable
#include "observe.ih"
#undef dontDefineRoutinesFor_observable

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for owatch 
 */ 
struct owatch { 
    union {
	struct basicobject_methods *owatch_methods;
	struct traced traced;
	struct observable observable;
    } header;

};

 
/* 
 * End of data structure for owatch.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef owatch_PROGRAMMERVERSION
#define owatch_PROGRAMMERVERSION 1
#endif /* owatch_PROGRAMMERVERSION */

#ifdef owatch_VERSION
#undef owatch_VERSION
#endif /* owatch_VERSION */
#define owatch_VERSION ((((owatch_PROGRAMMERVERSION << 16) ^ (11 << 8) ^ sizeof(struct owatch)) & 0x7ffff) + 0x80000 + (65 << 20))


#endif /* class_StaticInfoOnly */
#define owatch_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *owatch__GetClassInfo(); \
 extern struct classheader *owatch_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, owatch_classheader_StaticExport->name, owatch__GetClassInfo, NULL, owatch_classheader_StaticExport->namekey); } 
 
#define owatch_StaticLoad()  \
    { \
    observable_StaticLoad(); \
    owatch_StaticLoadOnlyThisClass();  \
    } 
 
#define owatch_StaticEntry  {owatch_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader owatch_classheader = {
    owatch_VERSION,
    "owatch",
    "owatch",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define owatch_CLASSPROCEDURES (owatch_classheader.classprocedures)
int owatch_classref_;
#endif /* class_StaticInfoOnly */

#endif /* owatch_DEFINED */

#if !defined(owatch_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_owatch) && !defined(class_StaticEntriesOnly)
#define owatch_ROUTINESDEFINED

#define owatch_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define owatch_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define owatch_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define owatch_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[0]))) (self,observer))
#define owatch_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.owatch_methods->routines[1]))) (self,observer))
#define owatch_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[2]))) (self,observer))
#define owatch_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[3]))) (self,value))
#define owatch_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[4]))) (self,changed,value))
#define owatch_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.owatch_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define owatch_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[6]))) (self,trigger,rcvr))
#define owatch_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[7]))) (self,trigger))
#define owatch_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[8]))) (self,trigger))
#define owatch_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.owatch_methods->routines[9]))) (self,trigger))
#define owatch_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.owatch_methods->routines[10]))) (self,trigger))

#define owatch_NewFromObject(self) \
    ((* ((struct owatch * (*)())((self)->header.owatch_methods->info->procs->routines[0]))) (&owatch_classheader, (self)->header.owatch_methods->info->versionnumber))
#define owatch_New() \
    (*((struct owatch * (*)()) (owatch_CLASSPROCEDURES->routines[0])))(&owatch_classheader,owatch_VERSION)
#define owatch_Initialize(self) \
    (*((void (*)()) (owatch_CLASSPROCEDURES->routines[2])))(&owatch_classheader,self, owatch_VERSION)

#define owatch_Destroy(self) \
    ((* ((void (*)()) ((self)->header.owatch_methods->info->procs->routines[1]))) (&owatch_classheader, self))
#define owatch_Finalize(self) \
    (*((void (*)()) (owatch_CLASSPROCEDURES->routines[3])))(&owatch_classheader,self)

#define owatch_Create(b) \
    (*((struct owatch_data * (*)()) (owatch_CLASSPROCEDURES->routines[5])))(&owatch_classheader,b)
#define owatch_Delete(d) \
    (*((void (*)()) (owatch_CLASSPROCEDURES->routines[6])))(&owatch_classheader,d)
#define owatch_CheckAndDelete(d) \
    (*((boolean (*)()) (owatch_CLASSPROCEDURES->routines[7])))(&owatch_classheader,d)

#define owatch_Check(tocheck) \
     (tocheck?tocheck->alive:FALSE)

#endif /* !defined(owatch_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_owatch ) && !defined(class_StaticEntriesOnly)*/

