Compare commits

...
35 Commits
Author SHA1 Message Date
Mark Pictor e23b344824 update files for v0.3 release 2011-10-29 06:43:31 -04:00
Mark b7b2a53851 Merge pull request #81 from mpictor/review/check_schema
Review/check schema
2011-10-27 18:01:07 -07:00
Mark cdd9d150c1 Merge pull request #84 from mpictor/review/add-schemas
Review/add schemas
2011-10-27 17:03:04 -07:00
Mark Pictor 1d4b2a66fa add -i option to p21read - ignore schema name mismatch 2011-10-27 06:13:32 -04:00
Mark Pictor c48972c4be delete code I'd commented out previously 2011-10-26 20:14:27 -04:00
Mark Pictor ebe490b5e0 rename header section schema files again, this time to camelcase 2011-10-26 20:14:26 -04:00
Mark Pictor bddcd1d063 Fix issue with schemas that have 'SCHEMA' in comment
CMake was looking for the first line containing SCHEMA. If a
comment above the SCHEMA statement contained SCHEMA, cmake would
pick that line. This resulted in an invalid string for the schema
name.
2011-10-26 18:55:54 -04:00
Mark Pictor 5ab1344819 Replace IFC2X4 RC2 with IFC2X4 RC3, replace AP235 with AP235 TC 2011-10-26 18:52:37 -04:00
Mark Pictor 227fffd37e Check that the exchange file schema name matches the library schema name 2011-10-20 21:20:44 -04:00
Mark Pictor 4858af2500 Update CMakeLists.txt, STEPfile.* to work with updated header schema
CMakeLists.txt:
* add/change file names

STEPfile.*:
* replace p21DIS_ with Schema
* remove code dealing with N279 files

seeinfodefault.h:
* typo in comment
2011-10-20 21:19:26 -04:00
Mark Pictor d1cd32b37c modify header schema files generated by fedex_plus 2011-10-20 21:19:26 -04:00
Mark Pictor 00dc10bcf7 rename some files generated by fedex_plus 2011-10-20 21:19:26 -04:00
Mark Pictor fb5ce3e79d Replace s_HEADER_SCHEMA.* with files generated from edition 2 header schema 2011-10-20 21:19:26 -04:00
Mark 0e572b4272 Merge pull request #80 from mpictor/review/ctest-suite
Review/ctest suite
2011-10-20 14:37:16 -07:00
Mark Pictor b79be4daaa ctest - allow user to set variables in an external file
This makes customization possible without editing or copying a versioned file
2011-10-19 19:57:15 -04:00
Mark Pictor 70912a29be add script to run ctest and submit results 2011-10-18 21:21:25 -04:00
Mark Pictor 01783dd2e4 add README for data/ 2011-10-18 21:21:25 -04:00
Mark Pictor 3ddc5e0530 improve ctest 2011-10-18 21:21:25 -04:00
Mark Pictor f008245c02 reorganize test/ and data/ 2011-10-18 21:21:25 -04:00
Mark Pictor 3d17af437f make it easier to build all schemas in data/ 2011-10-18 21:21:24 -04:00
Mark Pictor ec9470ebeb automatically add a test for each p21 file 2011-10-18 21:21:24 -04:00
Mark Pictor b0cc9fc900 data/CMakeLists.txt - shorten SCHEMA_DIR, add a target for schema code gen 2011-10-18 21:21:24 -04:00
tpaviot a7629631d5 Added ctest based testing suite 2011-10-18 21:21:24 -04:00
Mark fcb715009f Merge pull request #78 from mpictor/tp/ap239
Added AP239 mim long form schema from official ISO-10303:239 spec
2011-10-17 18:33:58 -07:00
tpaviot be07c062ff Replaced ap239 mim long form schema with arm lf 2011-10-17 06:07:39 +02:00
tpaviot f30d7f952c Added AP239 mim long form schema from official ISO-10303:239 spec
Note: this schema differs from the one available from the Steptools.com
website (see http://www.steptools.com/support/stdev_docs/express/ap239/wg3n1568_ap239.exp)
2011-10-17 06:05:13 +02:00
Mark aba478ed12 Merge pull request #77 from mpictor/review/schemas
Review/schemas
2011-10-16 06:20:24 -07:00
Mark Pictor e944d1e4b5 add newline at end of ap240 schema - fixes fedex error 2011-10-15 18:25:41 -04:00
Mark Pictor 7f864b037a schema matrix - don't color text for 0 errors or warnings 2011-10-15 18:09:03 -04:00
Mark Pictor c32a681e13 add APs 209,210,235,240,242, and oil&gas 15926; update schema script 2011-10-15 16:37:37 -04:00
Mark 34761e4b0f Merge pull request #76 from mpictor/review/string-ends-with-S
fix part of issue #74 - properly handle strings ending with S
2011-10-08 07:11:37 -07:00
Mark 51ca6adf54 Merge pull request #69 from mpictor/review/documentation
Review/documentation
2011-10-08 07:10:41 -07:00
Mark Pictor b2ec929fb0 fix part of issue #74 - find_last_of() finds any one character; replace with rfind()
For any string ending with S, the single-quote following the S was ignored. This caused
SCL to read beyond the end of the string and discard all remaining entities in the file.
std::string::find_last_of() finds any one character, rather than a specific sequence.
Replaced with std::string::rfind() for intended behavior.
2011-10-06 18:11:20 -04:00
Mark Pictor 680bb353d3 forgot to update version in README 2011-10-02 11:52:28 -04:00
Mark Pictor f0cadc97d2 add two files for doxyassist 2011-10-02 11:44:57 -04:00
96 changed files with 155045 additions and 19087 deletions
+18
View File
@@ -95,6 +95,20 @@ IF(NOT WIN32)
ENDIF(NOT UMASK)
ENDIF(NOT WIN32)
#---------------------------------------------------------------------
# Testing option
OPTION( ENABLE_TESTING "Enable unittesting framework" OFF )
IF(ENABLE_TESTING)
set( CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage" ) #for code coverage
set( CMAKE_SHARED_LINKER_FLAGS "-fprofile-arcs -ftest-coverage" )
if( NOT DEFINED BUILD_SCHEMAS )
set( BUILD_SCHEMAS "ALL" ) #test all schemas, unless otherwise specified
endif()
INCLUDE(CTest)
ENABLE_TESTING()
SUBDIRS(test)
ENDIF(ENABLE_TESTING)
#---------------------------------------------------------------------
# The following logic is what allows binaries to run successfully in
# the build directory AND install directory. Thanks to plplot for
@@ -236,3 +250,7 @@ ADD_SUBDIRECTORY(src/clutils)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(doc)
# this is for testing - 'make core' builds everything that isn't generated
add_custom_target( core )
add_dependencies( core stepdai check-express stepeditor fedex_plus )
+10
View File
@@ -0,0 +1,10 @@
set(CTEST_CUSTOM_WARNING_MATCH ${CTEST_CUSTOM_WARNING_MATCH} "{standard input}:[0-9][0-9]*: WARNING: ")
set(CTEST_CUSTOM_ERROR_MATCH ${CTEST_CUSTOM_ERROR_MATCH} "{standard input}:[0-9][0-9]*: ERROR : ")
set(CTEST_PROJECT_NAME "StepClassLibrary")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=StepClassLibrary")
set(CTEST_DROP_SITE_CDASH TRUE)
+3 -2
View File
@@ -39,8 +39,9 @@ Installation
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.
-DBUILD_SCHEMAS=ALL
- Added to make use of ctest easier. If BUILD_SCHEMAS == ALL,
then CMake adds each *.exp file found in data/.
-DCMAKE_BUILD_TYPE=Release
- this causes binaries to be built without debugging information
- without this, cmake defaults to a Debug build
+12
View File
@@ -1,5 +1,17 @@
STEP Class Library ------ https://github.com/mpictor/StepClassLibrary
************************************************************************
Release 0.3 (Oct 29, 2011)
What's new since v0.2?
* Start using CTest
* Add a number of schemas, update IFC2X4 to RC3, update AP235 to TC
* Update the exchange file header schema to edition two; drop support
for N279 files
* In p21read, check that the schema name for the file and library match
* Fix bug with exchange files that contain strings ending in 'S'
************************************************************************
Release 0.2 (Oct 1, 2011)
What's new since v0.1?
+14 -7
View File
@@ -1,12 +1,12 @@
***********************************************************************
Step Class Library v0.1 -- https://github.com/mpictor/StepClassLibrary
Step Class Library v0.3 -- 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.
to that schema. SCL once worked with ObjectStore, OODB, and
CORBA IDL - but that code has not been used in a very long time.
We are in the process of removing this code because ObjectStore,
CORBA, etc. are no longer part of the STEP standard.
* SCL is packaged along with some other tools. See
"THE NIST STEP TOOLSET", below. In particular, Data Probe
@@ -39,12 +39,19 @@ Step Class Library v0.1 -- https://github.com/mpictor/StepClassLibrary
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.
-DBUILD_SCHEMAS=ALL
- Added to make use of ctest easier. If BUILD_SCHEMAS == ALL,
then CMake adds each *.exp file found in data/.
-DCMAKE_BUILD_TYPE=Release
- this causes binaries to be built without debugging information
- without this, cmake defaults to a Debug build
* Using CTest to test SCL:
- Read the comments in run_ctest.cmake
- (OPTIONAL) Create scl/../.SCL_CTEST_PREFS.cmake, and set variables
in it (this file is required for CDash submission to be enabled)
- Run tests with `ctest -S run_ctest.cmake`
***********************************************************************
***********************************************************************
+98 -57
View File
@@ -1,44 +1,53 @@
SET(ap203_data
ap203/203wseds.exp
ap203/cube1.p21
ap203/cube2.p21
ap203/g_r_assembly1.p21
ap203/gasket1.p21
ap203/gasket2.p21
ap203/gasket3.p21
ap203/hex_prism1.p21
ap203/rod_aspect1.p21
ap203/star1.p21
)
INSTALL(FILES ${ap203_data} DESTINATION ${DATA_DIR}/data/ap203)
IF( INSTALL_DATA )
SET(ap203_data
ap203/203wseds.exp
ap203/cube1.p21
ap203/cube2.p21
ap203/g_r_assembly1.p21
ap203/gasket1.p21
ap203/gasket2.p21
ap203/gasket3.p21
ap203/hex_prism1.p21
ap203/rod_aspect1.p21
ap203/star1.p21
)
INSTALL(FILES ${ap203_data} DESTINATION ${DATA_DIR}/data/ap203)
SET(ap227_data
ap227/ap227.exp
ap227/mitre.p21
ap227/mitre.step.txt
)
INSTALL(FILES ${ap227_data} DESTINATION ${DATA_DIR}/data/ap227)
SET(ap227_data
ap227/ap227.exp
ap227/mitre.p21
ap227/mitre.step.txt
)
INSTALL(FILES ${ap227_data} DESTINATION ${DATA_DIR}/data/ap227)
SET(step_example_data
example/example.exp
)
INSTALL(FILES ${step_example_data} DESTINATION ${DATA_DIR}/data/example)
SET(step_example_data
example/example.exp
)
INSTALL(FILES ${step_example_data} DESTINATION ${DATA_DIR}/data/example)
SET(step_datafiles
pdmnet.exp
select.exp
)
INSTALL(FILES ${step_datafiles} DESTINATION ${DATA_DIR}/data)
SET(step_datafiles
pdmnet.exp
select.exp
)
INSTALL(FILES ${step_datafiles} DESTINATION ${DATA_DIR}/data)
ENDIF( INSTALL_DATA )
#this sets a property so that the target doesn't get built by 'make' or 'make all'
#useful when testing generation of schema code/compiling schem libs/etc
FUNCTION( TESTABLE_TARGET target )
if(ENABLE_TESTING)
set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON )
endif()
ENDFUNCTION( TESTABLE_TARGET )
# To build one or more schemas, configure with
# 'cmake -DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
# This function runs fedex on one express file. The generated source goes in a dir
# in the build dir, and it is compiled into a library. A p21read executable is
# compiled and linked to the lib, unless DISABLE_P21READ is true. p21read is used
# to test the lib.
# compiled and linked to the lib. p21read is used to test the lib.
FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
if( EXISTS "${CMAKE_BINARY_DIR}/${SCHEMA_FILE}" ) #try absolute path. if that fails, must already be absolute.
set( SCHEMA_FILE "${CMAKE_BINARY_DIR}/${SCHEMA_FILE}" )
@@ -57,51 +66,83 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
endif()
# read the schema name from a line like 'SCHEMA AUTOMOTIVE_DESIGN;'
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "SCHEMA .*")
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "^SCHEMA .*")
string(REGEX REPLACE "^SCHEMA \(.*\)\;$" "\\1" SCHEMA_N ${SCHEMA_STATEMENT} )
string(TOUPPER ${SCHEMA_N} SCHEMA_NAME) #fedex_plus always uses upper case for file names
string(TOUPPER ${SCHEMA_N} SCHEMA_LONG_NAME) #fedex_plus always uses upper case for file names
get_filename_component(SCHEMA_SHORT_NAME ${SCHEMA_FILE} NAME_WE)
project( sdai_${SCHEMA_NAME} )
message( STATUS "Generating code for ${SCHEMA_NAME}.")
set( SCHEMA_DIR ${CMAKE_BINARY_DIR}/${SCHEMA_NAME} )
project( sdai_${SCHEMA_SHORT_NAME} )
message( STATUS "Generating code for ${SCHEMA_SHORT_NAME}.")
set( SCHEMA_OUTPUT_DIR ${CMAKE_BINARY_DIR}/${SCHEMA_SHORT_NAME} )
#the names of the files that will be generated
set( FEDEX_OUT ${SCHEMA_DIR}/compstructs.cc ${SCHEMA_DIR}/Sdaiclasses.h
${SCHEMA_DIR}/schema.cc ${SCHEMA_DIR}/Sdai${SCHEMA_NAME}.cc
${SCHEMA_DIR}/schema.h ${SCHEMA_DIR}/Sdai${SCHEMA_NAME}.h
${SCHEMA_DIR}/SdaiAll.cc ${SCHEMA_DIR}/Sdai${SCHEMA_NAME}.init.cc )
set( FEDEX_OUT ${SCHEMA_OUTPUT_DIR}/compstructs.cc ${SCHEMA_OUTPUT_DIR}/Sdaiclasses.h
${SCHEMA_OUTPUT_DIR}/schema.cc ${SCHEMA_OUTPUT_DIR}/Sdai${SCHEMA_LONG_NAME}.cc
${SCHEMA_OUTPUT_DIR}/schema.h ${SCHEMA_OUTPUT_DIR}/Sdai${SCHEMA_LONG_NAME}.h
${SCHEMA_OUTPUT_DIR}/SdaiAll.cc ${SCHEMA_OUTPUT_DIR}/Sdai${SCHEMA_LONG_NAME}.init.cc )
# *cannot* use include_directories() because the includes keep piling up - if building
# multiple schemas, each one will use the include dirs from all previous schemas. Since
# one header (schema.h) is always named the same, this will not work. only workaround
# seems to be set_target_properties( <target> PROPERTIES COMPILE_FLAGS <flags> )
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore -DHAVE_CONFIG_H" )
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore" )
add_custom_command( OUTPUT ${SCHEMA_DIR}
COMMAND cmake ARGS -E make_directory ${SCHEMA_DIR}
COMMENT "Creating ${SCHEMA_DIR} for schema ${SCHEMA_NAME}")
add_custom_target( generate_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} )
add_custom_command( OUTPUT ${SCHEMA_OUTPUT_DIR}
COMMAND cmake ARGS -E make_directory ${SCHEMA_OUTPUT_DIR}
COMMENT "Creating ${SCHEMA_OUTPUT_DIR} for schema ${SCHEMA_SHORT_NAME}")
add_custom_command( OUTPUT ${FEDEX_OUT}
COMMAND fedex_plus ARGS ${SCHEMA_FILE}
DEPENDS ${SCHEMA_FILE} ${SCHEMA_DIR}
WORKING_DIRECTORY ${SCHEMA_DIR}
COMMENT "Running fedex_plus for ${SCHEMA_NAME}..."
DEPENDS ${SCHEMA_FILE} ${SCHEMA_OUTPUT_DIR}
WORKING_DIRECTORY ${SCHEMA_OUTPUT_DIR}
COMMENT "Running fedex_plus for ${SCHEMA_SHORT_NAME}..."
VERBATIM )
add_library( ${PROJECT_NAME} SHARED ${FEDEX_OUT} )
target_link_libraries(${PROJECT_NAME} stepdai stepcore express stepeditor )
add_dependencies( ${PROJECT_NAME} generate_${SCHEMA_SHORT_NAME} )
set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
${${PROJECT_NAME}_COMPILE_FLAGS} )
if( NOT DEFINED ${DISABLE_P21READ} )
add_executable( "p21read_${PROJECT_NAME}" ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc )
target_link_libraries( p21read_${PROJECT_NAME} ${PROJECT_NAME} )
set_target_properties( "p21read_${PROJECT_NAME}" PROPERTIES COMPILE_FLAGS
${${PROJECT_NAME}_COMPILE_FLAGS} )
endif()
TESTABLE_TARGET( ${PROJECT_NAME} )
add_test( NAME generate_${SCHEMA_SHORT_NAME}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} --build .
--target generate_${SCHEMA_SHORT_NAME}
--config $<CONFIGURATION> )
add_test( NAME build_${PROJECT_NAME}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} --build .
--target p21read_${PROJECT_NAME}
--config $<CONFIGURATION> )
# label the tests and set dependencies
set_tests_properties( generate_${SCHEMA_SHORT_NAME} PROPERTIES LABELS schema_gen )
set_tests_properties( build_${PROJECT_NAME} PROPERTIES DEPENDS generate_${SCHEMA_SHORT_NAME} LABELS schema_build )
add_executable( p21read_${PROJECT_NAME} ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc )
target_link_libraries( p21read_${PROJECT_NAME} ${PROJECT_NAME} )
set_target_properties( p21read_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
${${PROJECT_NAME}_COMPILE_FLAGS} )
TESTABLE_TARGET( p21read_${PROJECT_NAME} )
#find all part 21 files in schema dir, add a test for each one
get_filename_component( SCHEMA_DIR ${SCHEMA_FILE} PATH )
file( GLOB_RECURSE P21_FILES ${SCHEMA_DIR}/*.stp ${SCHEMA_DIR}/*.step ${SCHEMA_DIR}/*.p21 )
foreach( TEST_FILE ${P21_FILES} )
get_filename_component( FNAME ${TEST_FILE} NAME_WE )
add_test( NAME read_write_${SCHEMA_SHORT_NAME}_${FNAME}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND p21read_${PROJECT_NAME} ${TEST_FILE} )
set_tests_properties( read_write_${SCHEMA_SHORT_NAME}_${FNAME} PROPERTIES DEPENDS build_${PROJECT_NAME} LABELS schema_rw )
endforeach()
ENDFUNCTION(BUILD_A_SCHEMA)
if(NOT BUILD_SCHEMAS STREQUAL "" )
foreach( ap ${BUILD_SCHEMAS} )
BUILD_A_SCHEMA( ${ap} )
endforeach()
if( DEFINED BUILD_SCHEMAS )
if( BUILD_SCHEMAS STREQUAL "ALL" )
file( GLOB_RECURSE BUILD_SCHEMAS ${SCL_SOURCE_DIR}/data/*.exp )
endif()
foreach( ap ${BUILD_SCHEMAS} )
BUILD_A_SCHEMA( ${ap} )
endforeach()
endif()
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
data/ directory README
Layout
------
Each directory
- must contain exactly one EXPRESS schema
-- this schema must be useful to end users - i.e. not a schema crafted to test SCL
- must be named after the numeric designation of the schema *if and only if*
it is an IS STEP schema
-- examples: ap214e3, AP235, etc (case insensitive)
-- directories for schemas that are not STEP IS must be named differently
- may contain part 21 files
-- these files must be compatible with the schema
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4856
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+12200 -11881
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+253
View File
@@ -0,0 +1,253 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- run doxyassist from scl root dir:
../doxyassist/doxyassist.py doc/doxyassist.xml -->
<!-- The main tag provides the version (1.0 only for now). The type attribute
is not required, and defaults to "generic". To use a different project handler,
change its type. The "name" attribute defines the name of your configuration.
Note: you must define and use the "http://simply-life.net/doxyassist/project.xsd"
namespace for the XML file to be processed properly. -->
<DoxyAssist xmlns="http://simply-life.net/doxyassist/doxyassist.xsd"
xmlns:da="http://simply-life.net/doxyassist/doxyassist.xsd"
version="1.0" type="generic" name="My DoxyAssist Project">
<!-- You can set global settings here. The doxyfile attribute defines the
Doxyfile to load by default. If none is given, or the template cannot be
loaded, the default Doxygen settings are used as base.
You can include any setting here, and it will be passed to Doxygen
(even if it is not a recognized setting). You can add as many as you like,
overriding the template or default Doxyfile.
The given template file will never be overwritten by Doxygen Assistant.
Instead the project specific version will be kept in memory and written
to Doxygen over a pipe.
Note that some settings are always overridden due to project definitions.
See the information near the projects for more information. Changing these
settings here will have no effect when using the Doxygen Assistant to
run Doxygen. -->
<doxygen doxyfile="./doc/Doxyfile">
<!-- A boolean setting is defined like this. This will write "YES" or "NO" for
the specific setting in the Doxyfile passed to Doxygen. -->
<bool name="CREATE_SUBDIRS">false</bool>
<!-- A numeric setting is written like this. It will be written to the Doxyfile
without quotes. -->
<int name="TAB_SIZE">8</int>
<!-- This is a single string setting. When writing this out to the doxyfile,
it will be quoted and treated as a whole. -->
<string name="OUTPUT_LANGUAGE">English</string>
<!-- A list setting contains multiple elements, seperated by whitespace. Each
individual item will be quoted and treated as a whole for Doxygen. By
default a list replaces the existing setting. If the append attribute is
set to true, then the items will be added to the existing set. -->
<string name="HTML_HEADER">./doc/doxygen_custom_header.html</string>
<list name="FILE_PATTERNS" append="false">
<item>*.h</item>
<item>*.c</item>
<item>*.hh</item>
<item>*.cc</item>
<item>README</item>
</list>
</doxygen>
<!-- Settings for the Qt Help Collection to create. If not present, no
help collection will be created. See
http://doc.trolltech.com/assistant-custom-help-viewer.html for a
description of all settings; the inner configuration is copied directly
into the <assistant> section of the project file.
The collectionFile attribute contains the path to the collection file to
create (this file must be writable). Additionally provide the name for the
project file in the projectFile attribute. By default this is the same
as the collection file, with an extension of "qhcp" instead of "qhc"
The storage attribute defines the subdirectory to place copies of Qt
Compressed Help files in. The copyAction attribute defaults to making
actual copies; this attribute can be set to "copy", "move" and "symlink".
-->
<qtHelp collectionFile="./doc/helpcollection.qhc"
projectFile="./doc/helpcollection.qhcp"
storage="./doc/qch" copyAction="copy">
<title>StepClassLibrary</title>
<startPage>qthelp://com.github.mpictor/doc/index.html</startPage>
<!-- See http://doc.trolltech.com/assistant-custom-help-viewer.html for more
settings in the <assistant> section. -->
</qtHelp>
<!-- Start a list of projects -->
<projects>
<!-- A project contains information about one Doxygen run, as well as
as well as subprojects. It can have its completely own Doxygen
configuration.
Various settings are determined by the Doxygen Assistant; they will
always override the Doxyfile settings. All values are by default inherited
from the parent project, or empty if there is nothing to inherit from,
unless noted otherwise. Note that even if a value is empty, this will
override the Doxyfile settings. The following Doxyfile settings are
overridden:
- PROJECT_NAME
- PROJECT_VERSION
- INPUT
- EXCLUDE
- OUTPUT_DIRECTORY
- WARN_LOGFILE
- DOCSET_BUNDLE_ID
- QCH_FILE
- QHP_NAMESPACE
- QHP_CUST_FILTER_NAME
- QHP_CUST_FILTER_ATTRS
- QHP_SECT_FILTER_ATTRS
-->
<project>
<!-- The name of the project -->
<name>StepClassLibrary</name>
<!-- The version number of the documentation -->
<version>0.2</version>
<!-- Whether to build version specific documentation for the projects or not.
Note that if this is set, Qt Help filters may become invalid when newer
versions of the documentation are built. Due to user-specific settings,
it may be necessary to remove the user specific cache files to reset
the filters. It does however allow you to keep documentation of multiple
versions next to each other. Default value is false.
Note that regardless of this setting, the version is still used in the
PROJECT_NUMBER setting, as well as the PROJECT_NAME of subprojects -->
<versionSpecific>false</versionSpecific>
<!-- Full path to the directory with documented source code. You can add
multiple input lines if you need to add multiple locations.
If you want documentation of subprojects to be explicitly included as well,
you must list the EXACT same input directories in the parent; this
will prevent the directories from being excluded. -->
<input>./src</input>
<input>./include</input>
<exclude>./include/exppp</exclude>
<exclude>./include/express</exclude>
<!-- <input>./include/exppp</input>
<input>./include/express</input>
<input>./src/cldai</input>
<input>./src/cleditor</input>
<input>./src/clprobe-ui</input>
<input>./src/clstepcore</input>
<input>./src/clutils</input>
<input>./src/exppp</input>
<input>./src/express</input>
<input>./src/fedex_plus</input>
<input>./src/test</input>-->
<!-- A list of files/paths to exclude. Add one <exclude> tag per path to
exclude. This will automatically be expanded to exclude input directories
of subprojects, and prevent mangled documentation. -->
<!-- <exclude>/path/to/my-application/src/excluded</exclude> -->
<!-- Directory to store Doxygen output for this project. Note that within
this directory, a subdirectory is created based on the project name.
Additionally, if the <versionspecific> setting has a value of true,
another subdirectory based on the version number will be created (e.g.
"/path/to/my-application/out/my-application/1.0". -->
<output>./doc/doxygen</output>
<!-- The directory where error and log files will be stored. Log and error
files will be named "my-application.1-0.log" and
"my-application.1-0-error.log" respectively. -->
<logDirectory>./doc/doxygen/log</logDirectory>
<!-- Optional base namespace for this application. This is prefixed to the
normalized project name and version number (if version specific is set).
The full namespace would now become "com.mycompany.my-application.1-0"
in this example. -->
<namespace>doc</namespace>
<!-- You can define a <doxygen> block, in which you set project specific
settings. This will hold for this and all subprojects. See also the
<doxygen> block above. If you provide a doxyfile attribute, that
file will be used as template instead; this also implies all settings
in parent projects including the main doxygen settings will be
discarded. -->
<!-- <doxygen>
<list name="FILE_PATTERNS" append="true">
<item>*.module</item>
<item>*.inc</item>
<item>*.html</item>
</list>
</doxygen>-->
<!-- You can define subprojects here. Input directories of subprojects are
automatically excluded from parent projects. As such, documentation will
not be mixed.
Note that by default _all_ settings will be inherited from the parent.
-->
<project>
<!-- The name of the subproject -->
<name>CLStepCore</name>
<version> </version>
<!-- And its version -->
<!-- <version>1.1</version> -->
<!-- Whether to build version specific documentation for this subproject.
If the parent is version specific, that setting will still be
adhered to. If this is left out, the parent setting is inherited. -->
<!-- <versionSpecific>false</versionSpecific> -->
<!-- Full path to the directory with documented source code -->
<input>./src/clstepcore</input>
<!-- Subproject excluded directories -->
<!-- <exclude>/path/to/my-application/src/mymodule/excluded</exclude> -->
<!-- Optional output directory. If omitted, the parent project's output
directory is inherited. The actual output is written to the same
subdirectory of the parent project, in an extra subdirectory with a
name based on the project name and optionally version. -->
<!-- <output>/path/to/my-application/out</output> -->
<!-- The optional log directory. If omitted, the parent project's log
directory is inherited. Files will be named using project name and
version number (if versionSpecific is true), including the parent
project's information. Log and error files will, in this example,
be named "my-application.1-0.my-module.log" and
"my-application.1-0.my-module.err" respectively. -->
<!-- <logDirectory>/path/to/my-application/doc/log</logDirectory> -->
<!-- Additional part to prefix the project's subnamespace with. In this
example, the namespace would become
"com.mycompany.my-application.1-0.modules.my-module". -->
<!-- <namespace>modules</namespace> -->
<!-- You can add subprojects to subprojects as well, if you like -->
</project>
<project>
<name>CLDAI</name>
<version> </version>
<input>./src/cldai</input>
</project>
<project>
<name>CLEditor</name>
<version> </version>
<input>./src/cleditor</input>
</project>
<project>
<name>CLProbe-ui</name>
<version> </version>
<input>./src/clprobe-ui</input>
</project>
<project>
<name>CLUtils</name>
<version> </version>
<input>./src/clutils</input>
</project>
<project>
<name>ExPPP</name>
<version> </version>
<input>./src/exppp</input>
<input>./include/exppp</input>
</project>
<project>
<name>Express</name>
<version> </version>
<input>./src/express</input>
<input>./include/express</input>
</project>
<project>
<name>Fedex Plus</name>
<version> </version>
<input>./src/fedex_plus</input>
</project>
<project>
<name>Tests</name>
<version> </version>
<input>./src/test</input>
</project>
</project>
<!-- And you can even add more top level projects to collect. -->
</projects>
</DoxyAssist>
+62
View File
@@ -0,0 +1,62 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>$title</title>
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css" />
$treeview
$search
$mathjax
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- add module list -->
<div id="navrow0" class="tabs">
<ul class="tablist">
<li><a href="../../doc.StepClassLibrary/doxygen-html/index.html"><span>Main</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLDAI/doxygen-html/index.html"><span>CLDAI</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLEditor/doxygen-html/index.html"><span>CLEditor</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLProbe-ui/doxygen-html/index.html"><span>CLProbe-ui</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLStepCore/doxygen-html/index.html"><span>CLStepCore</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLUtils/doxygen-html/index.html"><span>CLUtils</span></a></li>
<li><a href="../../doc.StepClassLibrary.ExPPP/doxygen-html/index.html"><span>ExPPP</span></a></li>
<li><a href="../../doc.StepClassLibrary.Express/doxygen-html/index.html"><span>Express</span></a></li>
<li><a href="../../doc.StepClassLibrary.Fedex-Plus/doxygen-html/index.html"><span>Fedex-Plus</span></a></li>
<li><a href="../../doc.StepClassLibrary.Tests/doxygen-html/index.html"><span>Tests</span></a></li>
</ul>
</div>
<!-- end module list -->
+3 -4
View File
@@ -9,8 +9,7 @@ result_dir="."
mk="make -j4"
#separated by ; for cmake
schemas="../data/example/example.exp;../data/ap227/ap227.exp;../data/ap214e3/AP214E3_2010.exp;../data/select.exp;../data/ap203e2/ap203e2_mim_lf.exp;../data/ap203/203wseds.exp;../data/ifc2x3/IFC2X3_TC1.exp;../data/pdmnet.exp;../data/ifc2x4/IFC2X4_RC2.exp;/opt/step/notingit/part409cdts_wg3n2617mim_lf.exp;/opt/step/notingit/ap242_managed_model_based_3d_engineering_mim_lf.exp;/opt/step/notingit/AP224E3_wg3n1941.exp;/opt/step/notingit/AP238E2_aim_lf_20100903.exp"
schemas="../data/ap203/203wseds.exp;../data/ap203e2/ap203e2_mim_lf.exp;../data/ap210e3/ap210e3_wip1.41_mim_lf.exp;../data/ap214e3/AP214E3_2010.exp;../data/ap227/ap227.exp;../data/ap235/AP235-aim-long.exp;../data/ap240/AP240_aim_lf.exp;../data/cd209/part409cdts_wg3n2617mim_lf.exp;../data/cd242/242_n2813_mim_lf.exp;../data/ifc2x3/IFC2X3_TC1.exp;../data/ifc2x4/IFC2X4_RC2.exp;../data/ISO15926/15926-0002-lifecycle_integration.exp"
#count warnings and errors, append to $matrix_file. creates hypertext links to stderr,stdout txt
# $1 is the name of the row, $2 is the path and first part of the filename, $3 is the schema
function count_we {
@@ -29,8 +28,8 @@ function count_we {
echo "</td>"
else #empty
echo "<tr><td><b>$1</b></td>"
echo "<td><font color="red">0 errors</font></td>"
echo "<td><font color="blue">0 warnings</font></td>"
echo "<td>0 errors</td>"
echo "<td>0 warnings</td>"
echo "<td> ---- </td>"
fi
if [ -s $o ]; then
+119
View File
@@ -0,0 +1,119 @@
# run_ctest.cmake
# `ctest -S run_ctest.cmake`
set( CTEST_SOURCE_DIRECTORY . )
set( CTEST_BINARY_DIRECTORY build_ctest )
set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
set( CTEST_MEMORYCHECK_COMMAND /usr/bin/valgrind )
set( CTEST_INITIAL_CACHE "
SITE:STRING=${CTEST_SITE}
BUILDNAME:STRING=${CTEST_BUILD_NAME}
ENABLE_TESTING:BOOL=ON
CMAKE_BUILD_TYPE:STRING=Debug
")
if( EXISTS "../.SCL_CTEST_PREFS.cmake" )
include( "../.SCL_CTEST_PREFS.cmake" )
else()
message( WARNING "Did not find ../.SCL_CTEST_PREFS.cmake, containing config variables - result submission disabled" )
set( SKIP_SUBMISSION TRUE )
endif()
######################################################
######################################################
# use config variables such as these in
# ../.SCL_CTEST_PREFS.cmake
#
#set( CTEST_SITE "your name here")
#set( CTEST_BUILD_NAME "build type, os, arch")
#
#
# setting any of these to true causes that set of tests
# to be skipped (unless another test depends on that test)
# SKIP_CPP_TEST_SCHEMA_GEN
# SKIP_CPP_TEST_SCHEMA_BUILD
# SKIP_CPP_TEST_SCHEMA_RW
#
# setting this one disables result submission to my.cdash.org
# SKIP_SUBMISSION
######################################################
######################################################
function( SUBMIT_TEST part )
if( NOT SKIP_SUBMISSION )
ctest_submit( PARTS ${part} )
endif()
endfunction( SUBMIT_TEST part )
# find number of processors, for faster builds
# from http://www.kitware.com/blog/home/post/63
if(NOT DEFINED PROCESSOR_COUNT)
# Unknown:
set(PROCESSOR_COUNT 0)
# Linux:
set(cpuinfo_file "/proc/cpuinfo")
if(EXISTS "${cpuinfo_file}")
file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
list(LENGTH procs PROCESSOR_COUNT)
endif()
# Mac:
if(APPLE)
find_program(cmd_sys_pro "system_profiler")
if(cmd_sys_pro)
execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info)
string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1"
PROCESSOR_COUNT "${info}")
endif()
endif()
# Windows:
if(WIN32)
set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
endif()
endif()
set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
######################################################
##### To disable reporting of a set of tests, comment
##### out the SUBMIT_TEST line immediately following
##### the set you wish to disable. If other tests
##### depend on those tests, they will be executed
##### but not reported.
#####
##### To do this for all tests:
##### set( SKIP_SUBMISSION TRUE )
######################################################
ctest_start(Experimental)
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND OPTIONS -DENABLE_TESTING=ON )
SUBMIT_TEST( Configure )
ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND )
SUBMIT_TEST( Build )
# ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL ${PROCESSOR_COUNT} )
if(NOT SKIP_CPP_TEST_SCHEMA_GEN )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "schema_gen" )
SUBMIT_TEST( Test )
endif()
if(NOT SKIP_CPP_TEST_SCHEMA_BUILD_CPP )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "schema_build" )
SUBMIT_TEST( Test )
endif()
if(NOT SKIP_CPP_TEST_SCHEMA_RW )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "schema_rw" )
SUBMIT_TEST( Test )
endif()
# ctest_coverage( )
+7 -3
View File
@@ -10,8 +10,10 @@ set(LIBSTEPEDITOR_SRCS
mgrnodearray.cc
mgrnodelist.cc
needFunc.cc
s_HEADER_SCHEMA.cc
s_HEADER_SCHEMA.init.cc
SdaiHeaderSchema.cc
SdaiHeaderSchemaAll.cc
SdaiHeaderSchemaInit.cc
SdaiSchemaInit.cc
)
SET(LIBSTEPEDITOR_PRIVATE_HDRS
@@ -25,7 +27,9 @@ SET(LIBSTEPEDITOR_PRIVATE_HDRS
mgrnodearray.h
mgrnodelist.h
needFunc.h
s_HEADER_SCHEMA.h
SdaiHeaderSchema.h
SdaiHeaderSchemaClasses.h
SdaiSchemaInit.h
seeinfodefault.h
)
+51 -201
View File
@@ -23,12 +23,13 @@
**********************************************************************/
#include <iostream>
#include <iterator>
#include <algorithm>
#include <STEPfile.h>
#include <sdai.h>
#include <STEPcomplex.h>
#include <STEPattribute.h>
#include <s_HEADER_SCHEMA.h>
#include <SdaiHeaderSchema.h>
// STEPundefined contains
// void PushPastString (istream& in, std::string &s, ErrorDescriptor *err)
@@ -60,7 +61,6 @@ returns: Severity
parameters: (istream&) The input stream from which the file is read.
description:
This function reads in the header section of an exchange file. It
can read it in either version (N279) or (Part 21, July 1992). It
parses the header section, popluates the _headerInstances, and
returns an error descriptor.
It expects to find the "HEADER;" symbol at the beginning of the
@@ -131,8 +131,10 @@ STEPfile::ReadHeader( istream & in ) {
//create header instance
buf[0] = '\0';
if( _fileType == VERSION_OLD ) {
strcpy( buf, "N279_" );
strncat( buf, const_cast<char *>( keywd.c_str() ), BUFSIZ - 7 );
_error.AppendToDetailMsg( "N279 header detected. Files this old are no longer supported.\n" );
_error.GreaterSeverity( SEVERITY_EXIT );
delete im;
return SEVERITY_EXIT;
} else {
strncpy( buf, const_cast<char *>( keywd.c_str() ), BUFSIZ );
}
@@ -150,9 +152,6 @@ STEPfile::ReadHeader( istream & in ) {
break; //from while loop
} else { //not userDefined
obj = _headerRegistry->ObjCreate( buf );
#ifdef __O3DB__
obj -> persist();
#endif
}
//read header instance
@@ -162,21 +161,14 @@ STEPfile::ReadHeader( istream & in ) {
cerr << "Unable to create header section entity: \'" <<
keywd << "\'.\n\tdata lost: " << strbuf << "\n";
_error.GreaterSeverity( SEVERITY_WARNING );
} else //not ENTITY_NULL
//read the header instance
{
} else { //not ENTITY_NULL
//read the header instance
//check obj's Error Descriptor
objsev = AppendEntityErrorMsg( &( obj->Error() ) );
//set file_id to reflect the appropriate Header Section Entity
switch( _fileType ) {
case VERSION_OLD:
fileid = HeaderIdOld( const_cast<char *>( keywd.c_str() ) );
break;
default:
fileid = HeaderId( const_cast<char *>( keywd.c_str() ) );
break;
}
fileid = HeaderId( keywd );
//read the values from the istream
objsev = obj->STEPread( fileid, 0, ( InstMgr * )0, in );
@@ -199,132 +191,12 @@ STEPfile::ReadHeader( istream & in ) {
cmtStr.clear();
}
if( _fileType == VERSION_OLD ) {
InstMgr * tmp = HeaderConvertToNew( *im );
delete im;
im = tmp;
}
HeaderVerifyInstances( im );
HeaderMergeInstances( im ); // handles delete for im
return _error.severity();
}
/***************************
function: HeaderConvertToNew
returns: (InstMgr*) List of instances of header section entities
which semantically conform to the new version
of the exchange file format.
parameters: (InstMgr&) List of instances of header section entities
which semantically conform to the old version
of the exchange file format.
description:
This function converts the instances of the given InstMgr from the
old STEPfile format to the new file format. The InstMgr must
contain only instances of header section entities, and those entities
must be numbered in a specific way.
OLD FORMAT (N279)
#1=FILE_IDENTIFICATION
#2=FILE_DESCRIPTION
#3=IMP_LEVEL
#4=CLASSIFICATION
#5=MAXSIG
side effects: This function allocates memory for an InstMgr using a
call to the new operator.
It also removes some instances from oldinst.
***************************/
InstMgr *
STEPfile::HeaderConvertToNew( InstMgr & oldinst ) {
InstMgr * imtmp = new InstMgr;
SCLP23( Application_instance )* oldse;
// FILE_NAME <== (N279)FILE_IDENTIFICATION
p21DIS_File_name * fn = 0;
oldse = oldinst.GetApplication_instance( "N279_File_Identification" );
if( oldse == ENTITY_NULL ) {
cerr << "Warning: STEPfile::HeaderConvertToNew. Unable to get " <<
"\'File_Identification\' from header instance manager.\n";
fn = ( p21DIS_File_name * ) HeaderDefaultFileName();
} else {
s_N279_file_identification * fi;
fi = ( s_N279_file_identification * ) oldse;
fn = new p21DIS_File_name;
fn->name( const_cast<char *>( ( fi->file_name() ).c_str() ) ); //STRING <- STRING
fn->time_stamp( const_cast<char *>( ( fi->date() ).c_str() ) ); //STRING <- STRING
//fn->author(fi->author());
//LIST OF STRING <- LIST OF STRING
( fn->author() ).ShallowCopy( fi->author() );
//LIST OF STRING <- LIST OF STRING
( fn->organization() ).ShallowCopy( fi->organization() );
fn->preprocessor_version( const_cast<char *>( ( fi->preprocessor_version() ).c_str() ) ); //STRING
fn->originating_system( const_cast<char *>( ( fi->originating_system() ).c_str() ) ); //STRING
fn->authorisation( "" ); //STRING
fn->STEPfile_id = HeaderId( "File_Name" );
oldinst.Delete( fi );
}
imtmp->Append( fn, completeSE );
// FILE_DESCRIPTION <== (N279)FILE_DESCRIPTION & (N279)IMP_LEVEL
p21DIS_File_description * fd = new p21DIS_File_description;
// Get the (N279) File_Description Instance
oldse = oldinst.GetApplication_instance( "N279_File_Description" );
s_N279_file_description * ofd = ( s_N279_file_description * )oldse;
if( oldse != ENTITY_NULL ) {
// DAVE, is there a new way TODO this?
// copy a SCLP23(String) value into a StringAggregate
const char * tmpstr = const_cast<char *>( ( ofd->description() ).c_str() );
int l = strlen( tmpstr ) + 2;
char * str = new char[l];
str[0] = '\'';
str[1] = '\0';
strncat( str, tmpstr, l );
strncat( str, "\'", l );
StringNode * sn = new StringNode( str );
fd->description().AddNode( sn );
oldinst.Delete( ofd );
delete [] str;
} else {
StringNode * sn = new StringNode( "" );
fd->description().AddNode( sn );
}
// Get the (N279) Imp_Level Instance
oldse = oldinst.GetApplication_instance( "N279_Imp_Level" );
s_N279_imp_level * il = ( s_N279_imp_level * )oldse;
if( oldse != ENTITY_NULL ) {
fd->implementation_level( const_cast<char *>( ( il->implementation_level() ).c_str() ) );
oldinst.Delete( il );
} else {
fd->implementation_level( "" );
}
fd->STEPfile_id = HeaderId( "File_Description" );
imtmp->Append( fd, completeSE );
// FILE_SCHEMA <== default values
// There is no entity for the file_schema in the old version
// Therefore, the schema_identifiers list is left empty
imtmp->Append( HeaderDefaultFileSchema(), completeSE );
//append any extra instances from oldinst onto imtmp
for( int n = oldinst.InstanceCount() - 1; n >= 0; --n ) {
/* imtmp->Append(oldinst.GetApplication_instance(oldinst[n]),completeSE);*/
imtmp->Append( oldinst.GetApplication_instance( oldinst.GetMgrNode( n ) ), completeSE );
}
return imtmp;
}
/***************************
Verify the instances read from the header section of an exchange file.
If some required instances aren't present, then create them,
@@ -380,21 +252,26 @@ STEPfile::HeaderVerifyInstances( InstMgr * im ) {
SCLP23( Application_instance ) *
STEPfile::HeaderDefaultFileName() {
p21DIS_File_name * fn = new p21DIS_File_name;
SdaiFile_name * fn = new SdaiFile_name;
StringAggregate_ptr tmp = new StringAggregate;
fn->name( "" );
fn->time_stamp( "" );
fn->author().StrToVal( "", &_error,
fn->attributes[2].
aDesc -> DomainType(),
_headerInstances );
fn->organization().StrToVal( "", &_error,
fn->attributes[3].
aDesc -> DomainType(),
_headerInstances );
fn->preprocessor_version( "" );
fn->originating_system( "" );
fn->authorisation( "" );
fn->name_( "" );
fn->time_stamp_( "" );
tmp->StrToVal( "", &_error,
fn->attributes[2].
aDesc -> DomainType(),
_headerInstances );
fn->author_(tmp);
tmp->StrToVal( "", &_error,
fn->attributes[3].
aDesc -> DomainType(),
_headerInstances );
fn->organization_(tmp);
fn->preprocessor_version_( "" );
fn->originating_system_( "" );
fn->authorization_( "" );
fn->STEPfile_id = HeaderId( "File_Name" );
@@ -403,9 +280,9 @@ STEPfile::HeaderDefaultFileName() {
SCLP23( Application_instance ) *
STEPfile::HeaderDefaultFileDescription() {
p21DIS_File_description * fd = new p21DIS_File_description;
SdaiFile_description * fd = new SdaiFile_description;
fd->implementation_level( "" );
fd->implementation_level_( "" );
fd->STEPfile_id = HeaderId( "File_Description" );
@@ -414,12 +291,14 @@ STEPfile::HeaderDefaultFileDescription() {
SCLP23( Application_instance ) *
STEPfile::HeaderDefaultFileSchema() {
p21DIS_File_schema * fs = new p21DIS_File_schema;
SdaiFile_schema * fs = new SdaiFile_schema;
StringAggregate_ptr tmp = new StringAggregate;
fs->schema_identifiers().StrToVal( "", &_error,
fs->attributes[0].
aDesc -> DomainType(),
_headerInstances );
tmp->StrToVal( "", &_error,
fs->attributes[0].
aDesc -> DomainType(),
_headerInstances );
fs->schema_identifiers_(tmp);
fs->STEPfile_id = HeaderId( "File_Schema" );
@@ -2030,7 +1909,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
case SEVERITY_BUG:
case SEVERITY_INCOMPLETE:
if( ( _fileType == VERSION_CURRENT ) || ( _fileType == VERSION_OLD ) ) {
if( _fileType == VERSION_CURRENT ) {
cerr << "ERROR in EXCHANGE FILE: incomplete instance #"
<< obj -> STEPfile_id << ".\n";
if( _fileType != WORKING_SESSION ) {
@@ -2201,41 +2080,23 @@ The header section entities must be numbered in the following manner:
#2=FILE_NAME
#3=FILE_SCHEMA
***************************/
int
STEPfile::HeaderId( const char * name ) {
std::string tmp;
if( !( strcmp( ( char * )StrToUpper( name, tmp ), "FILE_DESCRIPTION" ) ) ) {
int STEPfile::HeaderId( const std::string name ) {
std::string tmp = name;
std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::toupper);
if( tmp == "FILE_DESCRIPTION" ) {
return 1;
}
if( !( strcmp( ( char * )StrToUpper( name, tmp ), "FILE_NAME" ) ) ) {
if( tmp == "FILE_NAME" ) {
return 2;
}
if( !( strcmp( ( char * )StrToUpper( name, tmp ), "FILE_SCHEMA" ) ) ) {
if( tmp == "FILE_SCHEMA" ) {
return 3;
}
return ++_headerId;
}
/***************************
***************************/
int STEPfile::HeaderIdOld( const char * name ) {
const char * nms[5];
nms[0] = "FILE_IDENTIFICATION",
nms[1] = "FILE_DESCRIPTION";
nms[2] = "IMP_LEVEL";
nms[3] = "CLASSIFICATION";
nms[4] = "MAXSIG";
std::string tmp;
for( int i = 0; i < 5; ++i ) {
if( !strcmp( ( char * )StrToUpper( name, tmp ), nms[i] ) ) {
return ++i;
}
}
return ++_headerId;
}
/***************************
***************************/
void
@@ -2293,7 +2154,7 @@ STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
}
//set some of the attribute values at time of output
p21DIS_File_name * fn = ( p21DIS_File_name * )se;
SdaiFile_name * fn = ( SdaiFile_name * )se;
/* I'm not sure this is a good idea that Peter did but I'll leave around - DAS
// write time_stamp (as specified in ISO Standard 8601)
@@ -2305,7 +2166,7 @@ STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
struct tm * timeptr = localtime( &t );
char time_buf[26];
strftime( time_buf, 26, "%Y-%m-%dT%H:%M:%S", timeptr );
fn->time_stamp( time_buf );
fn->time_stamp_( time_buf );
//output the values to the file
WriteHeaderInstance( se, out );
@@ -2387,13 +2248,6 @@ STEPfile::AppendFile( istream * in, int useTechCor ) {
strlen( const_cast<char *>( keywd.c_str() ) ) ) ) {
exchange_file = 1;
SetFileType( VERSION_CURRENT );
} else if( !strncmp( const_cast<char *>( keywd.c_str() ), "STEP",
strlen( const_cast<char *>( keywd.c_str() ) ) ) ) {
_error.AppendToUserMsg( "Reading Old Version of exchange file.\n" );
_error.GreaterSeverity( SEVERITY_USERMSG );
exchange_file = 1;
SetFileType( VERSION_OLD );
} else if( !strncmp( const_cast<char *>( keywd.c_str() ), "STEP_WORKING_SESSION",
strlen( const_cast<char *>( keywd.c_str() ) ) ) ) {
exchange_file = 0;
@@ -2408,8 +2262,8 @@ STEPfile::AppendFile( istream * in, int useTechCor ) {
else {
sprintf( errbuf,
"Faulty input at beginning of file. \"ISO-10303-21;\" or"
" \"STEP;\" or \"STEP_WORKING_SESSION;\" expected. File "
"not read: %s\n", ( ( FileName().compare( "-" ) == 0 ) ? "standard input" : FileName().c_str() ) );
" \"STEP_WORKING_SESSION;\" expected. File not read: %s\n",
( ( FileName().compare( "-" ) == 0 ) ? "standard input" : FileName().c_str() ) );
_error.AppendToUserMsg( errbuf );
_error.GreaterSeverity( SEVERITY_INPUT_ERROR );
return SEVERITY_INPUT_ERROR;
@@ -2477,11 +2331,7 @@ STEPfile::AppendFile( istream * in, int useTechCor ) {
switch( _fileType ) {
case VERSION_CURRENT:
case VERSION_OLD:
case VERSION_UNKNOWN:
valid_insts = ReadData2( *in2, useTechCor );
break;
case WORKING_SESSION:
valid_insts = ReadData2( *in2, useTechCor );
break;
+1 -3
View File
@@ -151,13 +151,11 @@ class STEPfile
Severity ReadHeader(istream& in);
InstMgr* HeaderConvertToNew(InstMgr& oldinst);
Severity HeaderVerifyInstances(InstMgr* im);
void HeaderMergeInstances(InstMgr* im);
int HeaderId (int increment =1);
int HeaderId (const char* nm ="\0");
int HeaderIdOld (const char* nm ="\0");
int HeaderId (const std::string name);
int ReadData1 (istream& in); // first pass to create instances
// second pass to read instances
+4 -4
View File
@@ -12,7 +12,7 @@
*/
#include <STEPfile.h>
#include <s_HEADER_SCHEMA.h>
#include <SdaiHeaderSchema.h>
#include <STEPaggregate.h>
#include <cstring>
@@ -275,19 +275,19 @@ char * STEPfile::schemaName( char * schName )
* schName is unset.
*/
{
p21DIS_File_schema * fs;
SdaiFile_schema * fs;
std::string tmp;
STEPnode * n;
if( _headerInstances == NULL ) {
return NULL;
}
fs = ( p21DIS_File_schema * )_headerInstances->GetApplication_instance( "File_Schema" );
fs = ( SdaiFile_schema * )_headerInstances->GetApplication_instance( "File_Schema" );
if( fs == ENTITY_NULL ) {
return NULL;
}
n = ( STEPnode * )fs->schema_identifiers().GetHead();
n = ( STEPnode * )fs->schema_identifiers_()->GetHead();
// (take the first one)
if( n == NULL ) {
return NULL;
+683
View File
@@ -0,0 +1,683 @@
#ifndef SDAIHEADER_SECTION_SCHEMA_CC
#define SDAIHEADER_SECTION_SCHEMA_CC
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
#ifdef SCL_LOGGING
#include <fstream.h>
extern ofstream *logStream;
#define SCLLOGFILE "scl.log"
#endif
#include <ExpDict.h>
#include <STEPattribute.h>
#include <SdaiHeaderSchema.h>
Schema *s_header_section_schema =0;
/* ************** TYPES */
TypeDescriptor *header_section_schemat_time_stamp_text;
TypeDescriptor *header_section_schemat_section_name;
TypeDescriptor *header_section_schemat_context_name;
TypeDescriptor *header_section_schemat_schema_name;
TypeDescriptor *header_section_schemat_language_name;
TypeDescriptor *header_section_schemat_exchange_structure_identifier;
/* ************** ENTITIES */
///////// ENTITY section_language
EntityDescriptor *header_section_schemae_section_language =0;
AttrDescriptor *a_0section =0;
AttrDescriptor *a_1default_language =0;
SdaiSection_language::SdaiSection_language( )
{
/* no SuperTypes */
eDesc = header_section_schemae_section_language;
STEPattribute *a = new STEPattribute(*a_0section, &_section);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_1default_language, &_default_language);
a -> set_null ();
attributes.push (a);
}
SdaiSection_language::SdaiSection_language (SdaiSection_language& e )
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
SdaiSection_language::~SdaiSection_language () { }
SdaiSection_language::SdaiSection_language( SCLP23(Application_instance) *se, int *addAttrs)
{
/* Set this to point to the head entity. */
HeadEntity(se);
/* no SuperTypes */
eDesc = header_section_schemae_section_language;
STEPattribute *a = new STEPattribute(*a_0section, &_section);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_1default_language, &_default_language);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
}
const SdaiSection_name
SdaiSection_language::section_() const
{
return (const SdaiSection_name) _section;
}
void
SdaiSection_language::section_ (const SdaiSection_name x)
{
_section = x;
}
const SdaiLanguage_name
SdaiSection_language::default_language_() const
{
return (const SdaiLanguage_name) _default_language;
}
void
SdaiSection_language::default_language_ (const SdaiLanguage_name x)
{
_default_language = x;
}
///////// END_ENTITY section_language
///////// ENTITY file_population
EntityDescriptor *header_section_schemae_file_population =0;
AttrDescriptor *a_2governing_schema =0;
AttrDescriptor *a_3determination_method =0;
AttrDescriptor *a_4governed_sections =0;
SdaiFile_population::SdaiFile_population( )
{
/* no SuperTypes */
eDesc = header_section_schemae_file_population;
STEPattribute *a = new STEPattribute(*a_2governing_schema, &_governing_schema);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_3determination_method, &_determination_method);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_4governed_sections, &_governed_sections);
a -> set_null ();
attributes.push (a);
}
SdaiFile_population::SdaiFile_population (SdaiFile_population& e )
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
SdaiFile_population::~SdaiFile_population () { }
SdaiFile_population::SdaiFile_population( SCLP23(Application_instance) *se, int *addAttrs)
{
/* Set this to point to the head entity. */
HeadEntity(se);
/* no SuperTypes */
eDesc = header_section_schemae_file_population;
STEPattribute *a = new STEPattribute(*a_2governing_schema, &_governing_schema);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_3determination_method, &_determination_method);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_4governed_sections, &_governed_sections);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
}
const SdaiSchema_name
SdaiFile_population::governing_schema_() const
{
return (const SdaiSchema_name) _governing_schema;
}
void
SdaiFile_population::governing_schema_ (const SdaiSchema_name x)
{
_governing_schema = x;
}
const SdaiExchange_structure_identifier
SdaiFile_population::determination_method_() const
{
return (const SdaiExchange_structure_identifier) _determination_method;
}
void
SdaiFile_population::determination_method_ (const SdaiExchange_structure_identifier x)
{
_determination_method = x;
}
const StringAggregate_ptr
SdaiFile_population::governed_sections_() const
{
return (StringAggregate_ptr) &_governed_sections;
}
void
SdaiFile_population::governed_sections_ (const StringAggregate_ptr x)
{ _governed_sections.ShallowCopy (*x); }
///////// END_ENTITY file_population
///////// ENTITY file_name
EntityDescriptor *header_section_schemae_file_name =0;
AttrDescriptor *a_5name =0;
AttrDescriptor *a_6time_stamp =0;
AttrDescriptor *a_7author =0;
AttrDescriptor *a_8organization =0;
AttrDescriptor *a_9preprocessor_version =0;
AttrDescriptor *a_10originating_system =0;
AttrDescriptor *a_11authorization =0;
SdaiFile_name::SdaiFile_name( )
{
/* no SuperTypes */
eDesc = header_section_schemae_file_name;
STEPattribute *a = new STEPattribute(*a_5name, &_name);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_6time_stamp, &_time_stamp);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_7author, &_author);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_8organization, &_organization);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_9preprocessor_version, &_preprocessor_version);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_10originating_system, &_originating_system);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_11authorization, &_authorization);
a -> set_null ();
attributes.push (a);
}
SdaiFile_name::SdaiFile_name (SdaiFile_name& e )
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
SdaiFile_name::~SdaiFile_name () { }
SdaiFile_name::SdaiFile_name( SCLP23(Application_instance) *se, int *addAttrs)
{
/* Set this to point to the head entity. */
HeadEntity(se);
/* no SuperTypes */
eDesc = header_section_schemae_file_name;
STEPattribute *a = new STEPattribute(*a_5name, &_name);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_6time_stamp, &_time_stamp);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_7author, &_author);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_8organization, &_organization);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_9preprocessor_version, &_preprocessor_version);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_10originating_system, &_originating_system);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_11authorization, &_authorization);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
}
const SCLP23(String)
SdaiFile_name::name_() const
{
return (const SCLP23(String)) _name;
}
void
SdaiFile_name::name_ (const SCLP23(String) x)
{
_name = x;
}
const SdaiTime_stamp_text
SdaiFile_name::time_stamp_() const
{
return (const SdaiTime_stamp_text) _time_stamp;
}
void
SdaiFile_name::time_stamp_ (const SdaiTime_stamp_text x)
{
_time_stamp = x;
}
const StringAggregate_ptr
SdaiFile_name::author_() const
{
return (StringAggregate_ptr) &_author;
}
void
SdaiFile_name::author_ (const StringAggregate_ptr x)
{ _author.ShallowCopy (*x); }
const StringAggregate_ptr
SdaiFile_name::organization_() const
{
return (StringAggregate_ptr) &_organization;
}
void
SdaiFile_name::organization_ (const StringAggregate_ptr x)
{ _organization.ShallowCopy (*x); }
const SCLP23(String)
SdaiFile_name::preprocessor_version_() const
{
return (const SCLP23(String)) _preprocessor_version;
}
void
SdaiFile_name::preprocessor_version_ (const SCLP23(String) x)
{
_preprocessor_version = x;
}
const SCLP23(String)
SdaiFile_name::originating_system_() const
{
return (const SCLP23(String)) _originating_system;
}
void
SdaiFile_name::originating_system_ (const SCLP23(String) x)
{
_originating_system = x;
}
const SCLP23(String)
SdaiFile_name::authorization_() const
{
return (const SCLP23(String)) _authorization;
}
void
SdaiFile_name::authorization_ (const SCLP23(String) x)
{
_authorization = x;
}
///////// END_ENTITY file_name
///////// ENTITY section_context
EntityDescriptor *header_section_schemae_section_context =0;
AttrDescriptor *a_12section =0;
AttrDescriptor *a_13context_identifiers =0;
SdaiSection_context::SdaiSection_context( )
{
/* no SuperTypes */
eDesc = header_section_schemae_section_context;
STEPattribute *a = new STEPattribute(*a_12section, &_section);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_13context_identifiers, &_context_identifiers);
a -> set_null ();
attributes.push (a);
}
SdaiSection_context::SdaiSection_context (SdaiSection_context& e )
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
SdaiSection_context::~SdaiSection_context () { }
SdaiSection_context::SdaiSection_context( SCLP23(Application_instance) *se, int *addAttrs)
{
/* Set this to point to the head entity. */
HeadEntity(se);
/* no SuperTypes */
eDesc = header_section_schemae_section_context;
STEPattribute *a = new STEPattribute(*a_12section, &_section);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_13context_identifiers, &_context_identifiers);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
}
const SdaiSection_name
SdaiSection_context::section_() const
{
return (const SdaiSection_name) _section;
}
void
SdaiSection_context::section_ (const SdaiSection_name x)
{
_section = x;
}
const StringAggregate_ptr
SdaiSection_context::context_identifiers_() const
{
return (StringAggregate_ptr) &_context_identifiers;
}
void
SdaiSection_context::context_identifiers_ (const StringAggregate_ptr x)
{ _context_identifiers.ShallowCopy (*x); }
///////// END_ENTITY section_context
///////// ENTITY file_description
EntityDescriptor *header_section_schemae_file_description =0;
AttrDescriptor *a_14description =0;
AttrDescriptor *a_15implementation_level =0;
SdaiFile_description::SdaiFile_description( )
{
/* no SuperTypes */
eDesc = header_section_schemae_file_description;
STEPattribute *a = new STEPattribute(*a_14description, &_description);
a -> set_null ();
attributes.push (a);
a = new STEPattribute(*a_15implementation_level, &_implementation_level);
a -> set_null ();
attributes.push (a);
}
SdaiFile_description::SdaiFile_description (SdaiFile_description& e )
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
SdaiFile_description::~SdaiFile_description () { }
SdaiFile_description::SdaiFile_description( SCLP23(Application_instance) *se, int *addAttrs)
{
/* Set this to point to the head entity. */
HeadEntity(se);
/* no SuperTypes */
eDesc = header_section_schemae_file_description;
STEPattribute *a = new STEPattribute(*a_14description, &_description);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
a = new STEPattribute(*a_15implementation_level, &_implementation_level);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
}
const StringAggregate_ptr
SdaiFile_description::description_() const
{
return (StringAggregate_ptr) &_description;
}
void
SdaiFile_description::description_ (const StringAggregate_ptr x)
{ _description.ShallowCopy (*x); }
const SCLP23(String)
SdaiFile_description::implementation_level_() const
{
return (const SCLP23(String)) _implementation_level;
}
void
SdaiFile_description::implementation_level_ (const SCLP23(String) x)
{
_implementation_level = x;
}
///////// END_ENTITY file_description
///////// ENTITY file_schema
EntityDescriptor *header_section_schemae_file_schema =0;
AttrDescriptor *a_16schema_identifiers =0;
SdaiFile_schema::SdaiFile_schema( )
{
/* no SuperTypes */
eDesc = header_section_schemae_file_schema;
STEPattribute *a = new STEPattribute(*a_16schema_identifiers, &_schema_identifiers);
a -> set_null ();
attributes.push (a);
}
SdaiFile_schema::SdaiFile_schema (SdaiFile_schema& e )
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
SdaiFile_schema::~SdaiFile_schema () { }
SdaiFile_schema::SdaiFile_schema( SCLP23(Application_instance) *se, int *addAttrs)
{
/* Set this to point to the head entity. */
HeadEntity(se);
/* no SuperTypes */
eDesc = header_section_schemae_file_schema;
STEPattribute *a = new STEPattribute(*a_16schema_identifiers, &_schema_identifiers);
a -> set_null ();
/* Put attribute on this class' attributes list so the */
/*access functions still work. */
attributes.push (a);
/* Put attribute on the attributes list for the */
/* main inheritance heirarchy. */
if(!addAttrs || addAttrs[0])
se->attributes.push (a);
}
const StringAggregate_ptr
SdaiFile_schema::schema_identifiers_() const
{
return (StringAggregate_ptr) &_schema_identifiers;
}
void
SdaiFile_schema::schema_identifiers_ (const StringAggregate_ptr x)
{ _schema_identifiers.ShallowCopy (*x); }
///////// END_ENTITY file_schema
SCLP23(Model_contents_ptr) create_SdaiModel_contents_header_section_schema()
{ return new SdaiModel_contents_header_section_schema ; }
SdaiModel_contents_header_section_schema::SdaiModel_contents_header_section_schema()
{
SCLP23(Entity_extent_ptr) eep = (SCLP23(Entity_extent_ptr))0;
eep = new SCLP23(Entity_extent);
eep->definition_(header_section_schemae_section_language);
_folders.Append(eep);
eep = new SCLP23(Entity_extent);
eep->definition_(header_section_schemae_file_population);
_folders.Append(eep);
eep = new SCLP23(Entity_extent);
eep->definition_(header_section_schemae_file_name);
_folders.Append(eep);
eep = new SCLP23(Entity_extent);
eep->definition_(header_section_schemae_section_context);
_folders.Append(eep);
eep = new SCLP23(Entity_extent);
eep->definition_(header_section_schemae_file_description);
_folders.Append(eep);
eep = new SCLP23(Entity_extent);
eep->definition_(header_section_schemae_file_schema);
_folders.Append(eep);
}
SdaiSection_language__set_var SdaiModel_contents_header_section_schema::SdaiSection_language_get_extents()
{
return (SdaiSection_language__set_var)((_folders.retrieve(0))->instances_());
}
SdaiFile_population__set_var SdaiModel_contents_header_section_schema::SdaiFile_population_get_extents()
{
return (SdaiFile_population__set_var)((_folders.retrieve(1))->instances_());
}
SdaiFile_name__set_var SdaiModel_contents_header_section_schema::SdaiFile_name_get_extents()
{
return (SdaiFile_name__set_var)((_folders.retrieve(2))->instances_());
}
SdaiSection_context__set_var SdaiModel_contents_header_section_schema::SdaiSection_context_get_extents()
{
return (SdaiSection_context__set_var)((_folders.retrieve(3))->instances_());
}
SdaiFile_description__set_var SdaiModel_contents_header_section_schema::SdaiFile_description_get_extents()
{
return (SdaiFile_description__set_var)((_folders.retrieve(4))->instances_());
}
SdaiFile_schema__set_var SdaiModel_contents_header_section_schema::SdaiFile_schema_get_extents()
{
return (SdaiFile_schema__set_var)((_folders.retrieve(5))->instances_());
}
#endif
+252
View File
@@ -0,0 +1,252 @@
#ifndef SDAIHEADER_SECTION_SCHEMA_H
#define SDAIHEADER_SECTION_SCHEMA_H
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
#include <sdai.h>
#include <Registry.h>
#include <STEPaggregate.h>
#include <SdaiHeaderSchemaClasses.h>
#include <SdaiSchemaInit.h>
///////// ENTITY section_language
extern AttrDescriptor *a_0section;
extern AttrDescriptor *a_1default_language;
class SdaiSection_language : public SCLP23(Application_instance) {
protected:
SCLP23(String) _section ; // OPTIONAL
SCLP23(String) _default_language ;
public:
SdaiSection_language ( );
SdaiSection_language (SCLP23(Application_instance) *se, int *addAttrs = 0);
SdaiSection_language (SdaiSection_language& e );
~SdaiSection_language ();
int opcode () { return 0 ; }
const SdaiSection_name section_() const;
void section_ (const SdaiSection_name x);
const SdaiLanguage_name default_language_() const;
void default_language_ (const SdaiLanguage_name x);
};
inline SdaiSection_language *
create_SdaiSection_language () { return new SdaiSection_language ; }
///////// END_ENTITY section_language
///////// ENTITY file_population
extern AttrDescriptor *a_2governing_schema;
extern AttrDescriptor *a_3determination_method;
extern AttrDescriptor *a_4governed_sections;
class SdaiFile_population : public SCLP23(Application_instance) {
protected:
SCLP23(String) _governing_schema ;
SCLP23(String) _determination_method ;
StringAggregate _governed_sections ; // OPTIONAL // of section_name
public:
SdaiFile_population ( );
SdaiFile_population (SCLP23(Application_instance) *se, int *addAttrs = 0);
SdaiFile_population (SdaiFile_population& e );
~SdaiFile_population ();
int opcode () { return 1 ; }
const SdaiSchema_name governing_schema_() const;
void governing_schema_ (const SdaiSchema_name x);
const SdaiExchange_structure_identifier determination_method_() const;
void determination_method_ (const SdaiExchange_structure_identifier x);
const StringAggregate_ptr governed_sections_() const;
void governed_sections_ (const StringAggregate_ptr x);
};
inline SdaiFile_population *
create_SdaiFile_population () { return new SdaiFile_population ; }
///////// END_ENTITY file_population
///////// ENTITY file_name
extern AttrDescriptor *a_5name;
extern AttrDescriptor *a_6time_stamp;
extern AttrDescriptor *a_7author;
extern AttrDescriptor *a_8organization;
extern AttrDescriptor *a_9preprocessor_version;
extern AttrDescriptor *a_10originating_system;
extern AttrDescriptor *a_11authorization;
class SdaiFile_name : public SCLP23(Application_instance) {
protected:
SCLP23(String) _name ;
SCLP23(String) _time_stamp ;
StringAggregate _author ;
StringAggregate _organization ;
SCLP23(String) _preprocessor_version ;
SCLP23(String) _originating_system ;
SCLP23(String) _authorization ;
public:
SdaiFile_name ( );
SdaiFile_name (SCLP23(Application_instance) *se, int *addAttrs = 0);
SdaiFile_name (SdaiFile_name& e );
~SdaiFile_name ();
int opcode () { return 2 ; }
const SCLP23(String) name_() const;
void name_ (const SCLP23(String) x);
const SdaiTime_stamp_text time_stamp_() const;
void time_stamp_ (const SdaiTime_stamp_text x);
const StringAggregate_ptr author_() const;
void author_ (const StringAggregate_ptr x);
const StringAggregate_ptr organization_() const;
void organization_ (const StringAggregate_ptr x);
const SCLP23(String) preprocessor_version_() const;
void preprocessor_version_ (const SCLP23(String) x);
const SCLP23(String) originating_system_() const;
void originating_system_ (const SCLP23(String) x);
const SCLP23(String) authorization_() const;
void authorization_ (const SCLP23(String) x);
};
inline SdaiFile_name *
create_SdaiFile_name () { return new SdaiFile_name ; }
///////// END_ENTITY file_name
///////// ENTITY section_context
extern AttrDescriptor *a_12section;
extern AttrDescriptor *a_13context_identifiers;
class SdaiSection_context : public SCLP23(Application_instance) {
protected:
SCLP23(String) _section ; // OPTIONAL
StringAggregate _context_identifiers ; // of context_name
public:
SdaiSection_context ( );
SdaiSection_context (SCLP23(Application_instance) *se, int *addAttrs = 0);
SdaiSection_context (SdaiSection_context& e );
~SdaiSection_context ();
int opcode () { return 3 ; }
const SdaiSection_name section_() const;
void section_ (const SdaiSection_name x);
const StringAggregate_ptr context_identifiers_() const;
void context_identifiers_ (const StringAggregate_ptr x);
};
inline SdaiSection_context *
create_SdaiSection_context () { return new SdaiSection_context ; }
///////// END_ENTITY section_context
///////// ENTITY file_description
extern AttrDescriptor *a_14description;
extern AttrDescriptor *a_15implementation_level;
class SdaiFile_description : public SCLP23(Application_instance) {
protected:
StringAggregate _description ;
SCLP23(String) _implementation_level ;
public:
SdaiFile_description ( );
SdaiFile_description (SCLP23(Application_instance) *se, int *addAttrs = 0);
SdaiFile_description (SdaiFile_description& e );
~SdaiFile_description ();
int opcode () { return 4 ; }
const StringAggregate_ptr description_() const;
void description_ (const StringAggregate_ptr x);
const SCLP23(String) implementation_level_() const;
void implementation_level_ (const SCLP23(String) x);
};
inline SdaiFile_description *
create_SdaiFile_description () { return new SdaiFile_description ; }
///////// END_ENTITY file_description
///////// ENTITY file_schema
extern AttrDescriptor *a_16schema_identifiers;
class SdaiFile_schema : public SCLP23(Application_instance) {
protected:
StringAggregate _schema_identifiers ; // of schema_name
public:
SdaiFile_schema ( );
SdaiFile_schema (SCLP23(Application_instance) *se, int *addAttrs = 0);
SdaiFile_schema (SdaiFile_schema& e );
~SdaiFile_schema ();
int opcode () { return 5 ; }
const StringAggregate_ptr schema_identifiers_() const;
void schema_identifiers_ (const StringAggregate_ptr x);
};
inline SdaiFile_schema *
create_SdaiFile_schema () { return new SdaiFile_schema ; }
///////// END_ENTITY file_schema
// ***** generate Model related pieces
class SdaiModel_contents_header_section_schema : public SCLP23(Model_contents) {
public:
SdaiModel_contents_header_section_schema();
SdaiSection_language__set_var SdaiSection_language_get_extents();
SdaiFile_population__set_var SdaiFile_population_get_extents();
SdaiFile_name__set_var SdaiFile_name_get_extents();
SdaiSection_context__set_var SdaiSection_context_get_extents();
SdaiFile_description__set_var SdaiFile_description_get_extents();
SdaiFile_schema__set_var SdaiFile_schema_get_extents();
};
typedef SdaiModel_contents_header_section_schema * SdaiModel_contents_header_section_schema_ptr;
typedef SdaiModel_contents_header_section_schema_ptr SdaiModel_contents_header_section_schema_var;
SCLP23(Model_contents_ptr) create_SdaiModel_contents_header_section_schema();
#endif
+91
View File
@@ -0,0 +1,91 @@
#ifndef SDAIHEADER_SECTION_SCHEMA_ALL_CC
#define SDAIHEADER_SECTION_SCHEMA_ALL_CC
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
#include <SdaiHeaderSchema.h>
void HeaderInitSchemasAndEnts (Registry & reg) {
Uniqueness_rule_ptr ur;
// Schema: SdaiHEADER_SECTION_SCHEMA
s_header_section_schema = new Schema("Header_Section_Schema");
s_header_section_schema->AssignModelContentsCreator(
(ModelContentsCreator) create_SdaiModel_contents_header_section_schema);
reg.AddSchema (*s_header_section_schema);
// ***** Initialize the Types
header_section_schemat_time_stamp_text = new TypeDescriptor (
"Time_Stamp_Text", // Name
sdaiSTRING, // FundamentalType
s_header_section_schema, // Originating Schema
"STRING (256)"); // Description
s_header_section_schema->AddType(header_section_schemat_time_stamp_text);
header_section_schemat_section_name = new TypeDescriptor (
"Section_Name", // Name
REFERENCE_TYPE, // FundamentalType
s_header_section_schema, // Originating Schema
"exchange_structure_identifier"); // Description
s_header_section_schema->AddType(header_section_schemat_section_name);
header_section_schemat_context_name = new TypeDescriptor (
"Context_Name", // Name
sdaiSTRING, // FundamentalType
s_header_section_schema, // Originating Schema
"STRING"); // Description
s_header_section_schema->AddType(header_section_schemat_context_name);
header_section_schemat_schema_name = new TypeDescriptor (
"Schema_Name", // Name
sdaiSTRING, // FundamentalType
s_header_section_schema, // Originating Schema
"STRING (1024)"); // Description
s_header_section_schema->AddType(header_section_schemat_schema_name);
header_section_schemat_language_name = new TypeDescriptor (
"Language_Name", // Name
REFERENCE_TYPE, // FundamentalType
s_header_section_schema, // Originating Schema
"exchange_structure_identifier"); // Description
s_header_section_schema->AddType(header_section_schemat_language_name);
header_section_schemat_exchange_structure_identifier = new TypeDescriptor (
"Exchange_Structure_Identifier", // Name
sdaiSTRING, // FundamentalType
s_header_section_schema, // Originating Schema
"STRING"); // Description
s_header_section_schema->AddType(header_section_schemat_exchange_structure_identifier);
// ***** Initialize the Entities
header_section_schemae_section_language = new EntityDescriptor(
"Section_Language", s_header_section_schema, LFalse, LFalse,
(Creator) create_SdaiSection_language );
s_header_section_schema->AddEntity(header_section_schemae_section_language);
header_section_schemae_section_language->_uniqueness_rules = new Uniqueness_rule__set;
ur = new Uniqueness_rule("UR1 : section;\n");
header_section_schemae_section_language->_uniqueness_rules->Append(ur);
header_section_schemae_file_population = new EntityDescriptor(
"File_Population", s_header_section_schema, LFalse, LFalse,
(Creator) create_SdaiFile_population );
s_header_section_schema->AddEntity(header_section_schemae_file_population);
header_section_schemae_file_name = new EntityDescriptor(
"File_Name", s_header_section_schema, LFalse, LFalse,
(Creator) create_SdaiFile_name );
s_header_section_schema->AddEntity(header_section_schemae_file_name);
header_section_schemae_section_context = new EntityDescriptor(
"Section_Context", s_header_section_schema, LFalse, LFalse,
(Creator) create_SdaiSection_context );
s_header_section_schema->AddEntity(header_section_schemae_section_context);
header_section_schemae_section_context->_uniqueness_rules = new Uniqueness_rule__set;
ur = new Uniqueness_rule("UR1 : section;\n");
header_section_schemae_section_context->_uniqueness_rules->Append(ur);
header_section_schemae_file_description = new EntityDescriptor(
"File_Description", s_header_section_schema, LFalse, LFalse,
(Creator) create_SdaiFile_description );
s_header_section_schema->AddEntity(header_section_schemae_file_description);
header_section_schemae_file_schema = new EntityDescriptor(
"File_Schema", s_header_section_schema, LFalse, LFalse,
(Creator) create_SdaiFile_schema );
s_header_section_schema->AddEntity(header_section_schemae_file_schema);
//////////////// USE statements
//////////////// REFERENCE statements
}
#endif
+73
View File
@@ -0,0 +1,73 @@
#ifndef SDAI_HEADER_SECTION_SCHEMA_CLASSES_H
#define SDAI_HEADER_SECTION_SCHEMA_CLASSES_H
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
// Schema: SdaiHEADER_SECTION_SCHEMA
extern Schema * s_header_section_schema;
// Types:
typedef SCLP23(String) SdaiTime_stamp_text;
extern TypeDescriptor *header_section_schemat_time_stamp_text;
typedef SCLP23(String) SdaiSection_name;
extern TypeDescriptor *header_section_schemat_section_name;
typedef SCLP23(String) SdaiContext_name;
extern TypeDescriptor *header_section_schemat_context_name;
typedef SCLP23(String) SdaiSchema_name;
extern TypeDescriptor *header_section_schemat_schema_name;
typedef SCLP23(String) SdaiLanguage_name;
extern TypeDescriptor *header_section_schemat_language_name;
typedef SCLP23(String) SdaiExchange_structure_identifier;
extern TypeDescriptor *header_section_schemat_exchange_structure_identifier;
// Entities:
class SdaiSection_language;
typedef SdaiSection_language * SdaiSection_languageH;
typedef SdaiSection_language * SdaiSection_language_ptr;
typedef SdaiSection_language_ptr SdaiSection_language_var;
#define SdaiSection_language__set SCLP23(DAObject__set)
#define SdaiSection_language__set_var SCLP23(DAObject__set_var)
extern EntityDescriptor *header_section_schemae_section_language;
class SdaiFile_population;
typedef SdaiFile_population * SdaiFile_populationH;
typedef SdaiFile_population * SdaiFile_population_ptr;
typedef SdaiFile_population_ptr SdaiFile_population_var;
#define SdaiFile_population__set SCLP23(DAObject__set)
#define SdaiFile_population__set_var SCLP23(DAObject__set_var)
extern EntityDescriptor *header_section_schemae_file_population;
class SdaiFile_name;
typedef SdaiFile_name * SdaiFile_nameH;
typedef SdaiFile_name * SdaiFile_name_ptr;
typedef SdaiFile_name_ptr SdaiFile_name_var;
#define SdaiFile_name__set SCLP23(DAObject__set)
#define SdaiFile_name__set_var SCLP23(DAObject__set_var)
extern EntityDescriptor *header_section_schemae_file_name;
class SdaiSection_context;
typedef SdaiSection_context * SdaiSection_contextH;
typedef SdaiSection_context * SdaiSection_context_ptr;
typedef SdaiSection_context_ptr SdaiSection_context_var;
#define SdaiSection_context__set SCLP23(DAObject__set)
#define SdaiSection_context__set_var SCLP23(DAObject__set_var)
extern EntityDescriptor *header_section_schemae_section_context;
class SdaiFile_description;
typedef SdaiFile_description * SdaiFile_descriptionH;
typedef SdaiFile_description * SdaiFile_description_ptr;
typedef SdaiFile_description_ptr SdaiFile_description_var;
#define SdaiFile_description__set SCLP23(DAObject__set)
#define SdaiFile_description__set_var SCLP23(DAObject__set_var)
extern EntityDescriptor *header_section_schemae_file_description;
class SdaiFile_schema;
typedef SdaiFile_schema * SdaiFile_schemaH;
typedef SdaiFile_schema * SdaiFile_schema_ptr;
typedef SdaiFile_schema_ptr SdaiFile_schema_var;
#define SdaiFile_schema__set SCLP23(DAObject__set)
#define SdaiFile_schema__set_var SCLP23(DAObject__set_var)
extern EntityDescriptor *header_section_schemae_file_schema;
#endif
+186
View File
@@ -0,0 +1,186 @@
#ifndef SDAIHEADER_SECTION_SCHEMA_INIT_CC
#define SDAIHEADER_SECTION_SCHEMA_INIT_CC
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
#include <Registry.h>
#include <ExpDict.h>
#include <STEPattribute.h>
#include <SdaiHeaderSchema.h>
void SdaiHEADER_SECTION_SCHEMAInit (Registry& reg)
{
header_section_schemat_time_stamp_text->ReferentType(t_sdaiSTRING);
reg.AddType (*header_section_schemat_time_stamp_text);
header_section_schemat_section_name->ReferentType(header_section_schemat_exchange_structure_identifier);
reg.AddType (*header_section_schemat_section_name);
header_section_schemat_context_name->ReferentType(t_sdaiSTRING);
reg.AddType (*header_section_schemat_context_name);
header_section_schemat_schema_name->ReferentType(t_sdaiSTRING);
reg.AddType (*header_section_schemat_schema_name);
header_section_schemat_language_name->ReferentType(header_section_schemat_exchange_structure_identifier);
reg.AddType (*header_section_schemat_language_name);
header_section_schemat_exchange_structure_identifier->ReferentType(t_sdaiSTRING);
reg.AddType (*header_section_schemat_exchange_structure_identifier);
///////// ENTITY section_language
a_0section =
new AttrDescriptor("section",header_section_schemat_section_name,
LTrue,LTrue, AttrType_Explicit,
*header_section_schemae_section_language);
header_section_schemae_section_language->AddExplicitAttr (a_0section);
a_1default_language =
new AttrDescriptor("default_language",header_section_schemat_language_name,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_section_language);
header_section_schemae_section_language->AddExplicitAttr (a_1default_language);
reg.AddEntity (*header_section_schemae_section_language);
///////// END_ENTITY section_language
///////// ENTITY file_population
a_2governing_schema =
new AttrDescriptor("governing_schema",header_section_schemat_schema_name,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_population);
header_section_schemae_file_population->AddExplicitAttr (a_2governing_schema);
a_3determination_method =
new AttrDescriptor("determination_method",header_section_schemat_exchange_structure_identifier,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_population);
header_section_schemae_file_population->AddExplicitAttr (a_3determination_method);
SetTypeDescriptor * t_0 = new SetTypeDescriptor;
t_0->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
t_0->Bound1(1);
t_0->Bound2(2147483647);
t_0->FundamentalType(SET_TYPE);
t_0->Description("SET [1:?] OF section_name");
t_0->OriginatingSchema(s_header_section_schema);
t_0->ReferentType(header_section_schemat_section_name);
a_4governed_sections =
new AttrDescriptor("governed_sections",t_0,LTrue,LFalse, AttrType_Explicit,
*header_section_schemae_file_population);
header_section_schemae_file_population->AddExplicitAttr (a_4governed_sections);
reg.AddEntity (*header_section_schemae_file_population);
///////// END_ENTITY file_population
///////// ENTITY file_name
a_5name =
new AttrDescriptor("name",t_sdaiSTRING,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_5name);
a_6time_stamp =
new AttrDescriptor("time_stamp",header_section_schemat_time_stamp_text,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_6time_stamp);
ListTypeDescriptor * t_1 = new ListTypeDescriptor;
t_1->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
t_1->Bound1(1);
t_1->Bound2(2147483647);
t_1->FundamentalType(LIST_TYPE);
t_1->Description("LIST [1:?] OF STRING (256)");
t_1->OriginatingSchema(s_header_section_schema);
t_1->ReferentType(t_sdaiSTRING);
a_7author =
new AttrDescriptor("author",t_1,LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_7author);
ListTypeDescriptor * t_2 = new ListTypeDescriptor;
t_2->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
t_2->Bound1(1);
t_2->Bound2(2147483647);
t_2->FundamentalType(LIST_TYPE);
t_2->Description("LIST [1:?] OF STRING (256)");
t_2->OriginatingSchema(s_header_section_schema);
t_2->ReferentType(t_sdaiSTRING);
a_8organization =
new AttrDescriptor("organization",t_2,LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_8organization);
a_9preprocessor_version =
new AttrDescriptor("preprocessor_version",t_sdaiSTRING,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_9preprocessor_version);
a_10originating_system =
new AttrDescriptor("originating_system",t_sdaiSTRING,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_10originating_system);
a_11authorization =
new AttrDescriptor("authorization",t_sdaiSTRING,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_name);
header_section_schemae_file_name->AddExplicitAttr (a_11authorization);
reg.AddEntity (*header_section_schemae_file_name);
///////// END_ENTITY file_name
///////// ENTITY section_context
a_12section =
new AttrDescriptor("section",header_section_schemat_section_name,
LTrue,LTrue, AttrType_Explicit,
*header_section_schemae_section_context);
header_section_schemae_section_context->AddExplicitAttr (a_12section);
ListTypeDescriptor * t_3 = new ListTypeDescriptor;
t_3->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
t_3->Bound1(1);
t_3->Bound2(2147483647);
t_3->FundamentalType(LIST_TYPE);
t_3->Description("LIST [1:?] OF context_name");
t_3->OriginatingSchema(s_header_section_schema);
t_3->ReferentType(header_section_schemat_context_name);
a_13context_identifiers =
new AttrDescriptor("context_identifiers",t_3,LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_section_context);
header_section_schemae_section_context->AddExplicitAttr (a_13context_identifiers);
reg.AddEntity (*header_section_schemae_section_context);
///////// END_ENTITY section_context
///////// ENTITY file_description
ListTypeDescriptor * t_4 = new ListTypeDescriptor;
t_4->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
t_4->Bound1(1);
t_4->Bound2(2147483647);
t_4->FundamentalType(LIST_TYPE);
t_4->Description("LIST [1:?] OF STRING (256)");
t_4->OriginatingSchema(s_header_section_schema);
t_4->ReferentType(t_sdaiSTRING);
a_14description =
new AttrDescriptor("description",t_4,LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_description);
header_section_schemae_file_description->AddExplicitAttr (a_14description);
a_15implementation_level =
new AttrDescriptor("implementation_level",t_sdaiSTRING,
LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_description);
header_section_schemae_file_description->AddExplicitAttr (a_15implementation_level);
reg.AddEntity (*header_section_schemae_file_description);
///////// END_ENTITY file_description
///////// ENTITY file_schema
ListTypeDescriptor * t_5 = new ListTypeDescriptor;
t_5->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
t_5->Bound1(1);
t_5->Bound2(2147483647);
t_5->UniqueElements(LTrue);
t_5->FundamentalType(LIST_TYPE);
t_5->Description("LIST [1:?] OF UNIQUE schema_name");
t_5->OriginatingSchema(s_header_section_schema);
t_5->ReferentType(header_section_schemat_schema_name);
a_16schema_identifiers =
new AttrDescriptor("schema_identifiers",t_5,LFalse,LFalse, AttrType_Explicit,
*header_section_schemae_file_schema);
header_section_schemae_file_schema->AddExplicitAttr (a_16schema_identifiers);
reg.AddEntity (*header_section_schemae_file_schema);
///////// END_ENTITY file_schema
}
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef SDAIHEADER_SECTION_SCHEMA_SCHEMA_CC
#define SDAIHEADER_SECTION_SCHEMA_SCHEMA_CC
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
#include <SdaiSchemaInit.h>
void HeaderSchemaInit (Registry & reg) {
HeaderInitSchemasAndEnts (reg);
SdaiHEADER_SECTION_SCHEMAInit (reg);
reg.SetCompCollect( 0 );
}
#endif
+26
View File
@@ -0,0 +1,26 @@
#ifndef SDAIHEADER_SECTION_SCHEMA_SCHEMA_H
#define SDAIHEADER_SECTION_SCHEMA_SCHEMA_H
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
#ifdef SCL_LOGGING
#include <sys/time.h>
#endif
#include <sdai.h>
#include <Registry.h>
#include <STEPaggregate.h>
#include <STEPundefined.h>
#include <ExpDict.h>
#include <STEPattribute.h>
#include <complexSupport.h>
#include <SdaiHeaderSchemaClasses.h>
#include <SdaiHeaderSchema.h>
void HeaderSchemaInit (Registry &);
void HeaderInitSchemasAndEnts (Registry &);
void SdaiHEADER_SECTION_SCHEMAInit (Registry & r);
#endif
-495
View File
@@ -1,495 +0,0 @@
#ifndef S_HEADER_SCHEMA_CC
#define S_HEADER_SCHEMA_CC
/*
* NIST STEP Editor Class Library
* cleditor/s_HEADER_SCHEMA.cc
* April 1997
* David Sauder
* K. C. Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
/* $Id: s_HEADER_SCHEMA.cc,v 3.0.1.4 1997/11/05 22:11:42 sauderd DP3.1 $ */
#include <s_HEADER_SCHEMA.h>
#include <ExpDict.h>
#include <STEPattribute.h>
/* ************** TYPES */
TypeDescriptor * HEADER_SCHEMAt_SCHEMA_NAME;
/* ************** ENTITIES */
EntityDescriptor * HEADER_SCHEMAe_FILE_IDENTIFICATION = 0;
AttrDescriptor * a_0FILE_NAME = 0;
AttrDescriptor * a_1DATE = 0;
AttrDescriptor * a_2AUTHOR = 0;
AttrDescriptor * a_3ORGANIZATION = 0;
AttrDescriptor * a_4PREPROCESSOR_VERSION = 0;
AttrDescriptor * a_5ORIGINATING_SYSTEM = 0;
s_N279_file_identification::s_N279_file_identification( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_FILE_IDENTIFICATION;
a = new STEPattribute( *a_0FILE_NAME, &_file_name );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_1DATE, &_date );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_2AUTHOR, &_author );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_3ORGANIZATION, &_organization );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_4PREPROCESSOR_VERSION, &_preprocessor_version );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_5ORIGINATING_SYSTEM, &_originating_system );
a -> set_null();
attributes.push( a );
}
s_N279_file_identification::~s_N279_file_identification() { }
#ifdef __O3DB__
void
s_N279_file_identification::oodb_reInit() {
eDesc = HEADER_SCHEMAe_FILE_IDENTIFICATION;
}
#endif
const SCLP23( String ) &
s_N279_file_identification::file_name() const {
return _file_name;
}
void
s_N279_file_identification::file_name( const char * x ) {
_file_name = x;
}
const SCLP23( String ) &
s_N279_file_identification::date() const {
return _date;
}
void
s_N279_file_identification::date( const char * x ) {
_date = x;
}
StringAggregate &
s_N279_file_identification::author() {
return ( StringAggregate & ) _author;
}
void
s_N279_file_identification::author( StringAggregate & x ) {
_author = x;
}
StringAggregate &
s_N279_file_identification::organization() {
return ( StringAggregate & ) _organization;
}
void
s_N279_file_identification::organization( StringAggregate & x ) {
_organization = x;
}
const SCLP23( String ) &
s_N279_file_identification::preprocessor_version() const {
return _preprocessor_version;
}
void
s_N279_file_identification::preprocessor_version( const char * x ) {
_preprocessor_version = x;
}
const SCLP23( String ) &
s_N279_file_identification::originating_system() const {
return _originating_system;
}
void
s_N279_file_identification::originating_system( const char * x ) {
_originating_system = x;
}
EntityDescriptor * HEADER_SCHEMAe_IMP_LEVEL = 0;
AttrDescriptor * a_6IMPLEMENTATION_LEVEL = 0;
s_N279_imp_level::s_N279_imp_level( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_IMP_LEVEL;
a = new STEPattribute( *a_6IMPLEMENTATION_LEVEL, &_implementation_level );
a -> set_null();
attributes.push( a );
}
s_N279_imp_level::~s_N279_imp_level() { }
#ifdef __O3DB__
void
s_N279_imp_level::oodb_reInit() {
eDesc = HEADER_SCHEMAe_IMP_LEVEL;
}
#endif
const SCLP23( String ) &
s_N279_imp_level::implementation_level() const {
return _implementation_level;
}
void
s_N279_imp_level::implementation_level( const char * x ) {
_implementation_level = x;
}
EntityDescriptor * HEADER_SCHEMAe_FILE_NAME = 0;
AttrDescriptor * a_7NAME = 0;
AttrDescriptor * a_8TIME_STAMP = 0;
AttrDescriptor * a_9AUTHOR = 0;
AttrDescriptor * a_10ORGANIZATION = 0;
AttrDescriptor * a_11STEP_VERSION = 0;
AttrDescriptor * a_12PREPROCESSOR_VERSION = 0;
AttrDescriptor * a_13ORIGINATING_SYSTEM = 0;
AttrDescriptor * a_14AUTHORISATION = 0;
p21DIS_File_name::p21DIS_File_name( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_FILE_NAME;
a = new STEPattribute( *a_7NAME, &_name );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_8TIME_STAMP, &_time_stamp );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_9AUTHOR, &_author );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_10ORGANIZATION, &_organization );
a -> set_null();
attributes.push( a );
/*
a = new STEPattribute (*a_11STEP_VERSION, &_step_version);
a -> set_null ();
attributes.push (a);
*/
a = new STEPattribute( *a_12PREPROCESSOR_VERSION, &_preprocessor_version );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_13ORIGINATING_SYSTEM, &_originating_system );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_14AUTHORISATION, &_authorisation );
a -> set_null();
attributes.push( a );
}
p21DIS_File_name::~p21DIS_File_name() { }
#ifdef __O3DB__
void
p21DIS_File_name::oodb_reInit() {
eDesc = HEADER_SCHEMAe_FILE_NAME;
}
#endif
const SCLP23( String ) &
p21DIS_File_name::name() const {
return _name;
}
void
p21DIS_File_name::name( const char * x ) {
_name = x;
}
const SCLP23( String ) &
p21DIS_File_name::time_stamp() const {
return _time_stamp;
}
void
p21DIS_File_name::time_stamp( const char * x ) {
_time_stamp = x;
}
StringAggregate &
p21DIS_File_name::author() {
return ( StringAggregate & ) _author;
}
void
p21DIS_File_name::author( StringAggregate & x ) {
_author = x;
}
StringAggregate &
p21DIS_File_name::organization() {
return ( StringAggregate & ) _organization;
}
void
p21DIS_File_name::organization( StringAggregate & x ) {
_organization = x;
}
/*
const SCLP23(String) &
p21DIS_File_name::step_version() const
{ return _step_version; }
void
p21DIS_File_name::step_version (const char * x)
{ _step_version = x; }
*/
const SCLP23( String ) &
p21DIS_File_name::preprocessor_version() const {
return _preprocessor_version;
}
void
p21DIS_File_name::preprocessor_version( const char * x ) {
_preprocessor_version = x;
}
const SCLP23( String ) &
p21DIS_File_name::originating_system() const {
return _originating_system;
}
void
p21DIS_File_name::originating_system( const char * x ) {
_originating_system = x;
}
const SCLP23( String ) &
p21DIS_File_name::authorisation() const {
return _authorisation;
}
void
p21DIS_File_name::authorisation( const char * x ) {
_authorisation = x;
}
EntityDescriptor * HEADER_SCHEMAe_FILE_DESCRIPTION = 0;
AttrDescriptor * a_15DESCRIPTION = 0;
AttrDescriptor * a_16IMPLEMENTATION_LEVEL = 0;
p21DIS_File_description::p21DIS_File_description( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_FILE_DESCRIPTION;
a = new STEPattribute( *a_15DESCRIPTION, &_description );
a -> set_null();
attributes.push( a );
a = new STEPattribute( *a_16IMPLEMENTATION_LEVEL, &_implementation_level );
a -> set_null();
attributes.push( a );
}
p21DIS_File_description::~p21DIS_File_description() { }
#ifdef __O3DB__
void
p21DIS_File_description::oodb_reInit() {
eDesc = HEADER_SCHEMAe_FILE_DESCRIPTION;
}
#endif
StringAggregate &
p21DIS_File_description::description() {
return ( StringAggregate & ) _description;
}
void
p21DIS_File_description::description( StringAggregate & x ) {
_description = x;
}
const SCLP23( String ) &
p21DIS_File_description::implementation_level() const {
return _implementation_level;
}
void
p21DIS_File_description::implementation_level( const char * x ) {
_implementation_level = x;
}
EntityDescriptor * HEADER_SCHEMAe_S_CLASSIFICATION = 0;
AttrDescriptor * a_17SECURITY_CLASSIFICATION = 0;
s_N279_classification::s_N279_classification( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_S_CLASSIFICATION;
a = new STEPattribute( *a_17SECURITY_CLASSIFICATION, &_security_classification );
a -> set_null();
attributes.push( a );
}
s_N279_classification::~s_N279_classification() { }
#ifdef __O3DB__
void
s_N279_classification::oodb_reInit() {
eDesc = HEADER_SCHEMAe_S_CLASSIFICATION;
}
#endif
const SCLP23( String ) &
s_N279_classification::security_classification() const {
return _security_classification;
}
void
s_N279_classification::security_classification( const char * x ) {
_security_classification = x;
}
EntityDescriptor * HEADER_SCHEMAe_S_FILE_DESCRIPTION = 0;
AttrDescriptor * a_18DESCRIPTION = 0;
s_N279_file_description::s_N279_file_description( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_S_FILE_DESCRIPTION;
a = new STEPattribute( *a_18DESCRIPTION, &_description );
a -> set_null();
attributes.push( a );
}
s_N279_file_description::~s_N279_file_description() { }
#ifdef __O3DB__
void
s_N279_file_description::oodb_reInit() {
eDesc = HEADER_SCHEMAe_S_FILE_DESCRIPTION;
}
#endif
const SCLP23( String ) &
s_N279_file_description::description() const {
return _description;
}
void
s_N279_file_description::description( const char * x ) {
_description = x;
}
EntityDescriptor * HEADER_SCHEMAe_MAXSIG = 0;
AttrDescriptor * a_19MAXIMUM_SIGNIFICANT_DIGIT = 0;
p21DIS_Maxsig::p21DIS_Maxsig( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_MAXSIG;
a = new STEPattribute( *a_19MAXIMUM_SIGNIFICANT_DIGIT, &_maximum_significant_digit );
a -> set_null();
attributes.push( a );
}
p21DIS_Maxsig::~p21DIS_Maxsig() { }
#ifdef __O3DB__
void
p21DIS_Maxsig::oodb_reInit() {
eDesc = HEADER_SCHEMAe_MAXSIG;
}
#endif
SCLP23( Integer )
p21DIS_Maxsig::maximum_significant_digit() {
return ( SCLP23( Integer ) ) _maximum_significant_digit;
}
void
p21DIS_Maxsig::maximum_significant_digit( SCLP23( Integer ) x ) {
_maximum_significant_digit = x;
}
EntityDescriptor * HEADER_SCHEMAe_CLASSIFICATION = 0;
AttrDescriptor * a_20SECURITY_CLASSIFICATION = 0;
p21DIS_Classification::p21DIS_Classification( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_CLASSIFICATION;
a = new STEPattribute( *a_20SECURITY_CLASSIFICATION, &_security_classification );
a -> set_null();
attributes.push( a );
}
p21DIS_Classification::~p21DIS_Classification() { }
#ifdef __O3DB__
void
p21DIS_Classification::oodb_reInit() {
eDesc = HEADER_SCHEMAe_CLASSIFICATION;
}
#endif
const SCLP23( String ) &
p21DIS_Classification::security_classification() const {
return _security_classification;
}
void
p21DIS_Classification::security_classification( const char * x ) {
_security_classification = x;
}
EntityDescriptor * HEADER_SCHEMAe_FILE_SCHEMA = 0;
AttrDescriptor * a_21SCHEMA_IDENTIFIERS = 0;
p21DIS_File_schema::p21DIS_File_schema( ) {
STEPattribute * a;
eDesc = HEADER_SCHEMAe_FILE_SCHEMA;
a = new STEPattribute( *a_21SCHEMA_IDENTIFIERS, &_schema_identifiers );
a -> set_null();
attributes.push( a );
}
p21DIS_File_schema::~p21DIS_File_schema() { }
#ifdef __O3DB__
void
p21DIS_File_schema::oodb_reInit() {
eDesc = HEADER_SCHEMAe_FILE_SCHEMA;
}
#endif
StringAggregate &
p21DIS_File_schema::schema_identifiers() {
return ( StringAggregate & ) _schema_identifiers;
}
void
p21DIS_File_schema::schema_identifiers( StringAggregate & x ) {
_schema_identifiers = x;
}
#endif
-277
View File
@@ -1,277 +0,0 @@
#ifndef S_HEADER_SCHEMA_H
#define S_HEADER_SCHEMA_H
/*
* NIST STEP Editor Class Library
* cleditor/s_HEADER_SCHEMA.h
* April 1997
* David Sauder
* K. C. Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
/* $Id: s_HEADER_SCHEMA.h,v 3.0.1.4 1997/11/05 22:11:43 sauderd DP3.1 $ */
#ifdef __O3DB__
#include <OpenOODB.h>
#endif
#include <sdai.h>
#include <Registry.h>
#include <STEPaggregate.h>
//#include <STEPentity.h>
/* ************** TYPES */
extern TypeDescriptor *HEADER_SCHEMAt_SCHEMA_NAME;
typedef SCLP23(String) p21DIS_Schema_name;
/* ************** ENTITIES */
extern EntityDescriptor *HEADER_SCHEMAe_FILE_IDENTIFICATION;
extern AttrDescriptor *a_0FILE_NAME;
extern AttrDescriptor *a_1DATE;
extern AttrDescriptor *a_2AUTHOR;
extern AttrDescriptor *a_3ORGANIZATION;
extern AttrDescriptor *a_4PREPROCESSOR_VERSION;
extern AttrDescriptor *a_5ORIGINATING_SYSTEM;
class s_N279_file_identification : public SCLP23(Application_instance) {
protected:
SCLP23(String) _file_name ;
SCLP23(String) _date ;
StringAggregate _author ;
StringAggregate _organization ;
SCLP23(String) _preprocessor_version ;
SCLP23(String) _originating_system ;
public:
s_N279_file_identification ( );
s_N279_file_identification (s_N279_file_identification& e );
~s_N279_file_identification ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "File_Identification"; }
int opcode () { return 0 ; }
const SCLP23(String) & file_name() const;
void file_name (const char * x);
const SCLP23(String) & date() const;
void date (const char * x);
StringAggregate & author();
void author (StringAggregate & x);
StringAggregate & organization();
void organization (StringAggregate & x);
const SCLP23(String) & preprocessor_version() const;
void preprocessor_version (const char * x);
const SCLP23(String) & originating_system() const;
void originating_system (const char * x);
};
inline SCLP23(Application_instance) *
create_s_N279_file_identification () { return (SCLP23(Application_instance)*) new s_N279_file_identification ; }
extern EntityDescriptor *HEADER_SCHEMAe_IMP_LEVEL;
extern AttrDescriptor *a_6IMPLEMENTATION_LEVEL;
class s_N279_imp_level : public SCLP23(Application_instance) {
protected:
SCLP23(String) _implementation_level ;
public:
s_N279_imp_level ( );
s_N279_imp_level (s_N279_imp_level& e );
~s_N279_imp_level ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "Imp_Level"; }
int opcode () { return 1 ; }
const SCLP23(String) & implementation_level() const;
void implementation_level (const char * x);
};
inline SCLP23(Application_instance) *
create_s_N279_imp_level () { return (SCLP23(Application_instance)*) new s_N279_imp_level ; }
extern EntityDescriptor *HEADER_SCHEMAe_FILE_NAME;
extern AttrDescriptor *a_7NAME;
extern AttrDescriptor *a_8TIME_STAMP;
extern AttrDescriptor *a_9AUTHOR;
extern AttrDescriptor *a_10ORGANIZATION;
extern AttrDescriptor *a_11STEP_VERSION;
extern AttrDescriptor *a_12PREPROCESSOR_VERSION;
extern AttrDescriptor *a_13ORIGINATING_SYSTEM;
extern AttrDescriptor *a_14AUTHORISATION;
class p21DIS_File_name : public SCLP23(Application_instance) {
protected:
SCLP23(String) _name ;
SCLP23(String) _time_stamp ;
StringAggregate _author ;
StringAggregate _organization ;
// SCLP23(String) _step_version ;
SCLP23(String) _preprocessor_version ;
SCLP23(String) _originating_system ;
SCLP23(String) _authorisation ;
public:
p21DIS_File_name ( );
p21DIS_File_name (p21DIS_File_name& e );
~p21DIS_File_name ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "File_Name"; }
int opcode () { return 2 ; }
const SCLP23(String) & name() const;
void name (const char * x);
const SCLP23(String) & time_stamp() const;
void time_stamp (const char * x);
StringAggregate & author();
void author (StringAggregate & x);
StringAggregate & organization();
void organization (StringAggregate & x);
// const SCLP23(String) & step_version() const;
// void step_version (const char * x);
const SCLP23(String) & preprocessor_version() const;
void preprocessor_version (const char * x);
const SCLP23(String) & originating_system() const;
void originating_system (const char * x);
const SCLP23(String) & authorisation() const;
void authorisation (const char * x);
};
inline SCLP23(Application_instance) *
create_p21DIS_File_name () { return (SCLP23(Application_instance)*) new p21DIS_File_name ; }
extern EntityDescriptor *HEADER_SCHEMAe_FILE_DESCRIPTION;
extern AttrDescriptor *a_15DESCRIPTION;
extern AttrDescriptor *a_16IMPLEMENTATION_LEVEL;
class p21DIS_File_description : public SCLP23(Application_instance) {
protected:
StringAggregate _description ;
SCLP23(String) _implementation_level ;
public:
p21DIS_File_description ( );
p21DIS_File_description (p21DIS_File_description& e );
~p21DIS_File_description ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "File_Description"; }
int opcode () { return 3 ; }
StringAggregate & description();
void description (StringAggregate & x);
const SCLP23(String) & implementation_level() const;
void implementation_level (const char * x);
};
inline SCLP23(Application_instance) *
create_p21DIS_File_description () { return (SCLP23(Application_instance)*) new p21DIS_File_description ; }
extern EntityDescriptor *HEADER_SCHEMAe_S_CLASSIFICATION;
extern AttrDescriptor *a_17SECURITY_CLASSIFICATION;
class s_N279_classification : public SCLP23(Application_instance) {
protected:
SCLP23(String) _security_classification ;
public:
s_N279_classification ( );
s_N279_classification (s_N279_classification& e );
~s_N279_classification ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "S_Classification"; }
int opcode () { return 4 ; }
const SCLP23(String) & security_classification() const;
void security_classification (const char * x);
};
inline SCLP23(Application_instance) *
create_s_N279_classification () { return (SCLP23(Application_instance)*) new s_N279_classification ; }
extern EntityDescriptor *HEADER_SCHEMAe_S_FILE_DESCRIPTION;
extern AttrDescriptor *a_18DESCRIPTION;
class s_N279_file_description : public SCLP23(Application_instance) {
protected:
SCLP23(String) _description ;
public:
s_N279_file_description ( );
s_N279_file_description (s_N279_file_description& e );
~s_N279_file_description ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "S_File_Description"; }
int opcode () { return 5 ; }
const SCLP23(String) & description() const;
void description (const char * x);
};
inline SCLP23(Application_instance) *
create_s_N279_file_description () { return (SCLP23(Application_instance)*) new s_N279_file_description ; }
extern EntityDescriptor *HEADER_SCHEMAe_MAXSIG;
extern AttrDescriptor *a_19MAXIMUM_SIGNIFICANT_DIGIT;
class p21DIS_Maxsig : public SCLP23(Application_instance) {
protected:
SCLP23(Integer) _maximum_significant_digit ;
public:
p21DIS_Maxsig ( );
p21DIS_Maxsig (p21DIS_Maxsig& e );
~p21DIS_Maxsig ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "Maxsig"; }
int opcode () { return 6 ; }
SCLP23(Integer) maximum_significant_digit();
void maximum_significant_digit (SCLP23(Integer) x);
};
inline SCLP23(Application_instance) *
create_p21DIS_Maxsig () { return (SCLP23(Application_instance)*) new p21DIS_Maxsig ; }
extern EntityDescriptor *HEADER_SCHEMAe_CLASSIFICATION;
extern AttrDescriptor *a_20SECURITY_CLASSIFICATION;
class p21DIS_Classification : public SCLP23(Application_instance) {
protected:
SCLP23(String) _security_classification ;
public:
p21DIS_Classification ( );
p21DIS_Classification (p21DIS_Classification& e );
~p21DIS_Classification ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "Classification"; }
int opcode () { return 7 ; }
const SCLP23(String) & security_classification() const;
void security_classification (const char * x);
};
inline SCLP23(Application_instance) *
create_p21DIS_Classification () { return (SCLP23(Application_instance)*) new p21DIS_Classification ; }
extern EntityDescriptor *HEADER_SCHEMAe_FILE_SCHEMA;
extern AttrDescriptor *a_21SCHEMA_IDENTIFIERS;
class p21DIS_File_schema : public SCLP23(Application_instance) {
protected:
StringAggregate _schema_identifiers ; // of SCHEMA_NAME
public:
p21DIS_File_schema ( );
p21DIS_File_schema (p21DIS_File_schema& e );
~p21DIS_File_schema ();
#ifdef __O3DB__
void oodb_reInit();
#endif
const char *Name () { return "File_Schema"; }
int opcode () { return 8 ; }
StringAggregate & schema_identifiers();
void schema_identifiers (StringAggregate & x);
};
inline SCLP23(Application_instance) *
create_p21DIS_File_schema () { return (SCLP23(Application_instance)*) new p21DIS_File_schema ; }
#endif
-192
View File
@@ -1,192 +0,0 @@
#ifndef S_HEADER_SCHEMA_INIT_CC
#define S_HEADER_SCHEMA_INIT_CC
/*
* NIST STEP Editor Class Library
* cleditor/s_HEADER_SCHEMA.inline.cc
* April 1997
* David Sauder
* K. C. Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
// This file was generated by fedex_plus. You probably don't want to edit
// it since your modifications will be lost if fedex_plus is used to
// regenerate it.
/* $Id: s_HEADER_SCHEMA.init.cc,v 3.0.1.5 1997/11/05 22:11:43 sauderd DP3.1 $ */
#include <s_HEADER_SCHEMA.h>
#include <ExpDict.h>
#include <STEPattribute.h>
#include <Registry.h>
void
HeaderSchemaInit( Registry & reg ) {
SchemaDescriptor * z_HEADER_SCHEMA = new SchemaDescriptor( "Header_Schema" );
reg.AddSchema( *z_HEADER_SCHEMA );
HEADER_SCHEMAt_SCHEMA_NAME = new TypeDescriptor(
"Schema_Name", // Name
STRING_TYPE, // FundamentalType
z_HEADER_SCHEMA, // Originating Schema
"STRING" ); // Description
HEADER_SCHEMAe_FILE_IDENTIFICATION = new EntityDescriptor( "File_Identification", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_s_N279_file_identification );
HEADER_SCHEMAe_IMP_LEVEL = new EntityDescriptor( "Imp_Level", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_s_N279_imp_level );
HEADER_SCHEMAe_FILE_NAME = new EntityDescriptor( "File_Name", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_p21DIS_File_name );
HEADER_SCHEMAe_FILE_DESCRIPTION = new EntityDescriptor( "File_Description", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_p21DIS_File_description );
HEADER_SCHEMAe_S_CLASSIFICATION = new EntityDescriptor( "S_Classification", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_s_N279_classification );
HEADER_SCHEMAe_S_FILE_DESCRIPTION = new EntityDescriptor( "S_File_Description", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_s_N279_file_description );
HEADER_SCHEMAe_MAXSIG = new EntityDescriptor( "Maxsig", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_p21DIS_Maxsig );
HEADER_SCHEMAe_CLASSIFICATION = new EntityDescriptor( "Classification", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_p21DIS_Classification );
HEADER_SCHEMAe_FILE_SCHEMA = new EntityDescriptor( "File_Schema", z_HEADER_SCHEMA,
LFalse, LFalse,
( Creator ) create_p21DIS_File_schema );
HEADER_SCHEMAt_SCHEMA_NAME->ReferentType( t_sdaiSTRING );
reg.AddType( *HEADER_SCHEMAt_SCHEMA_NAME );
reg.AddEntity( *HEADER_SCHEMAe_FILE_IDENTIFICATION );
a_0FILE_NAME = new AttrDescriptor( "file_name", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_IDENTIFICATION );
HEADER_SCHEMAe_FILE_IDENTIFICATION->AddExplicitAttr( a_0FILE_NAME );
a_1DATE = new AttrDescriptor( "date", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_IDENTIFICATION );
HEADER_SCHEMAe_FILE_IDENTIFICATION->AddExplicitAttr( a_1DATE );
TypeDescriptor * t_0 = new TypeDescriptor;
t_0->FundamentalType( AGGREGATE_TYPE );
t_0->Description( "LIST of STRING" );
t_0->OriginatingSchema( z_HEADER_SCHEMA );
t_0->ReferentType( t_sdaiSTRING );
a_2AUTHOR = new AttrDescriptor( "author", t_0,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_IDENTIFICATION );
HEADER_SCHEMAe_FILE_IDENTIFICATION->AddExplicitAttr( a_2AUTHOR );
TypeDescriptor * t_1 = new TypeDescriptor;
t_1->FundamentalType( AGGREGATE_TYPE );
t_1->Description( "LIST of STRING" );
t_1->OriginatingSchema( z_HEADER_SCHEMA );
t_1->ReferentType( t_sdaiSTRING );
a_3ORGANIZATION = new AttrDescriptor( "organization", t_1,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_IDENTIFICATION );
HEADER_SCHEMAe_FILE_IDENTIFICATION->AddExplicitAttr( a_3ORGANIZATION );
a_4PREPROCESSOR_VERSION = new AttrDescriptor( "preprocessor_version", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_IDENTIFICATION );
HEADER_SCHEMAe_FILE_IDENTIFICATION->AddExplicitAttr( a_4PREPROCESSOR_VERSION );
a_5ORIGINATING_SYSTEM = new AttrDescriptor( "originating_system", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_IDENTIFICATION );
HEADER_SCHEMAe_FILE_IDENTIFICATION->AddExplicitAttr( a_5ORIGINATING_SYSTEM );
reg.AddEntity( *HEADER_SCHEMAe_IMP_LEVEL );
a_6IMPLEMENTATION_LEVEL = new AttrDescriptor( "implementation_level", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_IMP_LEVEL );
HEADER_SCHEMAe_IMP_LEVEL->AddExplicitAttr( a_6IMPLEMENTATION_LEVEL );
reg.AddEntity( *HEADER_SCHEMAe_FILE_NAME );
a_7NAME = new AttrDescriptor( "name", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_7NAME );
a_8TIME_STAMP = new AttrDescriptor( "time_stamp", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_8TIME_STAMP );
TypeDescriptor * t_2 = new TypeDescriptor;
t_2->FundamentalType( AGGREGATE_TYPE );
t_2->Description( "LIST [1:?] of STRING (256)" );
t_2->OriginatingSchema( z_HEADER_SCHEMA );
t_2->ReferentType( t_sdaiSTRING );
a_9AUTHOR = new AttrDescriptor( "author", t_2,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_9AUTHOR );
TypeDescriptor * t_3 = new TypeDescriptor;
t_3->FundamentalType( AGGREGATE_TYPE );
t_3->Description( "LIST [1:?] of STRING (256)" );
t_3->OriginatingSchema( z_HEADER_SCHEMA );
t_3->ReferentType( t_sdaiSTRING );
a_10ORGANIZATION = new AttrDescriptor( "organization", t_3,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_10ORGANIZATION );
/*
a_11STEP_VERSION = new AttrDescriptor("step_version",t_sdaiSTRING,LFalse,LFalse,AttrType_Explicit,*HEADER_SCHEMAe_FILE_NAME);
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr(a_11STEP_VERSION);
*/
a_12PREPROCESSOR_VERSION = new AttrDescriptor( "preprocessor_version", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_12PREPROCESSOR_VERSION );
a_13ORIGINATING_SYSTEM = new AttrDescriptor( "originating_system", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_13ORIGINATING_SYSTEM );
a_14AUTHORISATION = new AttrDescriptor( "authorisation", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_NAME );
HEADER_SCHEMAe_FILE_NAME->AddExplicitAttr( a_14AUTHORISATION );
reg.AddEntity( *HEADER_SCHEMAe_FILE_DESCRIPTION );
TypeDescriptor * t_4 = new TypeDescriptor;
t_4->FundamentalType( AGGREGATE_TYPE );
t_4->Description( "LIST [1:?] of STRING (256)" );
t_4->OriginatingSchema( z_HEADER_SCHEMA );
t_4->ReferentType( t_sdaiSTRING );
a_15DESCRIPTION = new AttrDescriptor( "description", t_4,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_DESCRIPTION );
HEADER_SCHEMAe_FILE_DESCRIPTION->AddExplicitAttr( a_15DESCRIPTION );
a_16IMPLEMENTATION_LEVEL = new AttrDescriptor( "implementation_level", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_DESCRIPTION );
HEADER_SCHEMAe_FILE_DESCRIPTION->AddExplicitAttr( a_16IMPLEMENTATION_LEVEL );
reg.AddEntity( *HEADER_SCHEMAe_S_CLASSIFICATION );
a_17SECURITY_CLASSIFICATION = new AttrDescriptor( "security_classification", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_S_CLASSIFICATION );
HEADER_SCHEMAe_S_CLASSIFICATION->AddExplicitAttr( a_17SECURITY_CLASSIFICATION );
reg.AddEntity( *HEADER_SCHEMAe_S_FILE_DESCRIPTION );
a_18DESCRIPTION = new AttrDescriptor( "description", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_S_FILE_DESCRIPTION );
HEADER_SCHEMAe_S_FILE_DESCRIPTION->AddExplicitAttr( a_18DESCRIPTION );
reg.AddEntity( *HEADER_SCHEMAe_MAXSIG );
a_19MAXIMUM_SIGNIFICANT_DIGIT = new AttrDescriptor( "maximum_significant_digit", t_sdaiINTEGER,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_MAXSIG );
HEADER_SCHEMAe_MAXSIG->AddExplicitAttr( a_19MAXIMUM_SIGNIFICANT_DIGIT );
reg.AddEntity( *HEADER_SCHEMAe_CLASSIFICATION );
a_20SECURITY_CLASSIFICATION = new AttrDescriptor( "security_classification", t_sdaiSTRING,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_CLASSIFICATION );
HEADER_SCHEMAe_CLASSIFICATION->AddExplicitAttr( a_20SECURITY_CLASSIFICATION );
reg.AddEntity( *HEADER_SCHEMAe_FILE_SCHEMA );
TypeDescriptor * t_5 = new TypeDescriptor;
t_5->FundamentalType( AGGREGATE_TYPE );
t_5->Description( "LIST [1:?] of Schema_Name" );
t_5->OriginatingSchema( z_HEADER_SCHEMA );
t_5->ReferentType( t_sdaiSTRING );
a_21SCHEMA_IDENTIFIERS = new AttrDescriptor( "schema_identifiers", t_5,
LFalse, LFalse,
AttrType_Explicit, *HEADER_SCHEMAe_FILE_SCHEMA );
HEADER_SCHEMAe_FILE_SCHEMA->AddExplicitAttr( a_21SCHEMA_IDENTIFIERS );
}
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
/*
* NIST STEP Editor Class Library
* cleditor/schemaheader.cc
* cleditor/seeinfodefault.h
* April 1997
* David Sauder
* K. C. Morris
+15 -15
View File
@@ -99,7 +99,7 @@ void Registry::DeleteContents() {
* entity A from schema Y and renames it to B, X should only refer to A as
* B. Thus, if schNm here = "X", only e="B" would be valid but not e="A".
*/
inline const EntityDescriptor * Registry::FindEntity( const char * e, const char * schNm, int check_case ) const
const EntityDescriptor * Registry::FindEntity( const char * e, const char * schNm, int check_case ) const
{
const EntityDescriptor * entd;
const SchRename * altlist;
@@ -140,7 +140,7 @@ inline const EntityDescriptor * Registry::FindEntity( const char * e, const cha
return entd;
}
inline const Schema * Registry::FindSchema( const char * n, int check_case ) const {
const Schema * Registry::FindSchema( const char * n, int check_case ) const {
if( check_case ) {
return ( const Schema * ) HASHfind( active_schemas, ( char * ) n );
}
@@ -149,7 +149,7 @@ inline const Schema * Registry::FindSchema( const char * n, int check_case ) co
( char * )PrettyTmpName( n ) );
}
inline const TypeDescriptor * Registry::FindType( const char * n, int check_case ) const {
const TypeDescriptor * Registry::FindType( const char * n, int check_case ) const {
if( check_case ) {
return ( const TypeDescriptor * ) HASHfind( active_types, ( char * ) n );
}
@@ -157,11 +157,11 @@ inline const TypeDescriptor * Registry::FindType( const char * n, int check_cas
( char * )PrettyTmpName( n ) );
}
inline void Registry::ResetTypes() {
void Registry::ResetTypes() {
HASHlistinit( active_types, &cur_type );
}
inline const TypeDescriptor * Registry::NextType() {
const TypeDescriptor * Registry::NextType() {
if( 0 == HASHlist( &cur_type ) ) {
return 0;
}
@@ -191,7 +191,7 @@ void Registry::AddType( const TypeDescriptor & d ) {
* so that if we comes across one of them in a Part 21 file, we'll recog-
* nize it.
*/
inline void Registry::AddClones( const EntityDescriptor & e )
void Registry::AddClones( const EntityDescriptor & e )
{
const SchRename * alts = e.AltNameList();
@@ -232,7 +232,7 @@ static int uniqueNames( const char * entnm, const SchRename * altlist )
return cnt;
}
inline void Registry::RemoveEntity( const char * n ) {
void Registry::RemoveEntity( const char * n ) {
const EntityDescriptor * e = FindEntity( n );
struct Element tmp;
@@ -244,13 +244,13 @@ inline void Registry::RemoveEntity( const char * n ) {
}
inline void Registry::RemoveSchema( const char * n ) {
void Registry::RemoveSchema( const char * n ) {
struct Element tmp;
tmp.key = ( char * ) n;
HASHsearch( active_schemas, &tmp, HASH_DELETE );
}
inline void Registry::RemoveType( const char * n ) {
void Registry::RemoveType( const char * n ) {
struct Element tmp;
tmp.key = ( char * ) n;
HASHsearch( active_types, &tmp, HASH_DELETE );
@@ -259,7 +259,7 @@ inline void Registry::RemoveType( const char * n ) {
/**
* Remove all the "clones", or rename values of e.
*/
inline void Registry::RemoveClones( const EntityDescriptor & e )
void Registry::RemoveClones( const EntityDescriptor & e )
{
const SchRename * alts = e.AltNameList();
struct Element * tmp;
@@ -294,27 +294,27 @@ SCLP23( Application_instance ) * Registry::ObjCreate( const char * nm, const cha
}
inline int Registry::GetEntityCnt() {
int Registry::GetEntityCnt() {
return entity_cnt;
}
inline void Registry::ResetEntities() {
void Registry::ResetEntities() {
HASHlistinit( primordialSwamp, &cur_entity );
}
inline const EntityDescriptor * Registry::NextEntity() {
const EntityDescriptor * Registry::NextEntity() {
if( 0 == HASHlist( &cur_entity ) ) {
return 0;
}
return ( const EntityDescriptor * ) cur_entity.e->data;
}
inline void Registry::ResetSchemas() {
void Registry::ResetSchemas() {
HASHlistinit( active_schemas, &cur_schema );
}
inline const Schema * Registry::NextSchema() {
const Schema * Registry::NextSchema() {
if( 0 == HASHlist( &cur_schema ) ) {
return 0;
}
+1 -1
View File
@@ -149,7 +149,7 @@ std::string ToExpressStr( istream &in, ErrorDescriptor *err ) {
// to handle a string like 'hi'''
if ( c == STRING_DELIM) {
// to handle \S\'
found = s.find_last_of("\\S\\");
found = s.rfind("\\S\\");
if ( !(found != string::npos && (s.size() == found + 2)) ) {
i_quote++;
}
+4 -5
View File
@@ -47,9 +47,9 @@ set(EXPRESS_SOURCES
express.c
)
# SET(FEDEX_SOURCES
# fedex.c
# )
SET(CHECK_EXPRESS_SOURCES
fedex.c
)
SET(EXPRESS_PRIVATE_HDRS
conf.h
@@ -72,5 +72,4 @@ if(APPLE)
set_target_properties(express PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
endif(APPLE)
#disable fedex because we don't use it
# SCL_ADDEXEC(fedex "${FEDEX_SOURCES}" express)
SCL_ADDEXEC("check-express" "${CHECK_EXPRESS_SOURCES}" express)
+96 -8
View File
@@ -1,4 +1,4 @@
/*
/** \file p21read.cc
** 21-Jul-1995
** This code was developed with the support of the United States Government,
** and is not subject to copyright.
@@ -15,12 +15,98 @@
extern void SchemaInit( class Registry & );
#include <STEPfile.h>
#include <sdai.h>
#include <STEPattribute.h>
#include <ExpDict.h>
#include <Registry.h>
#include <algorithm>
#include <string>
#include <unistd.h>
/**
* Compare the schema names from the lib (generated by fedex_plus) and
* the current exchange file. Both strings are converted to upper case
* before comparison. If they are not identical, attempt to strip any
* ASN.1 identifiers and compare again. Returns true for a match.
*/
bool compareOneSchName( std::string lib, std::string file ) {
size_t b,e,ls,fs;
b = lib.find_first_of('\'')+1;
e = lib.find_last_of('\'');
lib = lib.substr(b,e-b);
std::transform(lib.begin(), lib.end(), lib.begin(), ::toupper);
std::transform(file.begin(), file.end(), file.begin(), ::toupper);
if(lib == file) {
return true;
}
//There are no spaces, unless there is an ASN.1 identifier. If
//the strings don't already match, try to remove this identifier.
ls = lib.find_first_of(' ');
fs = file.find_first_of(' ');
if( lib.substr(0,ls) == file.substr(0,fs) ) {
return true;
}
std::cerr << "This pair of schema names do not match - " << lib << " and " << file << std::endl;
return false;
}
/**
* Loop through all available schemas and attributes, looking
* for a match. If match not found, print error and exit(1)
*/
void checkSchemaName( Registry & reg, STEPfile & sf, bool ignoreErr ) {
bool match = false;
std::string sname;
STEPattribute *attr;
const Schema * sc;
reg.ResetSchemas();
//file id 3 is always the schema name
SCLP23_NAME(Application_instance) *ai =
sf.HeaderInstances()->FindFileId(3)->GetApplication_instance();
while( ( attr = ai->NextAttribute() ) ) {
attr->asStr(sname);
while( (sc = reg.NextSchema() ) ) {
if( compareOneSchName(sname, sc->Name() ) ) {
match = true;
break;
}
}
if(match) break;
}
if (!match) {
std::cerr << "ERROR - schema name mismatch. Tried all available combinations." << std::endl;
if( !ignoreErr ) {
exit(1);
}
}
}
void printUse(const char * exe) {
std::cout << "p21read - read a STEP Part 21 exchange file using SCL, and write the data to another file." << std::endl;
std::cout << "Syntax: " << exe << " [-i] infile [outfile]" << std::endl;
std::cout << "Use '-i' to ignore a schema name mismatch." << std::endl;
std::cout << "Use '--' as the last argument if a file name starts with a dash." << std::endl;
exit( 1 );
}
int main( int argc, char * argv[] ) {
if( argc > 3 || argc < 2 ) {
cout << "Syntax: p21read [infile [outfile]]" << endl;
exit( 1 );
bool ignoreErr = false;
char c;
if( argc > 4 || argc < 2 ) {
printUse(argv[0]);
}
while( ( c = getopt( argc, argv, "i" ) ) != -1 ) {
switch( c ) {
case 'i':
ignoreErr = true;
break;
case '?':
default:
printUse(argv[0]);
}
}
///////////////////////////////////////////////////////////////////////////////
// You have to initialize the schema before you do anything else.
// This initializes all of the registry information for the schema you
@@ -37,17 +123,19 @@ int main( int argc, char * argv[] ) {
char * flnm;
cout << "\nEXAMPLE : load file ..." << endl;
if( argc >= 2 ) {
flnm = argv[1];
if( argc >= ( optind + 1 ) ) {
flnm = argv[optind];
} else {
flnm = ( char * )"testfile.step";
}
sfile.ReadExchangeFile( flnm );
sfile.Error().PrintContents(cout);
checkSchemaName( registry, sfile, ignoreErr );
cout << "EXAMPLE : write file ..." << endl;
if( argc == 3 ) {
flnm = argv[2];
if( argc == optind+2 ) {
flnm = argv[optind+1];
} else {
flnm = ( char * )"file.out";
}
+12
View File
@@ -0,0 +1,12 @@
#
# Adding unittest for unitary schemas
#
FILE(GLOB UNITARY_SCHEMAS "${CMAKE_CURRENT_SOURCE_DIR}/unitary_schemas/*.exp")
FOREACH(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
GET_FILENAME_COMPONENT(SCHEMA_NAME ${UNITARY_SCHEMA} NAME_WE)
# setting test_name
SET(TEST_NAME test${SCHEMA_NAME})
# add test
ADD_TEST(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/check-express ${UNITARY_SCHEMA})
ENDFOREACH(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
+7
View File
@@ -0,0 +1,7 @@
SCHEMA test_array;
ENTITY point
coords = ARRAY[1:3] OF REAL;
END_ENTITY;
END_SCHEMA;
@@ -0,0 +1,9 @@
SCHEMA test_array_of_simple_types;
ENTITY point;
arr_real : ARRAY[1:3] OF REAL;
arr_string : ARRAY[1:3] OF STRING;
arr_integer : ARRAY[1:?] OF INTEGER;
END_ENTITY;
END_SCHEMA;
@@ -0,0 +1,67 @@
SCHEMA test_multiple_inheritance;
TYPE classification_item = SELECT (
person_and_organization_address,
address);
END_TYPE;
TYPE label = STRING;
END_TYPE;
TYPE identifier = STRING;
END_TYPE;
TYPE text = STRING;
END_TYPE;
ENTITY person_and_organization_address
SUBTYPE OF (organizational_address, personal_address);
SELF\organizational_address.organizations : SET [1:1] OF organization;
SELF\personal_address.people : SET [1:1] OF person;
END_ENTITY;
ENTITY personal_address
SUBTYPE OF (address);
people : SET [1:?] OF person;
description : OPTIONAL text;
END_ENTITY;
ENTITY organizational_address
SUBTYPE OF (address);
organizations : SET [1:?] OF organization;
description : OPTIONAL text;
END_ENTITY;
ENTITY organization;
id : OPTIONAL identifier;
name : label;
description : OPTIONAL text;
END_ENTITY;
ENTITY address;
internal_location : OPTIONAL label;
street_number : OPTIONAL label;
street : OPTIONAL label;
postal_box : OPTIONAL label;
town : OPTIONAL label;
region : OPTIONAL label;
postal_code : OPTIONAL label;
country : OPTIONAL label;
facsimile_number : OPTIONAL label;
telephone_number : OPTIONAL label;
electronic_mail_address : OPTIONAL label;
telex_number : OPTIONAL label;
END_ENTITY;
ENTITY person;
id : identifier;
last_name : OPTIONAL label;
first_name : OPTIONAL label;
middle_names : OPTIONAL LIST [1:?] OF label;
prefix_titles : OPTIONAL LIST [1:?] OF label;
suffix_titles : OPTIONAL LIST [1:?] OF label;
WHERE
WR1 : EXISTS(last_name) OR EXISTS(first_name);
END_ENTITY;
END_SCHEMA;
+13
View File
@@ -0,0 +1,13 @@
SCHEMA test_named_type;
TYPE measure = REAL;
END_TYPE;
TYPE type2 = INTEGER;
END_TYPE;
ENTITY line;
line_length : measure;
END_ENTITY;
END_SCHEMA;
@@ -0,0 +1,29 @@
SCHEMA test_single_inheritance_multi_level;
TYPE label = STRING;
END_TYPE;
TYPE length_measure = REAL;
END_TYPE;
TYPE point = REAL;
END_TYPE;
ENTITY shape
SUPERTYPE OF (subshape);
item_name : label;
number_of_sides : INTEGER;
END_ENTITY;
ENTITY subshape
SUPERTYPE OF (rectangle)
SUBTYPE OF (shape);
END_ENTITY;
ENTITY rectangle
SUBTYPE OF (subshape);
height : length_measure;
width : length_measure;
END_ENTITY;
END_SCHEMA;