Re: Commit: Re: Commit: metadata

From: Paul Rohr (paul@abisource.com)
Date: Tue May 14 2002 - 11:50:37 EDT

  • Next message: Dom Lachowicz: "Re: Commit: Re: Commit: metadata"

    At 11:24 AM 5/14/02 -0400, Dom Lachowicz wrote:
    >We now support the MSWord string properties that map cleanly back onto
    >our native props. CVS update Abi and wv.

    Thanks!

    I just looked at the Bonsai checkins and wanted to propose an API change. I
    suspect that there are eventually going to be a *lot* of standard properties
    that people may want to support.

    Instead of adding explicit get/set methods to PD_Document for each new one,
    why not do a slightly more abstract API as follows:

      pDoc->setMetadata(key, val)
      val = pDoc->getMetadata(key)
      
    with a bunch of #defines roughly as follows:

      #define PD_META_KEY_TITLE "title"
      #define PD_META_KEY_AUTHOR "author"

    In a world where more and more impexp code is moving to plugins, we could
    avoid a lot of API brittleness if these evolved by adding new string
    #defines instead of redefining the class methods. Plus which, this design
    allows for table-driven translation logic in impexp code, which is always
    nice.

    Does that make sense?

    Paul



    This archive was generated by hypermail 2.1.4 : Tue May 14 2002 - 11:52:45 EDT