[Prev][Next][Index][Thread]

# [SERVER] Extended internal data types

- Date: Sun, 27 Oct 1996 17:27:00 PST
- From:
- cc: fox@mars.org

    Adding a new type currently involves adding a new entry in the var
    type enumaration (registering it in a table), adding any new data
    items in the Var structure, adding cases to several switch
    statements, and creating a new database version.

    It would be nice if it was possible to add new types in modules and
    have all the modifications for a particular data type in one place.

    In order for modules to add new types, operations that are currently
    implemented with switch statements have to be changed to dispatch to
    some code based on the type.

    So one solution to this is to add a couple new fields to the existing
    struct Var:
      a pointer to a table of functions to define what to do in
        various cases to deal with these types
      a pointer to some extended-type-specific data.

    The database loading and saving code would need to be smarter about
    types.

    Comments?

    --Ken

- Prev: [DSA/$handle_uncaught_error]
- Next: [SERVER] Plug-in server extensions
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index