Ignore:
Timestamp:
Apr 17, 2001, 6:16:03 AM (24 years ago)
Author:
bird
Message:

Preinitial coding of SDF file format class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/kInterfaces.h

    r5531 r5534  
    1 /* $Id: kInterfaces.h,v 1.2 2001-04-17 00:26:12 bird Exp $
     1/* $Id: kInterfaces.h,v 1.3 2001-04-17 04:16:02 bird Exp $
    22 *
    33 * This headerfile contains interfaces for the common tools classes.
     
    1414
    1515
     16/*******************************************************************************
     17*   Defined Constants And Macros                                               *
     18*******************************************************************************/
     19#define MAXEXPORTNAME   256
     20#define MAXDBGNAME      256
     21
     22
     23/*******************************************************************************
     24*   Structures and Typedefs                                                    *
     25*******************************************************************************/
    1626class kPageI;
    1727class kExportI;
    1828class kExportEntry;
    1929class kModuleI;
     30class kExecutableI;
     31class kDbgTypeI;
    2032
    2133
     
    8395class kExportEntry
    8496{
    85 #define MAXEXPORTNAME 256
    8697public:
    8798    unsigned long   ulOrdinal;                  /* Ordinal of export. 0 if invalid. */
     
    170181 * Interface class (ie. virtual) which defines the interface for
    171182 * executables files.
    172  * @author      knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     183 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    173184 */
    174185class kExecutableI : public kModuleI, public kExportI
     
    183194};
    184195
     196
     197/**
     198 * Communication class/struct used by kDbgTypeI and others.
     199 * This is structure or union member class.
     200 * (This might turn out very similar to a normal variable class,
     201 *  and will if so be changed to that when time comes.)
     202 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     203 */
     204class kDbgMemberEntry
     205{
     206public:
     207    char        szName[MAXDBGNAME];     /* Member name. */
     208    char        cb;                     /* Count of bytes it covers. */
     209    char        szTypeName[MAXDBGNAME]; /* Type name. */
     210    int         flFlags;                /* Type flags. One of the kDbgTypeI::enm*. optional: defaults to kDbgTypeI::enmAny */
     211};
     212
     213
     214/**
     215 * Communication class/struct used by kDbgTypeI.
     216 * This is the type.
     217 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     218 */
     219class kDbgTypeEntry
     220{
     221public:
     222    char        szName[MAXDBGNAME];     /* Name of the type. */
     223    char        cb;                     /* Count of bytes it covers. */
     224    int         flFlags;                /* Type flags. One of the kDbgTypeI::enm*. */
     225
     226    int         cMembers;               /* Number of members. This is 0 if not a union or a struct. */
     227    kDbgMemberEntry * paMembers;        /* Pointer array of member entries if union or struct. */
     228
     229public:
     230    /** @cat Internal use only - don't mess! */
     231    int         flSearchFlags;          /* Type flags which this search was started with. One of the kDbgTypeI::enm*. */
     232};
     233
     234
     235
     236/**
     237 * Interface class (ie. virtual) which defines the interface for
     238 * debug typeinfo on debug module level.
     239 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     240 */
     241class kDbgTypeI
     242{
     243public:
     244    /** @cat Debug Type information methods. */
     245    virtual kDbgTypeEntry * dbgtypeFindFirst(int flFlags);
     246    virtual kDbgTypeEntry * dbgtypeFindNext(kDbgTypeEntry *kDbgTypeEntry);
     247    virtual void            dbgtypeFindClose(kDbgTypeEntry *kDbgTypeEntry);
     248
     249    virtual kDbgTypeEntry * dbgtypeLookup(const char *pszName, int flFlags);
     250    enum
     251    {   enmAny,                         /* Any/unknown type. */
     252        enmStruct,                      /* Structure:       struct _somestruct {..}; */
     253        enmUnion,                       /* Union:           union  _someunion  {..}; */
     254        enmEnum,                        /* Enumeration:     enum   _someenum   {..}; */
     255        enmTypedef,                     /* Type definition: typedef <type expr>     sometype; */
     256        enmMask = 0x0000000ff,          /* Type mask. */
     257        enmFlagMask = 0xffffff00,       /* Flag mask. */
     258        enmflPointer = 0x00000100       /* This is pointer to something. (flag) */
     259    };
     260};
    185261#endif
Note: See TracChangeset for help on using the changeset viewer.