 
#ifndef box_DEFINED
#define box_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 box.ch and will be
 * overwritten.  Make changes to box.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from box.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$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 $ */
/* $ACIS$ */

 

/* box.ch - box data object definition and interface */

#include <rect.h>

#define box_VERSION 1
#define SafeFromNull(s) (((s) != NULL) ? (s) : "(null)")

#define getDataObject(self) ((self) -> header.dataobject)


/* globals for entire package */

/* actual interface definition */





/* end of box.ch */


/* 
 * End of information copied from box.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
#define dontDefineRoutinesFor_dataobject
#include "dataobj.ih"
#undef dontDefineRoutinesFor_dataobject

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for box 
 */ 
struct box { 
    union {
	struct basicobject_methods *box_methods;
	struct traced traced;
	struct observable observable;
	struct dataobject dataobject;
    } header;
  int inGetModified;			    /* recursion protection switch */
  struct dataobject *contents;		    /* contained object */

};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef box_PROGRAMMERVERSION
#define box_PROGRAMMERVERSION 1
#endif /* box_PROGRAMMERVERSION */

#ifdef box_VERSION
#undef box_VERSION
#endif /* box_VERSION */
#define box_VERSION ((((box_PROGRAMMERVERSION << 16) ^ (25 << 8) ^ sizeof(struct box)) & 0x7ffff) + 0x80000 + (2 << 20))


#endif /* class_StaticInfoOnly */
#define box_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *box__GetClassInfo(); \
 extern struct classheader *box_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, box_classheader_StaticExport->name, box__GetClassInfo, NULL, box_classheader_StaticExport->namekey); } 
 
#define box_StaticLoad()  \
    { \
    dataobject_StaticLoad(); \
    box_StaticLoadOnlyThisClass();  \
    } 
 
#define box_StaticEntry  {box_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader box_classheader = {
    box_VERSION,
    "box",
    "box",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define box_CLASSPROCEDURES (box_classheader.classprocedures)
int box_classref_;
#endif /* class_StaticInfoOnly */

#endif /* box_DEFINED */

#if !defined(box_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_box) && !defined(class_StaticEntriesOnly)
#define box_ROUTINESDEFINED

#define box_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define box_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define box_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define box_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.box_methods->routines[0]))) (self,observer))
#define box_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.box_methods->routines[1]))) (self,observer))
#define box_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.box_methods->routines[2]))) (self,observer))
#define box_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.box_methods->routines[3]))) (self,value))
#define box_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.box_methods->routines[4]))) (self,changed,value))
#define box_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.box_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define box_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.box_methods->routines[6]))) (self,trigger,rcvr))
#define box_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.box_methods->routines[7]))) (self,trigger))
#define box_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.box_methods->routines[8]))) (self,trigger))
#define box_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.box_methods->routines[9]))) (self,trigger))
#define box_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.box_methods->routines[10]))) (self,trigger))
#define box_Read(self,file,id) \
    ((* ((long (*)())((self)->header.box_methods->routines[11]))) (self,file,id))
#define box_Write(self,file,writeid,level) \
    ((* ((long (*)())((self)->header.box_methods->routines[12]))) (self,file,writeid,level))
#define box_ReadOtherFormat(self,file,fmt,encoding,description) \
    ((* ((boolean (*)())((self)->header.box_methods->routines[13]))) (self,file,fmt,encoding,description))
#define box_WriteOtherFormat(self,file,writeid,level,usagetype,boundary) \
    ((* ((long (*)())((self)->header.box_methods->routines[14]))) (self,file,writeid,level,usagetype,boundary))
#define box_GetModified(self) \
    ((* ((long (*)())((self)->header.box_methods->routines[15]))) (self))
#define box_SetModified(self) \
    ((* ((void (*)())((self)->header.box_methods->routines[16]))) (self))
#define box_ViewName(self) \
    ((* ((char * (*)())((self)->header.box_methods->routines[17]))) (self))
#define box_SetAttributes(self,attributes) \
    ((* ((void (*)())((self)->header.box_methods->routines[18]))) (self,attributes))
#define box_Put(self,property,type,rock) \
    ((* ((void (*)())((self)->header.box_methods->routines[19]))) (self,property,type,rock))
#define box_Get(self,property,type,rock) \
    ((* ((short (*)())((self)->header.box_methods->routines[20]))) (self,property,type,rock))
#define box_ListCurrentViews(self,array,size) \
    ((* ((int (*)())((self)->header.box_methods->routines[21]))) (self,array,size))
#define box_RestoreModified(self,oldmodified) \
    ((* ((void (*)())((self)->header.box_methods->routines[22]))) (self,oldmodified))
#define box_UniqueID(self) \
 ((long)((&(self)->header.dataobject)))
#define box_GetWriteID(self) \
 ( ((&(self)->header.dataobject))->writeID )
#define box_SetWriteID(self,newValue) \
 ( (((&(self)->header.dataobject))->writeID) = (newValue) )
#define box_GetID(self) \
      ( ((&(self)->header.dataobject))->id )
#define box_SetID(self,newValue) \
      ( (((&(self)->header.dataobject))->id) = (newValue) )
#define box_ToggleDebug(self) \
    ((* ((void (*)())((self)->header.box_methods->routines[23]))) (self))
#define box_FillInContents(self,name) \
    ((* ((void (*)())((self)->header.box_methods->routines[24]))) (self,name))

#define box_NewFromObject(self) \
    ((* ((struct box * (*)())((self)->header.box_methods->info->procs->routines[0]))) (&box_classheader, (self)->header.box_methods->info->versionnumber))
#define box_New() \
    (*((struct box * (*)()) (box_CLASSPROCEDURES->routines[0])))(&box_classheader,box_VERSION)
#define box_Initialize(self) \
    (*((void (*)()) (box_CLASSPROCEDURES->routines[2])))(&box_classheader,self, box_VERSION)

#define box_Destroy(self) \
    ((* ((void (*)()) ((self)->header.box_methods->info->procs->routines[1]))) (&box_classheader, self))
#define box_Finalize(self) \
    (*((void (*)()) (box_CLASSPROCEDURES->routines[3])))(&box_classheader,self)

#define box_InitializeObject(self) \
    (*((boolean (*)()) (box_CLASSPROCEDURES->routines[5])))(&box_classheader,self)
#define box_FinalizeObject(self) \
    (*((void (*)()) (box_CLASSPROCEDURES->routines[6])))(&box_classheader,self)
#define box_InitializeClass() \
    (*((boolean (*)()) (box_CLASSPROCEDURES->routines[7])))(&box_classheader)


#endif /* !defined(box_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_box ) && !defined(class_StaticEntriesOnly)*/

