As mentioned previously, OpenCP is structured around the concept of a content database. The content database is constructed during the content build process for a specific project and target platform combination. It maintains four different types of records:

  • Source File Records
  • Target File Records
  • Source Content Records
  • Target Asset Records
  • Source content records are constructed by the build tool at the beginning of a build; source file records, target asset records and target file records are created by content conditioners during the build process. Links between the records are also constructed during the content build process. For example, a source content record maintains references to the source files used as input and the target assets produced as output. The content database allows an application to ask the following questions:

  • What is the set of source content that is part of this project?
  • What source files are referenced by a specific piece of source content?
  • What source content does a specific piece of source content reference?
  • What source content references a specific piece of source content?
  • What target assets are derived from a specific piece of source content?
  • What target files are associated with a specific target asset?
  • What are the dependencies and references between target assets?
  • What pieces of source content is a specific target file derived from?
  • Does a piece of source content need to be rebuilt?
  • And so on…
  • Maintaining the links between records can be a bit tricky, so OpenCP attempts to simplify the process. An application can query the content database for source content and target content by name or index, and can query for source and target file references by path or by index.

    The nice thing about OpenCP is that it makes this information available to any application that wishes to use it. The OpenCP library includes a .NET implementation; a C/C++ implementation is coming soon.

    Leave a Reply

    You must be logged in to post a comment. Login »