***********************************************************************
Step Class Library v0.1 -- https://github.com/mpictor/StepClassLibrary

* What is SCL? SCL reads ISO10303-11 EXPRESS schemas and generates
  C++ source code that can read and write Part 21 files conforming 
  to that schema. SCL could also work with ObjectStore, CORBA IDL, 
  and C - but to my knowledge, that code has not been exercised in 
  a very long time. Some of the ObjectStore code has been removed,
  and CORBA may follow it if there is no interest.
 
* SCL is packaged along with some other tools. See 
  "THE NIST STEP TOOLSET", below. In particular, Data Probe
  requires InterViews, an obsolete UI toolkit. A version of it is
  still present in the git repository, but I have not had luck
  building the data probe with it. It may be more productive
  to replace InterViews with a modern toolkit such as Qt. I
  expect that this would be non-trivial.

* Much of the work to update SCL has been done by the developers of
  BRL-CAD, and SCL was originally created at NIST in the 90's.

* Build system uses only CMake now: configure, Makefile, and all
  autotools files have been removed, as has mkProbe.
  
* To build:
  cd scl
  mkdir build
  cd build
  cmake ..
  make
  
* Build options (append to the 'cmake ..' line):
  -DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp" 
    - this generates c++ for the schema, and compiles it into a
      library. Also works with directories, as long as each dir only
      has one express file.
    - multiple files/directories are separated by semicolons
    - this also builds a 'p21read' program, which reads one step file
      and writes another. It may change whitespace or remove comments;
      otherwise, the input and output files should be identical. If
      they are not identical, either the file does not match the
      schema, or SCL generated incorrect source code.
  -DDISABLE_P21READ=TRUE
    - disable p21read. probably not a useful option.
  -DCMAKE_BUILD_TYPE=Release
    - this causes binaries to be built without debugging information
    - without this, cmake defaults to a Debug build

***********************************************************************

***********************************************************************
CODING STANDARDS

SCL's source has been reformatted with astyle. When making changes, try
to match the current formatting. The main points are:

  - compact (java-style) brackets:
        if( a == 3 ) {
            c = 5;
            function( a, b );
        } else {
            somefunc( );
        }
  - indents are 4 spaces
  - no tab characters
  - line endings are LF (linux), not CRLF (windows)
  - brackets around single-line conditionals
  - spaces inside parentheses and around operators

If in doubt about a large patch, run astyle with the config file
misc/astyle.cfg. 
Download astyle from http://sourceforge.net/projects/astyle/files/astyle/

***********************************************************************


***********************************************************************
Notes/TODO items specific to the STEP libraries as included in BRL-CAD:

* Original build system has been replaced with Makefile.am and
  configure.ac files in the style of BRL-CAD's autotools build
  system.

* Changes have been made to src/express to get it compiling with
  the output of different versions of lex/flex/bison.  These
  changes are not yet tested in terms of impact on functionality
  and should be a starting point for any debugging of EXPRESS
  parsing issues.

* None of the original test codes have been incorporated into the
  new build system, but they are still present in src/test

* Express and exppp header files have been relocated to subdirectories
  in include.  The names of the library files being built have been
  altered, and clstepcore and cleditor now build as separate libraries.

* Numerous minor changes have been made, mostly including stdlib
  and other required files.

***********************************************************************


=====================================================
Much has changed since README.scl was written.
It is reproduced in its entirety below.
=====================================================

README.scl (top level README) February 1998

THE NIST STEP TOOLSET
=====================

Included in this release of the NIST STEP Toolset are 

	STEP Class Library (SCL)
	fedex_plus
	fedex_idl
	fedex_os
	Data Probe application
	Part 21 Reader application
	mkProbe script
	NIST EXPRESS Toolkit
	NIST EXPRESS Pretty Printing Toolkit

The focus of our work since our last release has been on developing a
reference implementation of the binding of EXPRESS to C++ and IDL as
specified by STEP's Parts 23 and 26 respectively.  To this we have
added a persistence capability (based on the ObjectStore OODB from
Object Design, Inc) and a distribution capability (based on Orbix by
Iona Technologies, Ltd).  We also experimented with the Open OODB from
Texas Instruments and with DSOM from IBM.

The STEP Class Library (SCL) and fedex_plus are used to build
STEP-related applications in C++.  They support STEP Parts 21 (the
exchange file format), 22 (the functional specification of STEP's
Standard Data Access Interface, SDAI), 23 (the C++ binding to SDAI),
and 26 (the IDL interface to SDAI).  fedex_plus is an application of
the NIST EXPRESS Toolkit (based on STEP Part 11) which generates a C++
class library representation of an EXPRESS schema based on STEP's Part
23.  The generated classes work with the STEP Class Library.  The NIST
EXPRESS Pretty Printing Toolkit is used to format and output EXPRESS.
fedex_os is used to generate software (in addition to fedex_plus)
needed to use SCL with the ObjectStore OODB. fedex_idl translates
EXPRESS to the Interface Definition Language (according to Part 26) 
for use with Orbix.

The Data Probe software and mkProbe script are used to generate
schema-specific class libraries (a.k.a. "Schema Class Library"), Data
Probe editors, and Part 21 file readers.  mkProbe generates a C++
library representing a schema (using fedex_plus) and links the schema
library with other libraries of the SCL and Data Probe to create a
schema specific editor, known as a Data Probe.  The Data Probe is a
graphical editor for STEP data; it is used to browse and edit data
instances of the objects in an EXPRESS model.  It may also be used to
visually browse the objects contained in the EXPRESS schema itself.
Data Probes are X Windows-based and use the InterViews Toolkit from
Stanford University.

The Data Probe source code was designed with reusability in mind.  The
runtime-code uses three class libraries: the STEP Class Library
(developed at NIST), the InterViews Toolkit (user interface
developer's toolkit from Stanford), and a standard C++ Class Library.
The NIST STEP Class Library is divided into component libraries
including STEP Core, Editor, Utilities, Data Access Interface,
Interviews extensions, and Probe.  The STEP Core, Editor, and Utils
libraries can be used without the user interface libraries (Interviews
extensions and Probe) for applications needing to represent the
EXPRESS data structures.  At this point the Data Access Interface is a
partial implementation of SDAI's Session schema.

Dependencies between these modules have been minimized so that an
executable program, the Data Probe, can be easily reconfigured to
support different conceptual schemas.

We have experimented with replacing the Interviews-based interface
with a tcl interface with good success; however, it is not in our work
plan to complete.  If anyone is interested in extending the toolkit
with a more modern interface, we would be glad to discuss it with you.

The Part 21 Reader was originally developed to test whether a Schema
Class built and linked without problems.  It is also useful for
checking Part 21 files.  It displays the error messages from the STEP
Class Library as a file is read.


SYSTEM REQUIREMENTS
===================

Depending on how you want to use the toolkit, additional pieces of
software will need to be available on your local system:

  - UNIX SunOS 4.1.x or Solaris 5.x operating system.
        At NIST, the SCL including the Data Probe has been built on
        SunOS workstations.  The SCL without the Data Probe has been
        built on Solaris.  (We did not build the InterViews Library
        on Solaris.)  NOTE: earlier versions of the SCL 2.1 without
        the Data Probe had been ported to AIX, HP, linux, and Windows NT.

  - a C++ compiler -- cfront version 2.1 or higher

	NOTE: The current SCL release has been built with SUN C/C++,
	and GNU's gcc/g++ compilers.  Earlier versions of the SCL were
	built using CenterLine on SunOS and CSet++ on AIX.

	If you successfully port the current version to other
	compilers and/or operating systems (and are willing to share)
	please contact us (stepcl@cme.nist.gov) so that we can point
        others to it.

  - The NIST EXPRESS Toolkit -- available from NIST
	Included in this release; also available as:
	ftp.cme.nist.gov:pub/step/npttools/exptk.tar.Z

  - The NIST EXPRESS Pretty Printer -- available from NIST
	Included in this release; also available as:
	ftp.cme.nist.gov:pub/step/npttools/exppp.tar.Z

The following components are optional:

  - Version 3.1 of the InterViews Toolkit from Stanford.  
	ftp://interviews.stanford.edu:pub/3.1.tar.Z

        NOTE: InterViews is only needed for the Data Probe portion of
	the toolkit.  The STEP Class Library without the Data Probe
	and InterViews has been built on more platforms than with these
	components.

  - Orbix version 2.0.  Available from Iona Technologies:
http://www.iona.com 

  - Object Store version 4.  Available from Object Design Inc.:
http://www.odi.com. 


INSTALLATION INSTRUCTIONS
=========================

Refer to the file INSTALL.  

In the instructions below, you will see references to the directory
<ARCH_DIR>.  This directory name should be interpreted as the directory
which is named to reflect your compiler and/or system architecture
when installing the SCL using configure: i.e. "arch.centerline" or
"arch-gnu.solaris"


CREATING A NEW SCHEMA CLASS LIBRARY AND/OR DATA PROBE
=====================================================

The <ARCH_DIR>/bin/mkProbe script automates the process of building
new Schema Class Libraries and Data Probe executables.  When run with
the -l option only the Schema Class Library will be created.  See man
page in ~scl/man.

Examples
					
     Input command line			output (name and location)
     ----------------------------------------------------
     mkProbe part41.exp pt41		./pt41/dp_pt41

     mkProbe -i part101.exp dp          ~scl/<ARCH_DIR>/Probes/dp/dp_dp

     mkProbe -l example.exp example	./example/libCexample.a

     mkProbe -p example.exp example	./example/p21read_example


CONTENTS
========

This directory contains the following files and subdirectories.  

This software release includes all the NIST software needed for
creating new versions of the Data Probe program.  Two example schemas
are included in the data directory.

INSTALL 	- File discussing installation of SCL.

README.scl	- This file.

src/test/README	- README discussing SCL coding examples under src/test/

disclaim.txt	- NIST disclaimer for this distribution.

build-apps.txt	- Discusses how to build applications using the STEP
		  Class Library.

whatsnew.3-1.txt- Discusses new features in the STEP Class Library and
		  Data Probe 3.1 release.

whatsnew.2-1.txt- This was the `whatsnew' file released with SCL 2.1.
		  Most of the information is still relevant.

configure	- Script used to install the SCL.

configure.in	- File used to create the configure script using gnu's
		  autoconf software.

configure.files_notes.txt - Discusses various files used by the
		  configure script.

Makefile        - Contains a default rule to build SCL using the
		  configure installation script.

<ARCH_DIR>/bin/mkProbe - Script used to generate a new Schema Class Library
		  and/or Data Probe executable.
		  (see CREATING A NEW SCHEMA CLASS LIBRARY AND/OR DATA PROBE)

config/		- Directory containing various templates needed by the
		  configure installation script.

config/examples/ - Directory containing examples of using configure to
		  install SCL.

arch_template/	- Directory containing templates used by configure to
		  create an architecture specific SCL installation.

src/		- Source code files for the C++ libraries included in this 
		  release.

src/cl*		- Directories containing the source code for the C++
		  libraries in the STEP Class Library.  These
		  libraries are documented in the VTS Design document
		  (see DOCUMENTATION below). They are as follows:

	src/clutils	- utilities needed by the other libraries.

	src/clstepcore	- "core" classes representing EXPRESS types
			  and dictionary info.

	src/cldai       - classes for a partial implementation of the
			  Session schema of STEP's Standard Data
			  Access Interface (STEP Part 23). 

	src/cleditor	- classes for managing data instances and 
			  exchange files.

	src/clivfasd	- customizations to the Interviews class
			  library.

	src/clprobe-ui	- user interface classes for the Data Probe.

	src/clSchemas 	- Contain subdirectories with schema specific source
			  code generated by the mkProbe script.

src/express	- Directory containing the EXPRESS Toolkit.

src/exppp	- Directory containing EXPRESS Pretty Printer Toolkit.

src/test	- Directory containing example STEP Class Library 
		  applications.

src/fedex_plus	- Directory containing source code and makefile for 
		  fedex_plus, fedex_idl, fedex_os

<ARCH_DIR>

		- <ARCH_DIR> is the installer-supplied name of the 
		  directory which is created when you run configure to
		  install SCL. (See the file INSTALL for more
		  information.)  This directory contains computer
		  architecture-specific files. Additional arch dirs
		  may be created to support multiple platforms or C++
		  compilers which all refer to the same source
		  code under src/. The arch dir contains the subdirectories
		  ofiles, bin, lib, and Probes.

<ARCH_DIR>/ofiles/ - Directory containing object (.o) files for SCL.

<ARCH_DIR>/ofiles/sdaiOrbix - Directory containing IDL files and
		  Makefile needed to build and use SCL with Orbix.

<ARCH_DIR>/lib/	- Directory containing library (.a) files for SCL.

<ARCH_DIR>/Probes/  - The <ARCH_DIR>/Probes directory will contain
		  directories for versions of the Schema Class Library
		  and Data Probe generated using the mkProbe script
		  with the -i option. 

<ARCH_DIR>/bin/	- The fedex, fedex_plus, fedex_idl, and fedex_os,
		  exppp, and symlink executables and mkProbe,
		  sclbuild, and setup-arch scripts are placed in this
		  directory during installation.

data/		- Directory containing sample EXPRESS files to use to
		  create SCL applications such as the Data Probe or
		  Part 21 Reader.  Also contains data for some of the
		  examples. 

bin/		- Directory containing various scripts.

man/ 		- Directory containing man pages for the software in
		  the release.  You may look at the man page by
		  issuing the command: nroff -man <manpagefile> or by
		  adding this directory to your MANPATH.


EXAMPLES
========

Example of creating a Data Probe
--------------------------------

To create a new version of the Data Probe run the script mkProbe.  For
example, to create a Data Probe based on the "example_schema" EXPRESS
schema included in this release, issue the following command in a
directory from which you would like a subdirectory containing the new
Data Probe to be created:

% mkProbe ~scl/data/example/example.exp example

This command creates a new version of the Data Probe in the file:

% ./example/dp_example

(It also creates subdirectory example/ if it does not exist already.)


Examples of using the STEP Class Library
----------------------------------------

To use the Schema Class Library source code (without the Data Probe
software) refer to the examples in the directory src/test.

Example of a Part 21 file reader
--------------------------------

To create a file reader based on STEP's Part 21 format use the mkProbe
script with the -p option.

% mkProbe -p ~scl/data/example/example.exp example

The executable p21read_example is created.  Run it as follows:

% p21read_example your_part_21_file

This program reads a file the name of which is supplied as an
argument to the program.  Any errors encountered when reading the file
are reported to standard output.  A summary of the file is also
reported.  The file is then written back out to a file the name of
which may be supplied as the second argument to the program.  If no
name is given, "file.out" is used. 


FOR MORE INFORMATION
====================

SCL HOME PAGE
-------------

The SCL home page is located on the world wide web at,

http://www.nist.gov/scl

The SCL home page will provide important, up-to-date information on
the status of the SCL, new developments and fixes, links to related
software and projects, and may eventually contain an FAQ sheet.

SCL DOCUMENTATION
-----------------

Documentation can be accessed from the SCL world wide web home page
located at http://www.nist.gov/scl 
The following files (in postscript format) are particularly relevant:

Design of a C++ Software Library for Implementing EXPRESS: The NIST
	STEP Class Library

Data Probe User's Guide

Data Probe: A Tool for EXPRESS-based Data

Architecture for the Validation Testing System Software

Validation Testing System Software Reusable Software Component Design

Diagrams of basic SCL data structures


ISO DOCUMENTATION
-----------------

Copies of the International Standard documents (including STEP Part 11
the EXPRESS Language Reference Manual, Part 21 the STEP Exchange File
Format, Part 22 STEP's Standard Data Access Interface, and Part 23 the
C++ language binding to SDAI) can be ordered from the ISO
International Organization of Standardization or your national
body. The United States distribution is managed by the US Product Data
Exchange Association at:

U.S. Product Data Association  (USPro)
Trident Research Center, Suite 204
5300 International Blvd.
N. Charleston, SC 29418

http://www.uspro.scra.org
uspro@scra.org
Ph: 803-760-3327
FAX: 803-760-3349

MAILING LIST
------------

Announcements of new releases or bug fixes will also be sent to the
mailing list scl@cme.nist.gov.  To be added to the scl mailing list
send a request to majordomo@cme.nist.gov.  Include in the body of the
message:

	subscribe scl

For additional help, include in the body of the message:

	help

If you use a signature within your email, end your majordomo
command sequence with the word "end".  For example,

	subscribe scl
	end


REPORTING PROBLEMS AND SUGGESTIONS
==================================

We would like feedback on all parts of the software.  Please let us
know if you

  - have problems following the instructions in the README file,
  - have problems installing the software, 
  - have problems compiling your own valid EXPRESS schema, or
  - have suggestions for improvements to the software.
  - really like the software :)

Send your comments to 
	
	stepcl@cme.nist.gov

(For users of version 2, note the new mailing address of "stepcl...".)

Questions about availability or accessing the software should be
directed to the SOLIS administrator

Gaylen Rinaudot
npt-info@cme.nist.gov
301-975-3386

ACKNOWLEDGMENTS
===============

The STEP Class Library (SCL) was developed by the Manufacturing
Systems Integration Division at the National Institute of Standards
and Technology (http://www.mel/nist.gov/msid) to support testing of
the Standard for the Exchange of Product Model Data (a.k.a STEP) and
validation of STEP's emerging implementation specifications.  Funding
for the project has come from the U.S. Department of Commerce, and the
Department of Defense agencies including the Office of the Defense
CALS (Continuous Acquisition and Life-Cycle Support) Executive and the
Defense Advanced Research Projects Agency (DARPA).  Recent
enhancements were sponsored by the National Industrial Information
Infrastructure Consortium (NIIIP) (http://www.niiip.org) and the NAMT
Framework project
(http://www.mel.nist.gov/msid/projs/97projs/framewrk.htm) of NIST's
Systems Integration for Manufacturing Applications (SIMA) program
(http://www.mel.nist.gov/msid/sima/sima.htm).

LICENSING RESTRICTIONS and DISCLAIMERS
======================================

This software was produced by the National Institute of Standards and
Technology (NIST), an agency of the U.S. government, and by statute
is not subject to copyright in the United States.  Recipients of this
software assume all responsibility associated with its operation,
modification, maintenance, and subsequent re-distribution.

There is no warranty for the NIST STEP Toolkit.
If the NIST STEP Toolkit is modified by someone else and passed on,
NIST wants the Toolkit's recipients to know that what they have is not
what NIST originally distributed.

Distribution Rights
1. Anyone may copy and distribute verbatim copies of the NIST STEP Toolkit
   source code as received in any medium.

2. Anyone may modify their copy or copies of the NIST STEP Toolkit source
   code or any portion of it, and copy and distribute such modifications
   provided that all modifications are clearly associated with the entity
   that performs the modifications.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!DISCLAIMERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Names of companies and products are provided in order to adequately
specify procedures and equipment used.  In no case does such
identification imply recommendation or endorsement by the National
Institute of Standards and Technology, nor does it imply that the
products are necessarily the best available for the purpose.

NO WARRANTY
===========

NIST PROVIDES ABSOLUTELY NO WARRANTY.  THE NIST STEP TOOLKIT
IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU.  SHOULD ANY PORTION OF THE NIST STEP TOOLKIT PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT WILL NIST BE LIABLE FOR DAMAGES, INCLUDING ANY LOST
PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT
LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE, OR LOSSES
SUSTAINED BY THIRD PARTIES, OR A FAILURE OF THE PROGRAM TO OPERATE
WITH PROGRAMS NOT DISTRIBUTED BY NIST) THE PROGRAMS, EVEN IF YOU HAVE
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY
ANY OTHER PARTY.
