An open source computer program has been developed to satisfy a need for simplified organization of structured input data for scientific simulation programs. Typically, such input data are parsed in from a flat American Standard Code for Information Interchange (ASCII) text file into computational data structures. Also typically, when a graphical user interface (GUI) is used, there is a need to completely duplicate the input information while providing it to a user in a more structured form. Heretofore, the duplication of the input information has entailed duplication of software efforts and increases in susceptibility to software errors because of the concomitant need to maintain two independent input-handling mechanisms. The present program implements a method in which the input data for a simulation program are completely specified in an Extensible Markup Language (XML)-based text file. The key benefit for XML is storing input data in a structured manner. More importantly, XML allows not just storing of data but also describing what each of the data items are. That XML file contains information useful for rendering the data by other applications. It also then generates data structures in the C++ language that are to be used in the simulation program.

In this method, all input data are specified in one place only, and it is easy to integrate the data structures into both the simulation program and the GUI. XML-to-C is useful in two ways:

  1. As an executable, it generates the corresponding C++ classes and
  2. As a library, it automatically fills the objects with the input data values.

This program was written by Hook Hua, Fabiano Oyafuso, and Gerhard Klimeck of Caltech for NASA's Jet Propulsion Laboratory.

This software is available for commercial licensing. Please contact Don Hart of the California Institute of Technology at (818) 393- 3425. Refer to NPO-30844.



This Brief includes a Technical Support Package (TSP).
Document cover
XML-Based Generator of C++ Code for Integration with GUIs

(reference NPO-30844) is currently available for download from the TSP library.

Don't have an account?



Magazine cover
NASA Tech Briefs Magazine

This article first appeared in the September, 2003 issue of NASA Tech Briefs Magazine (Vol. 27 No. 9).

Read more articles from the archives here.


Overview

The document outlines an innovative open-source software program developed by NASA's Jet Propulsion Laboratory (JPL) to enhance the organization of structured input data for scientific simulation applications. Traditionally, input data for such simulations is parsed from flat ASCII text files into computational data structures. This process often requires duplicating the input information for graphical user interfaces (GUIs), leading to increased software development efforts and a higher likelihood of bugs due to the maintenance of two independent input-handling mechanisms.

To address these challenges, the software employs an XML-based approach, allowing all input data to be specified in a single XML text file. This file not only organizes the data in a structured manner but also describes the nature of each data item, facilitating its use in various applications. The key benefits of using XML include the ability to store and describe data effectively, which simplifies the integration of data structures into both the simulation program and the GUI.

The software operates in two primary ways: as an executable that generates corresponding C++ classes and as a library that automatically populates these objects with input data values. This dual functionality streamlines the development process, ensuring that all input data is managed in one location, thereby reducing redundancy and the potential for errors.

The program was developed by a team of inventors, including Hook Hua, Gerhard Klimeck, and Fabiano Oyafuso, and is distributed under the GNU Lesser General Public License (LGPL). It is available for commercial licensing, with inquiries directed to Don Hart at the California Institute of Technology.

Overall, this software represents a significant advancement in the field of scientific computing, providing a more efficient and reliable method for managing input data in simulation programs. By leveraging XML technology, it not only simplifies the data organization process but also enhances the integration of GUIs with C++ code, ultimately improving the usability and functionality of scientific simulation applications. The document serves as a technical support package, detailing the software's capabilities and its potential impact on the development of scientific applications.