Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Grid User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

23.4 Macros and Tools Ease Development

There are two sets of macros. One set of macros populate the XML_ENTRY_MAP structures. With these macros the most important issue is that the nesting of these has to be just right. Shown below is a set of these macros that describe an XML schema to store addresses.

Some important points to be noted:

While composing the XML_MAP using this set of macros is not hard, it is quite tedious. Just the kind of work that begs for automation. We supply a tool (xml_tool.exe, located in the bin folder of your Objective Grid installation) that automates this step. This tool takes a valid schema and generates this map, as well as some other defines that are essential, notably the unique defines and an enum.

Writing the second map, the WRITE_MAP, is a lot easier. This has no hierarchy. A sample map is shown below. Each unique id is mapped to a handler function. Internally these macros map the resolver interfaces to this handler. Each of the resolver call backs maps to a different context value when the handler is called.

Please refer to the help file discussion of eTypeRWContext for a description of the various context values.

The resolver that is used along with the macros is to be derived from IXMLRWResolver and CentryValueHolder.

23.4.1 Sample WRITE_MAP

This map is not generated by the tool. This has to be written by hand. Each handler is defined as:

XML_ENTRY_PARAM is just a wrapper around XM_ENTRY_MAP and other essential data. Refer to the help file for information on eTypeRWContext and XMLVALUE. Looking at the resolver interfaces you can easily map to one of the eTypeRWContext values.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.