
/*
 * This file was generated by the SOM Compiler.
 * FileName: formarsh.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

/*
 *    @(#) 1.4 src/somd/comm_fw/include/formarsh.idl, somd, som3.0 12/28/95 13:23:06 [12/22/96 21:42:24]
 * 
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996
 *    All Rights Reserved
 *    Licensed Materials - Property of IBM
 *    US Government Users Restricted Rights - Use, duplication or
 *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * 
 */


#ifndef SOM_SOMDForeignMarshaler_h
#define SOM_SOMDForeignMarshaler_h


/*
 * The SOM_STRICT_IDL macro means that we can ignore stars
 * in our declarations of objects.
 */
#define SOM_STRICT_IDL 1


#include <som.h>
#ifndef SOM_IMPORTEXPORT_somdcomm_formarsh
#ifdef SOM_DLL_somdcomm
	/* export semantics */
	#if defined(SOM_DEFFILE_somdcomm)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somdcomm))\
	|| !defined(SOM_Module_formarsh_Source)
	#define SOM_IMPORTEXPORT_somdcomm_formarsh
	#else
	#define SOM_IMPORTEXPORT_somdcomm_formarsh SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somdcomm_formarsh SOMDLLIMPORT
#endif
#endif

/*
 * -- 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))

/*
 * Define the class name as an object type
 */
#ifndef SOMDForeignMarshaler
#define SOMDForeignMarshaler SOMObject
#endif
/*
 *  An abstract base class for dynamic foreign marshallers, to be
 *  subclasses by users to provide marshalling for SOMFOREIGN datatypes.
 *  The subclass name is to be specified in the "impctx" IDL modifier
 *  for the SOMFOREIGN type.
 */

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * Start of bindings for IDL types
 */

#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef Container
    #define Container SOMObject
#endif /* Container */
#ifndef ExtendedNaming_PropertyBindingIterator
    #define ExtendedNaming_PropertyBindingIterator SOMObject
#endif /* ExtendedNaming_PropertyBindingIterator */
#ifndef ExtendedNaming_PropertyIterator
    #define ExtendedNaming_PropertyIterator SOMObject
#endif /* ExtendedNaming_PropertyIterator */
#ifndef ExtendedNaming_IndexIterator
    #define ExtendedNaming_IndexIterator SOMObject
#endif /* ExtendedNaming_IndexIterator */
#ifndef SOMDObject
    #define SOMDObject SOMObject
#endif /* SOMDObject */
#ifndef Principal
    #define Principal SOMObject
#endif /* Principal */
#ifndef ImplementationDef
    #define ImplementationDef SOMObject
#endif /* ImplementationDef */
#ifndef InterfaceDef
    #define InterfaceDef SOMObject
#endif /* InterfaceDef */
#ifndef NVList
    #define NVList SOMObject
#endif /* NVList */
#ifndef Context
    #define Context SOMObject
#endif /* Context */
#ifndef Request
    #define Request SOMObject
#endif /* Request */
#ifndef CosObjectIdentity_IdentifiableObject
    #define CosObjectIdentity_IdentifiableObject SOMObject
#endif /* CosObjectIdentity_IdentifiableObject */
#ifndef CosStream_Streamable
    #define CosStream_Streamable SOMObject
#endif /* CosStream_Streamable */
#ifndef CosStream_StreamableFactory
    #define CosStream_StreamableFactory SOMObject
#endif /* CosStream_StreamableFactory */

/*
 * End of bindings for IDL types.
 */

/*
 * Passthru lines: File: "C.h", "after"
 */
#include <somdtype.h>
#include <somestio.h>


#define SOMDForeignMarshaler_MajorVersion 3
#define SOMDForeignMarshaler_MinorVersion 0

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOM_IMPORTEXPORT_somdcomm_formarsh SOMClass  SOMLINK SOMDForeignMarshalerNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct SOMDForeignMarshalerClassDataStructure {
	SOMClass classObject;
	somMToken marshal;
} SOM_IMPORTEXPORT_somdcomm_formarsh SOMDLINK SOMDForeignMarshalerClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct SOMDForeignMarshalerCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_somdcomm_formarsh SOMDLINK SOMDForeignMarshalerCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_SOMDForeignMarshaler (SOMDForeignMarshalerClassData.classObject)
#ifndef SOMGD_SOMDForeignMarshaler
    #if (defined(_SOMDForeignMarshaler) || defined(__SOMDForeignMarshaler))
        #undef _SOMDForeignMarshaler
        #undef __SOMDForeignMarshaler
        #define SOMGD_SOMDForeignMarshaler 1
    #else
        #define _SOMDForeignMarshaler _SOMCLASS_SOMDForeignMarshaler
    #endif /* _SOMDForeignMarshaler */
#endif /* SOMGD_SOMDForeignMarshaler */
#define SOMDForeignMarshaler_classObj _SOMCLASS_SOMDForeignMarshaler
#define _SOMMTOKEN_SOMDForeignMarshaler(method) ((somMToken)SOMDForeignMarshalerClassData.method)

/*
 * New and Renew macros for SOMDForeignMarshaler
 */
#define SOMDForeignMarshalerNew() \
   ( _SOMDForeignMarshaler ? \
	_somNew(_SOMDForeignMarshaler) \
	: ( SOMDForeignMarshalerNewClass(\
		SOMDForeignMarshaler_MajorVersion, \
		SOMDForeignMarshaler_MinorVersion),\
	   _somNew(_SOMDForeignMarshaler)))
#define SOMDForeignMarshalerRenew(buf) \
   ( _SOMDForeignMarshaler ? \
	_somRenew(_SOMDForeignMarshaler, buf) \
	: ( SOMDForeignMarshalerNewClass(\
		SOMDForeignMarshaler_MajorVersion, \
		SOMDForeignMarshaler_MinorVersion),\
	   _somRenew(_SOMDForeignMarshaler, buf)))

/*
 * New Method: marshal
 */
typedef void   SOMLINK somTP_SOMDForeignMarshaler_marshal(SOMDForeignMarshaler somSelf, Environment *ev, 
		string latent_param, 
		somToken dataPtr, 
		SOMD_marshaling_direction_t direction, 
		SOMD_marshaling_op_t function, 
		CosStream_StreamIO streamio);
typedef somTP_SOMDForeignMarshaler_marshal *somTD_SOMDForeignMarshaler_marshal;
/*
 *  This method is to be overriden by subclasses to provide a
 *  marshalling function for some SOMFOREIGN datatype.
 *  The default implementation returns a NO_IMPLEMENT error.
 *  The latent_param parameter is passed by DSOM to the marshal method;
 *  its value can designate to the marshal method which SOMFOREIGN
 *  type is to be marshaled, as specified in the "impctx" IDL
 *  modifier for the SOMFOREIGN type.
 *  The dataPtr parameter is the foreign data to be marshalled.
 *  The direction parameter indicates whether the data is to be
 *  marshalled, demarshalled, or freed.
 *  The streamio parameter is a StreamIO object to/from which the
 *  foreign data is to be marshalled/demarshalled.
 */
#define somMD_SOMDForeignMarshaler_marshal "::SOMDForeignMarshaler::marshal"
#define SOMDForeignMarshaler_marshal(somSelf,ev,latent_param,dataPtr,direction,function,streamio) \
    (SOM_Resolve(somSelf, SOMDForeignMarshaler, marshal) \
	(somSelf,ev,latent_param,dataPtr,direction,function,streamio))
#ifndef SOMGD_marshal
    #if (defined(_marshal) || defined(__marshal))
        #undef _marshal
        #undef __marshal
        #define SOMGD_marshal 1
    #else
        #define _marshal SOMDForeignMarshaler_marshal
    #endif /* _marshal */
#endif /* SOMGD_marshal */

/*
 * Full Names for Inherited Methods
 */

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define SOMDForeignMarshaler_somDefaultInit SOMObject_somDefaultInit
#define SOMDForeignMarshaler_somDestruct SOMObject_somDestruct
#define SOMDForeignMarshaler_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define SOMDForeignMarshaler_somDefaultAssign SOMObject_somDefaultAssign
#define SOMDForeignMarshaler_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define SOMDForeignMarshaler_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define SOMDForeignMarshaler_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define SOMDForeignMarshaler_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define SOMDForeignMarshaler_somDefaultVAssign SOMObject_somDefaultVAssign
#define SOMDForeignMarshaler_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define SOMDForeignMarshaler_somInit SOMObject_somInit
#define SOMDForeignMarshaler_somUninit SOMObject_somUninit
#define SOMDForeignMarshaler_somFree SOMObject_somFree
#define SOMDForeignMarshaler_somGetClass SOMObject_somGetClass
#define SOMDForeignMarshaler_somGetClassName SOMObject_somGetClassName
#define SOMDForeignMarshaler_somGetSize SOMObject_somGetSize
#define SOMDForeignMarshaler_somIsA SOMObject_somIsA
#define SOMDForeignMarshaler_somIsInstanceOf SOMObject_somIsInstanceOf
#define SOMDForeignMarshaler_somRespondsTo SOMObject_somRespondsTo
#define SOMDForeignMarshaler_somDispatch SOMObject_somDispatch
#define SOMDForeignMarshaler_somClassDispatch SOMObject_somClassDispatch
#define SOMDForeignMarshaler_somCastObj SOMObject_somCastObj
#define SOMDForeignMarshaler_somResetObj SOMObject_somResetObj
#define SOMDForeignMarshaler_somPrintSelf SOMObject_somPrintSelf
#define SOMDForeignMarshaler_somDumpSelf SOMObject_somDumpSelf
#define SOMDForeignMarshaler_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_SOMDForeignMarshaler_h */
