home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.8 KB | 173 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLResSin.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- *
- * File: SLResSin.h
- * Release Version: $ ODF 1 $
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- *
- */
-
-
- #ifndef SOM_FW_OResourceSink_xh
- #define SOM_FW_OResourceSink_xh
-
- class FW_OResourceSink;
-
- #define FW_OResourceSink_MajorVersion 1
- #define FW_OResourceSink_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
-
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_FW_ORandomAccessSink_xh
- #include <SLRanSin.xh>
- #endif
-
- #ifndef FW_OResourceSink_API
- #define FW_OResourceSink_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_OSink;
- class FW_ORandomAccessSink;
- class FW_OResourceSink;
- class FW_OResource;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OResourceSinkCClassData FW_OResourceSinkClassData
- #define FW_OResourceSinkNewClass(major,minor) somNewVersionedClassReference(FW_OResourceSink,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OResourceSinkMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OResourceSink class object, and the methods it introduces. */
- SOMEXTERN struct FW_OResourceSinkClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken InitFromOResource;
- } SOMDLINK FW_OResourceSinkClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OResourceSink_Class_Source) && !defined(SOM_Module_slressin_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OResourceSinkClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OResourceSink Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_FW_OResourceSink_InitFromOResource)(FW_OResourceSink *somSelf, Environment *ev,
- FW_OResource* theResource);
- }
-
- #endif /* FW_OResourceSink_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_OResourceSink
- */
- class FW_OResourceSink : public FW_ORandomAccessSink
- {
- public:
-
- // FW_OResourceSink::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_OResourceSink, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OResourceSink);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OResourceSink);
- #endif
- }
-
- // FW_OResourceSink::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: InitFromOResource */
- void InitFromOResource(Environment *ev,
- FW_OResource* theResource)
- {
- SOM_ResolveD(this,FW_OResourceSink,FW_OResourceSink,InitFromOResource)
- (this,ev,theResource);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- }; /* FW_OResourceSink */
-
-
-
- #endif /* SOM_FW_OResourceSink_xh */
-