home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.8 KB | 175 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLMemSin.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * File: SLMemSin.idl
- *
- * Contains: Interface for the memory sink class
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- */
-
-
- #ifndef SOM_FW_OMemorySink_xh
- #define SOM_FW_OMemorySink_xh
-
- class FW_OMemorySink;
-
- #define FW_OMemorySink_MajorVersion 1
- #define FW_OMemorySink_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_OMemorySink_API
- #define FW_OMemorySink_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_OSink;
- class FW_ORandomAccessSink;
- class FW_OMemorySink;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OMemorySinkCClassData FW_OMemorySinkClassData
- #define FW_OMemorySinkNewClass(major,minor) somNewVersionedClassReference(FW_OMemorySink,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OMemorySinkMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OMemorySink class object, and the methods it introduces. */
- SOMEXTERN struct FW_OMemorySinkClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken InitFromBuffer;
- } SOMDLINK FW_OMemorySinkClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OMemorySink_Class_Source) && !defined(SOM_Module_slmemsin_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OMemorySinkClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OMemorySink Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_FW_OMemorySink_InitFromBuffer)(FW_OMemorySink *somSelf, Environment *ev,
- void* buffer,
- long capacity,
- long length);
- }
-
- #endif /* FW_OMemorySink_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_OMemorySink
- */
- class FW_OMemorySink : public FW_ORandomAccessSink
- {
- public:
-
- // FW_OMemorySink::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_OMemorySink, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OMemorySink);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OMemorySink);
- #endif
- }
-
- // FW_OMemorySink::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: InitFromBuffer */
- void InitFromBuffer(Environment *ev,
- void* buffer,
- long capacity,
- long length)
- {
- SOM_ResolveD(this,FW_OMemorySink,FW_OMemorySink,InitFromBuffer)
- (this,ev,buffer,capacity,length);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- }; /* FW_OMemorySink */
-
-
-
- #endif /* SOM_FW_OMemorySink_xh */
-