The PIRL++ library contains C++ classes designed to enable capabilities used in support of a wide range of applications.
The Binary_IO class provides input and output of binary data values. The data may optionally be reversed to handle byte ordering differences between the host system that writes the binary data and the host system that reads it.
The Cache provides a dynamic input storage area that can be bound to an input stream which will be used for automatic data refills to get user data as needed. User data may also be put into the Cache which will inflate as needed. In addition to the conventional managed buffer operation, a Cache may have a data margin that specifies the minimum amount of data to be retained when the user space is drained. This mechanism is employed when a function is supplied to test for a logical end-of-data condition in the input stream.
A Data_Block manages access to a block of binary data bytes with a user defined data structure. The data may be in non-native order, in which case data transfers between the data block and application variables will reverse the byte order. The memory holding the binary block of data is managed by the user, not the Data_Block. The same block of data may be shared by more than one Data_Block object to provide different "views" of the data structure. The Data_Block is not a substitute for a struct; it offers special capabilities: byte order independence, byte alignment independence, dynamic structure definition, multiple data views, and data memory independence.
A set of functions, and function templates, for testing and manipulating data byte ordering.
A set of convenience functions for manipulating file pathnames. Access to the host system name is also provided.
Associates a pointer with a reference counter for shared use of pointer referenced objects on the heap. Multiple Reference_Counted_Pointers using the same reference can be destroyed with the referenced object only being deleted when all shared references to the object have been destroyed.
These classes were developed at the Planetary Image Research Laborary, Department of Planetary Science, University of Arizona, Tucson, Arizona.
The PIRL++ source code is availabale from the PIRL software distribution site.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.