Skip to content

Commit c438160

Browse files
committed
even closer
1 parent 7c895ce commit c438160

12 files changed

+214
-56
lines changed

CNAME

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
stepcode.org
2+

_docs/STEPcode.md

+3-14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ STEPcode provides a cross-platform (Linux, OSX, **and** Windows) implementation
1919

2020
The [BSD license](http://github.com/stepcode/stepcode/blob/master/COPYING) allows commercial use. In addition, STEPcode is used in other open source projects such as [BRL-CAD](http://www.brl-cad.org) and [SCView](http://github.com/LaurentBauer/SCView).
2121

22-
STEPcode traces its roots to the NIST STEP Class Library (SCL) which was developed between ~1987 and 1998. For more details: [History](History.html)
22+
STEPcode traces its roots to the NIST STEP Class Library (SCL) which was developed between ~1987 and 1998. For more details: [history](/docs/history/)
2323

2424
### Quick Start
2525

@@ -43,21 +43,10 @@ STEPcode can be used with the following standards because they reuse [Part 11](h
4343

4444
Some schemas are [included](/docs/included_schemas/) with STEPcode, but those are not the only ones that it will work with.
4545

46-
## Community
4746

47+
## More pages
4848

49-
The [scl-dev mailing list](http://groups.google.com/forum/?fromgroups#!forum/scl-dev) is hosted on google groups. In spite of the name, this is for both users and developers. The STEPcode project has evolved into a diverse open source community helping improve the accessibility, adoption, and long-term availability of STEP related technologies for CAx developers.
50-
51-
#### [Projects](List_of_projects.html) and [tasks](List_of_tasks.html)
52-
53-
## Code
54-
55-
**The source code is on [GitHub](http://github.com/stepcode/stepcode)**
56-
57-
More pages:
58-
----
59-
60-
- [Under the hood](/docs/files_dirs/)
49+
- [Under the hood](/docs/under_hood/)
6150
- [Examples](/docs/examples/)
6251

6352
We use [Travis-CI](https://travis-ci.org/stepcode/stepcode) and Appveyor for testing. Pull requests are automatically tested, as ismaster when it changes.

_docs/build_dir.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Build Dir contents
3+
layout: docs
4+
permalink: /docs/build_dir/
5+
---
6+
7+
### Contents
8+
* TOC
9+
{:toc}
10+
11+
The build directory is the directory that cmake is executed from, if executed from the command line.
12+
13+
## schema_scanner
14+
- a tool that writes CMakeLists.txt for each schema specified in SC_BUILD_SCHEMAS
15+
- this became necessary once exp2cxx was modified to produce individual files for each type/entity in the schema, as CMake can't handle compile-time determination of file names
16+
- you shouldn't ever have to run this by hand
17+
18+
## CMakeFiles
19+
- temporary files (i.e. `.o` files)
20+
21+
## src
22+
- same as CMakeFiles
23+
24+
## schemas/SCHEMA_NAME
25+
- generated source is written to files here
26+
27+
## bin/
28+
See [executables](/docs/executables/)
29+
<!-- - `exp2cxx` generates C++ code. Formerly *fedex_plus*
30+
- `exp2py` generates Python code. Formerly *fedex_python*
31+
- `exppp` Express Pretty Printer
32+
- Normally, this isn't built
33+
- `check_express` Parses the express and checks for errors. Formerly *fedex*
34+
- The functionality of exp2cxx/exp2py is a superset of this.
35+
- `p21read_sdai_SCHEMA_NAME` reads one step file and writes the contents to another
36+
- It may change whitespace or remove comments; otherwise, the input and output files are supposed to be identical. If they are not identical, either the file does not match the schema, or there is a bug in SC.
37+
- `lazy_sdai_SCHEMA_NAME` lazy loading test executable for SCHEMA
38+
- Prints time and memory statistics for various stages including file scanning. Loads a few instances, then exits.-->
39+
40+
## lib/
41+
- contains libraries, including libs created for schemas (prefixed with sdai)

_docs/build_process.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Build Process
3+
layout: docs
4+
permalink: /docs/build_process/
5+
---
6+
7+
### Contents
8+
* TOC
9+
{:toc}
10+
11+
## A bit of history
12+
13+
When NIST wrote the STEP Class Libraries, libexpress, fedex_plus, etc, they used makefiles and shell scripts to control the build process. While this allowed them to easily automate the build process, it was not portable.
14+
15+
STEPcode, the renamed STEP Class Libraries, now use CMake. CMake is portable, but does impose some restrictions that were not originally present.
16+
17+
fedex_plus (now exp2cxx) originally wrote a Makefile fragment containing the names of the generated files. Make would happily use that fragment while compiling the Libraries. At that time, a few large files were generated - but the Makefile fragment meant it would have been relatively easy to split the code into numerous small files. Because CMake must create native build system files before the code generation process begins, it is not possible to utilize the Makefile fragment trick. We included some code in CMake to guess what the file names would be, and it ended up working well. However, splitting up the generated code was a priority and it was not feasible to extend this CMake code to that task.
18+
19+
To work around this, we wrote a parser which is built and executed during the configure stage - before CMake has finished reading its files - that reads each EXPRESS input file (schema), determines file names for each TYPE, ENTITY, etc, and writes a CMakeLists.txt. After the CMakeLists.txt is written, add_subdirectory() is called for the dir containing it. CMake is unaware that the file didn't exist until the external command executed; it loads the generated CMakeLists.txt as it would any other file.
20+
21+
## The process
22+
23+
When CMake runs, all files are written to the [build dir](/docs/build_dir/). First, CMake checks for headers and libraries just like any normal configure process. After that, it checks SC_BUILD_SCHEMAS. If that variable is empty, it defaults to generating and compiling code for every schema it can find. Otherwise, it treats the variable as a semicolon-separated list of schemas to be processed. For each schema, it runs the schema scanner (above), generating a CMakeLists.txt.
24+
25+
Depending on options, various libs and tools may or may not be selected for compilation. CMakeLists.txt are processed and native build system files are created. When the src/express CMakeLists.txt is processed, the lexer and parser input files, as well as the code in src/express/generated, are compared against stored hashes. If any of those hashes differ, it indicates that the lexer or parser was modified and the code must be re-generated. If that is true, CMake will stop with an error unless it found perplex, lemon, and re2c. If those were found, they are used to regenerate the code, and then the stored hashes are updated with new values.
26+
27+
If code for schemas is to be generated, exp2cxx (or exp2py) must be compiled first. Both of those depend on the lexer/parser in libexpress. Once code is generated, it can be compiled and linked into what is commonly referred to (in STEPcode) as an SDAI library. This name refers to the fact that the code conforms to the API dictated by Part 22, Standard Data Access Interface. SDAI libraries also link against `src/cl*`, the [class libraries](/docs/files_dirs/#class-libraries).

_docs/building.md

+16-32
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,28 @@ layout: docs
44
permalink: /docs/building/
55
---
66

7-
Required packages
8-
-----------------
7+
### Contents
8+
* TOC
9+
{:toc}
10+
11+
12+
## Required packages
913

1014
- cmake \>= v2.8.7
1115

1216
- As of v0.7, the following are no longer used:
1317
- bison
1418
- flex
1519

16-
How to build
17-
------------
20+
## How to build
1821

1922
`cd sc
2023
mkdir build
2124
cd build
2225
cmake .. # '..' is the path to the directory containing the top-level CMakeLists.txt
2326
make`
2427

25-
Configuration options (append to the 'cmake ..' line):
26-
------------------------------------------------------
28+
## Configuration options (append to the 'cmake ..' line):
2729

2830
- -DSC_BUILD_SCHEMAS="*path/to/schema.exp*;*path/to/schema2.exp*"
2931
- For each schema listed, this
@@ -46,34 +48,16 @@ Configuration options (append to the 'cmake ..' line):
4648

4749
#### See Also: [CMake variables](/docs/cmake_vars/)
4850

49-
Create c++ for a schema manually:
50-
---------------------------------
51+
## Create c++ for a schema manually:
5152

5253
`mkdir build/schema_name
5354
cd build/schema_name
5455
../bin/exp2cxx path/to/schema.exp`
5556

56-
Files created in build dir
57-
--------------------------
58-
59-
- `build/schema_scanner` a tool that writes CMakeLists.txt for each schema specified in SC_BUILD_SCHEMAS
60-
- this became necessary once exp2cxx was modified to produce individual files for each type/entity in the schema, as CMake can't handle compile-time determination of file names
61-
- you shouldn't ever have to run this by hand
62-
- `build/CMakeFiles` temporary files (i.e. `.o` files)
63-
- `build/src` same as build/CMakeFiles
64-
- `build/schemas/SCHEMA_NAME` generated source is written to files here
65-
- `build/bin/` executables
66-
- `exp2cxx` generates C++ code. Formerly *fedex_plus*
67-
- `exp2py` generates Python code. Formerly *fedex_python*
68-
- `exppp` Express Pretty Printer
69-
- Normally, this isn't built
70-
- `check_express` Parses the express and checks for errors. Formerly *fedex*
71-
- The functionality of exp2cxx/exp2py is a superset of this.
72-
- `p21read_sdai_SCHEMA_NAME` reads one step file and writes the contents to another
73-
- It may change whitespace or remove comments; otherwise, the input and output files are supposed to be identical. If they are not identical, either the file does not match the schema, or there is a bug in SC.
74-
- `lazy_sdai_SCHEMA_NAME` lazy loading test executable for SCHEMA
75-
- Prints time and memory statistics for various stages including file scanning. Loads a few instances, then exits.
76-
- `build/lib/` contains libraries, including libs created for schemas (prefixed with sdai)
77-
78-
More options are available - see the man pages, and read comments in the
79-
various CMakeLists.txt files.
57+
## More details
58+
59+
For a walkthrough of the build process, see [Build Process](/docs/build_process/)
60+
61+
For a description of the contents of the build/ dir, see [Build Dir](/docs/build_dir/)
62+
63+
More options are available - see [Executables](/docs/executables/), and read comments in the various CMakeLists.txt files.

_docs/code.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ title: Code Overview
44
permalink: /docs/code/
55
---
66

7-
## TODO fill this out
7+
TODO what is included in STEPcode? describe. add more links, doxygen, etc
88

9-
doxygen
10-
files/folders
11-
build dir
129

10+
[Under the hood](/docs/under_hood/)
1311

1412
[Developers: code analysis](/docs/code/dev_analysis/)
1513

_docs/executables.md

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Executables
3+
layout: docs
4+
permalink: /docs/executables/
5+
---
6+
7+
### Contents
8+
* TOC
9+
{:toc}
10+
11+
See also: [Build Dir](/docs/build_dir/)
12+
13+
These executables reside within `build/bin/`.
14+
15+
## exp2cxx
16+
- generates C++ code. Formerly *fedex_plus*
17+
- See also - [libexpress common options](#libexpress-common-options)
18+
19+
`usage: exp2cxx common_options [-s|-S] [-a|-A] [-c|-C] [-L] express_file
20+
where -s or -S uses only single inheritance in the generated C++ classes
21+
-a or -A generates the early bound access functions for entity classes the old way (without an underscore)
22+
-c or -C generates C++ classes for use with CORBA (Orbix)
23+
-L prints logging code in the generated C++ classes
24+
`
25+
26+
## exp2python
27+
- generates Python code. Formerly *fedex_python*
28+
- See also - [libexpress common options](#libexpress-common-options)
29+
30+
`usage: exp2python common_options express_file`
31+
32+
## exppp
33+
- Express Pretty Printer
34+
- See also - [libexpress common options](#libexpress-common-options)
35+
36+
`usage: exppp common_options [-l _length_] [-c] [-o [file|--]] express_file
37+
-l specifies line length hint for output
38+
-t enable tail comment for declarations - i.e. END_TYPE; -- axis2_placement
39+
-c for constants, print one item per line (YMMV!)
40+
-o specifies the name of the output file (-- for stdout)
41+
`
42+
43+
## check_express
44+
- Parses the express and checks for errors. Formerly *fedex*
45+
- The functionality of exp2cxx/exp2python is a superset of this.
46+
- See also - [libexpress common options](#libexpress-common-options)
47+
48+
`usage: check-express common_options express_file`
49+
50+
## p21read_sdai_SCHEMA_NAME
51+
- reads one step file and writes the contents to another
52+
- It may change whitespace or remove comments; otherwise, the input and output files are supposed to be identical. If they are not identical, either the file does not match the schema, or there is a bug in SC.
53+
- TODO document args
54+
55+
## lazy_sdai_SCHEMA_NAME
56+
- lazy loading test executable for SCHEMA
57+
- Prints time and memory statistics for various stages including file scanning. Loads a few instances, then exits.
58+
- TODO document args
59+
60+
## libexpress common options
61+
Executables linked with libexpress share some common options, though they don't all make sense for every executable.
62+
63+
`usage: _executable_ [-v] [-d #] [-n] [-p _object_type_] [-w|-i _warning_]`
64+
65+
`-v produces a version description
66+
-d turns on debugging ("-d 0" describes this further
67+
-n do not pause for internal errors (useful with delta script)
68+
-p turns on printing when processing certain objects (see below)
69+
-w warning enable
70+
-i warning ignore`
71+
72+
_warning_ is one of
73+
74+
`none
75+
all
76+
circular_subtype
77+
circular_select
78+
entity_as_type
79+
invariant_condition
80+
invalid_case
81+
unnecessary_qualifiers
82+
downcast
83+
indexing
84+
unsupported
85+
limits`
86+
87+
_object_type_ is one or more of
88+
89+
`e entity
90+
p procedure
91+
r rule
92+
f function
93+
t type
94+
s schema or file
95+
# pass #
96+
E everything (all of the above)`
97+
98+
Version description will be similar to
99+
`Build info for build/bin/exp2cxx: git commit id: v0.8-116-g35170b3, build timestamp 05 Jul 2015 22:14
100+
http://github.com/stepcode/stepcode and scl-dev on google groups
101+
`

_docs/exp2cxx_attrs.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ permalink: /docs/code/exp2cxx_attrs/
44
title: Attributes in exp2cxx
55
---
66

7-
This comes from
8-
[classes_misc.c:709](https://github.com/stepcode/stepcode/blob/master/src/fedex_plus/classes_misc.c#L709).
9-
It should be formatted such that doxygen sees it.
7+
This comes from [classes_misc.c:709](https://github.com/stepcode/stepcode/blob/master/src/exp2cxx/classes_misc.c#L709), which is now in a different location due to exp2cxx refactoring. It should be formatted such that doxygen sees it.
108

119
Attributes are divided into four categories: these are not exclusive as
1210
far as I can tell! I added defs below DAS

_docs/under_hood.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: docs
3+
title: Under the Hood
4+
permalink: /docs/under_hood/
5+
---
6+
7+
TODO doxygen links, lib internals, etc
8+
9+
10+
11+
12+
[Build Process](/docs/build_process/)
13+
14+
[Build Dir](/docs/build_dir/)
15+
16+
[Executables](/docs/executables/)
17+
18+
[Files and Dirs](/docs/files_dirs/)

_docs/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ See [examples](/docs/examples/)
2424

2525
## Explore
2626

27-
More details: [description of the files and directories](/docs/files_dirs/)
27+
You want to look under the hood? [Be our guest!](/docs/under_hood/)

_includes/primary-nav-items.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<a href="/news/">News</a>
1010
</li>
1111
<li>
12-
<a href="/help/">Help</a>
12+
<a href="/help/">Help&nbsp;&amp;&nbsp;Community</a>
1313
</li>
1414
<li>
1515
<a href="{{ site.repository }}"><span class="hide-on-mobiles">View on </span>GitHub</a>

help/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: page
3-
title: Getting Help
3+
title: Help
44
---
55

66
Need help? Try these resources.

0 commit comments

Comments
 (0)