mi32/rvcparms.h

Go to the documentation of this file.
00001 /**
00002  * \file rvcparms.h <mi32/rvcparms.h>
00003  * \brief 
00004  *
00005  * Functions for saving/loading structures in the style of dispwsl.c, but
00006  * much simpler.  Currently used for OTYPE_DBPARM.  Objects of this type are
00007  * based on OTYPE_TEXT with no changes to the structure.
00008  *
00009  * \if NODOC
00010  * $Id: rvcparms.h_v 1.17 2003/10/15 17:39:23 mju Exp $
00011  *
00012  * $Log: rvcparms.h_v $
00013  * Revision 1.17  2003/10/15 17:39:23  mju
00014  * Deprecate groupkey.
00015  *
00016  * Revision 1.16  2003/09/15 13:49:56  fileserver!dwilliss
00017  * Doxygen
00018  *
00019  * Revision 1.15  2002/08/20 14:43:51  mju
00020  * Use prevent_memfunc on header.
00021  *
00022  * Revision 1.14  2002/03/08 18:20:02  scowan
00023  * Added clear and ctors and deprecated mem... functions.
00024  *
00025  * Revision 1.13  2001/09/14 14:58:22  mju
00026  * No Mdlg in win32native.
00027  *
00028  * Revision 1.12  2000/12/15 15:36:19  msmith
00029  * Genitor documentation.
00030  *
00031  * Revision 1.11  2000/03/29 03:27:37  scowan
00032  * Added assignment operators.
00033  *
00034  * Revision 1.10  1999/11/19 14:20:45  mju
00035  * Use const for MdlgGet... prompt.
00036  *
00037  * Revision 1.9  1999/10/05  22:47:23  scowan
00038  * Changed header to use inheritance.
00039  *
00040  * Revision 1.8  1999/06/11 15:23:09  mju
00041  * Obj sel dlg.
00042  *
00043  * Revision 1.7  1999/05/07  21:23:18  mju
00044  * Header restruct.
00045  *
00046  * Revision 1.6  1999/04/08  19:10:12  mju
00047  * Add inclusion guards.
00048  *
00049  * Revision 1.5  1999/01/05  19:12:31  scowan
00050  * Swapped multiple keywords
00051  *
00052  * Revision 1.4  1996/12/20 16:37:34  coffee!dwilliss
00053  * Added __cplusplus things
00054  *
00055  * Revision 1.1  1995/12/12  16:57:19  coffee!dwilliss
00056  * Initial revision
00057  * \endif
00058 **/
00059 
00060 #ifndef INC_MI32_RVCPARMS_H
00061 #define INC_MI32_RVCPARMS_H
00062 
00063 #ifndef  INC_MI32_RVCDEFNS_H
00064    #include <mi32/rvcdefns.h>
00065 #endif
00066 
00067 #ifndef  INC_MI32_RVCTEXT_H
00068    #include <mi32/rvctext.h>
00069 #endif
00070 
00071 #ifndef  INC_MI32_MISTRUCT_H
00072    #include <mi32/mistruct.h>
00073 #endif
00074 
00075 //! Parameter header structure.
00076 struct RVCPARMINFO : public RVCTEXTINFO {
00077    UINT16 usage;
00078    UINT16 version;
00079    UINT32 forobjtype;
00080    
00081    RVCPARMINFO (
00082       ) {Clear();}
00083    
00084    RVCPARMINFO (
00085       const RVCGENINFO& ginfo
00086       ) {Clear();*static_cast<RVCGENINFO*>(this) = ginfo;}
00087    
00088    //! Assignment operator
00089    RVCPARMINFO& operator= (
00090       const RVCGENINFO& ginfo          //!< RVCGENINFO structure to copy from
00091       ) {*static_cast<RVCGENINFO*>(this) = ginfo; return (*this);}
00092       
00093    void Clear (
00094       ) {memset(static_cast<void*>(this), 0, sizeof(*this));}
00095    
00096    };
00097 typedef RVCPARMINFO RVCDPARMINFO;
00098 
00099 PREVENT_MEMFUNC(RVCPARMINFO);
00100 
00101 #define  DPARMUSAGE_Display         0
00102 #define  DPARMUSAGE_Edit            1
00103 #define  DPARMUSAGE_NumericOutput   2
00104 #define  DPARMUSAGE_Surface         3
00105 #define  DPARMUSAGE_Unspecified     99
00106 
00107 //! Read parameter header.
00108 inline int MfReadDispParmHeader (
00109    int fhandle,                        //!< Open file handle
00110    RVCINODENUM inode,                  //!< Parameter object inode
00111    RVCPARMINFO* info                   //!< Parameter header passed / returned
00112    ) {
00113    return (_MfReadHeader(fhandle,inode,info,sizeof(RVCDPARMINFO),RVCCONV_DispParm));
00114    }
00115 
00116 //! Write parameter header.
00117 inline int MfWriteDispParmHeader (
00118    int fhandle,                        //!< Open file handle
00119    RVCINODENUM inode,                  //!< Parameter object inode
00120    RVCPARMINFO* info                   //!< Parameter header to write
00121    ) {
00122    return (_MfWriteHeader(fhandle,inode,info,sizeof(RVCDPARMINFO),RVCCONV_DispParm));
00123    }
00124 
00125 #if (defined(X_NATIVE) || defined(WIN32_MFC)) && !defined(DEPRECATE_GROUPKEY)
00126 
00127 //! Pop-up dialog allowing user to select a display group layout object.
00128 inline int MdlgGetDispGroupObject (
00129    MDLGPARENT dlgparent,               //!< Parent widget
00130    UNICODE *filename,                  //!< Default filename
00131    INT32 *inode,                       //!< Display group object inode passed/returned
00132    const void *prompt,                 //!< Prompt label
00133    RVCDPARMINFO *objinfo,              //!< Object header passed/returned
00134    MfFiltFuncProto filter=0,           //!< Filter function
00135    void *filtuserdata=0,               //!< Filter function data
00136    GETOBJFLAGS flags=GETOBJFLAG_None   //!< Get object flags (See rvcdefns.h)
00137    ) {
00138    return (MdlgGetObject(dlgparent,filename,inode,prompt,OTYPE_DISP_GROUP,RVCCONV_DispParm,objinfo,sizeof(RVCDPARMINFO),filter,filtuserdata,flags));
00139    }
00140 
00141 //! Pop-up dialog allowing user to select a display layout object.
00142 inline int MdlgGetDispLayoutObject (
00143    MDLGPARENT dlgparent,               //!< Parent widget
00144    UNICODE *filename,                  //!< Default filename
00145    INT32 *inode,                       //!< Display  object inode passed/returned
00146    const void *prompt,                 //!< Prompt label
00147    RVCDPARMINFO *objinfo,              //!< Object header passed/returned
00148    MfFiltFuncProto filter=0,           //!< Filter function
00149    void *filtuserdata=0,               //!< Filter function data
00150    GETOBJFLAGS flags=GETOBJFLAG_None   //!< Get object flags (See rvcdefns.h)
00151    ) {
00152    return (MdlgGetObject(dlgparent,filename,inode,prompt,OTYPE_DISP_LAYOUT,RVCCONV_DispParm,objinfo,sizeof(RVCDPARMINFO),filter,filtuserdata,flags));
00153    }
00154 
00155 //! Pop-up dialog allowing user to select a display 3D simulation parameters object.
00156 inline int MdlgGetDispSim3dObject (
00157    MDLGPARENT dlgparent,               //!< Parent widget
00158    UNICODE *filename,                  //!< Default filename
00159    INT32 *inode,                       //!< Display 3D simulation parameters object inode passed/returned
00160    const void *prompt,                 //!< Prompt label
00161    RVCDPARMINFO *objinfo,              //!< Object header passed/returned
00162    MfFiltFuncProto filter=0,           //!< Filter function
00163    void *filtuserdata=0,               //!< Filter function data
00164    GETOBJFLAGS flags=GETOBJFLAG_None   //!< Get object flags (See rvcdefns.h)
00165    ) {
00166    return (MdlgGetObject(dlgparent,filename,inode,prompt,OTYPE_DISP_SIM3D,RVCCONV_DispParm,objinfo,sizeof(RVCDPARMINFO),filter,filtuserdata,flags));
00167    }
00168 
00169 #endif   //!< X_NATIVE || WIN32_MFC
00170 
00171 extern "C" {
00172    //! Read the object.
00173    int MfReadParms (
00174       int handle,                      //!< Object handle
00175       MISTRUCTDATA *kwdata,            //!< Reading parameters
00176       void *data,                      //!< Data structure to fill in
00177       UINT32 flags                     //!< Flags
00178       );
00179 
00180    //! Write the object.
00181    int MfWriteParms (
00182       int handle,                      //!< Object handle
00183       MISTRUCTDATA *kwdata,            //!< Writing parameters
00184       void *data,                      //!< Data structure to write
00185       UINT32 flags                     //!< Flags
00186       );
00187 
00188    //! Close the object
00189    int MfCloseParms (
00190       int id,                          //!< Object handle
00191       RVCPARMINFO *info                //!< Structure 
00192       );
00193 
00194    //! Open the object and make sure it's the right OTYPE of this.
00195    int MfOpenParms (
00196       int fid,                         //!< Open file handle
00197       INT32 inode,                     //!< Object inode
00198       RVCPARMINFO *info,               //!< RVCPARMINFO structure to fill in
00199       UINT32 flags                     //!< Flags
00200       );
00201 
00202    //! Create the object and make sure it's the right OTYPE of this.
00203    int MfMakeParms (
00204       int fid,                         //!< Open file handle
00205       RVCPARMINFO *info,               //!< RVCPARMINFO structure to write from
00206       UINT32 flags                     //!< Flags
00207       );
00208    }
00209 
00210 #endif

Generated on Thu Aug 12 06:19:06 2004 for TNTsdk by doxygen 1.3.4-20031026