Work

Object Oriented C++ Software Components for Accelerator Design *

Year: 1999
Type: article
Abstract: Object oriented programming techniques make it possible for accelerator designers to independently develop C++ software components that can work together. As an example of this approach, we discuss some of the software components being developed at Tech-X Corporation, including: TxSTD, a library of standard utilities [1]; TxID, a library of data-holding and nonlinear dynamics classes [2]; TxAC, an accelerator modeling class library [3]; an X/Motif library used in the MAPA application [4] for interactive visualisation of dynamical systems such as particle accelerators; TxAN, a library of analysis and simulation classes relevant to dynamical systems; and the LION++ nonlinear optimization library [5]. 1 OBJECT-ORIENTED PROGRAMMING The computer software industry has been rapidly moving towards the use of object oriented programming (OOP) [Ref.'s 6-10]. OOP provides a superior mechanism for rapid development and testing, as well as ease of maintenance and extensibility for large scientific codes. OOP consists of designing classes, where a class is a format for holding and interacting with data. An object is a particular instance of a class, just as 3.1 is a particular instance of a real number. Each object has its own data, while all objects of a given class share the same functions (called methods). A program is constructed by first defining the classes. The program instantiates objects corresponding to the classes and, by calling the public methods of these objects, manipulates or displays the data. The public methods of a class define its interface. The three defining properties of OOP are encapsulation, inheritance and polymorphism. Encapsulation refers to the fact that objects are accessed only through a public interface, while their internal data and implementations remain hidden. This feature ensures that the code is safe from unwanted modifications. Inheritance allows the programmer to define new classes that inherit most of their coding from existing classes, only modifying or adding data and methods as needed. This allows for flexibility to increase the capability of an application in ways not foreseen by the original programmers, without rewriting the code. Polymorphism allows different
Language: English
Open Access status: green
OpenAlex ID: W2138229475
FWCI:
Cites: 9
Cited by: 2
Related to: 10